IterQR : An Iterative Framework for LLM-based Query Rewrite in e-Commercial Search System

Shangyu Chen*, Xinyu Jia, Yingfei Zhang, Shuai Zhang, Xiang Li, Wei Lin · 2025

Read IterQR : An Iterative Framework for LLM-based Query Rewrite in e-Commercial Search System by Shangyu Chen*, Xinyu Jia, Yingfei Zhang, Shuai Zhang, Xiang Li, Wei Lin (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-05309.txt.

Introduction

Shangyu Chen and co-authors loop a chat model query fix round till shop search words mend on their own, in a paper from 2025. Shop hunts fail when folk type vague or wrong words. Old fix lists sit still, hand made, blind to shop lore and world lore.

Each loop round breeds new fixes with lore fed text and step thought, then reads live click signs to keep the good ones. A multi task train round then tunes the model on the kept set. The frame self heals its fix stock as rounds pass. It runs live in a vast food cart search in China, with gains the team logs.

Catalog record

CREATORShangyu Chen*, Xinyu Jia, Yingfei Zhang, Shuai Zhang, Xiang Li, Wei Lin
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE40 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-05309

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

IterQR : An Iterative Framework for LLM-based Query Rewrite in e-Commercial Search System Shangyu Chen*, Xinyu Jia, Yingfei Zhang, Shuai Zhang, Xiang Li, Wei Lin Abstract 1 Abstract The essence of modern e-Commercial search system lies in matching user’s intent and available candidates depending on user’s query, providing personalized and precise service. However, user’s query may be incorrect due to ambiguous input and typo, leading to inaccurate search. These cases may be released by query rewrite: modify query to other representation or expansion. However, traditional query rewrite replies on static rewrite vocabulary, which is manually established meanwhile lacks interaction with both domain knowledge in e-Commercial system and common knowledge in the real world. In this paper, with the ability to generate text content of Large Language Models (LLMs), we provide an iterative framework to generate query rewrite. The framework incorporates a 3-stage procedure in each iteration: Rewrite Generation with domain knowledge by Retrieval-Augmented Generation (RAG) and query understanding by Chain-of-Thoughts (CoT); Online Signal Collection with automatic positive rewrite update; Post-training of LLM with multi task objective to generate new rewrites. Our work (named as IterQR ) provides a comprehensive framework to generate Q uery R ewrite with both domain / real-world knowledge. It automatically update and self-correct the rewrites during iter ations. IterQR has been deployed in Meituan Delivery’s search system (China’s leading food delivery platform), providing service for users with significant improvement. 2 Introduction Search functions as the primary means for users to find desired content, especially in e-Commercial systems like Taobao, Amazon, and Meituan Delivery. These systems host billions of suppliers for each search request. While Meituan focuses more on nearby suppliers based on users’ locations (Location-based Services, LBS), the vast number of candidates necessitates a service model that delivers not only satisfactory content but also personalized and relevant suggestions, ultimately enhancing click-through and purchase likelihood. Nonetheless, it is common for user queries to be redundant, ambiguous, or incorrect. For instance, a query for “Animal cream cake” necessitates identifying both ”animal cream” and ”cake,” which may result in insufficient retrieval candidates. Typos are prevalent in queries, as in ‘‘wontom’’, which is a misspelling of ‘‘wonton’’. Such errors can severely impact search effectiveness, as the system may not recognize the intended dish. Moreover, queries that are overly general: such as simply stating ‘‘spicy’’, fail to yield precise matches, resulting in exposure primarily associated with generic restaurant titles and missing opportunities for niche cuisines like Jiangxi cuisine 1 1 1 Jiangxi cuisine is a type of Chinese cuisine known for its spiciness. . Abbreviations are also common in queries, such as ‘‘KFC’’ for Kentucky Fried Chicken or ‘‘lsf’’ for ‘‘Luosifen’’ 2 2 2 Luosifen, or river snail rice noodle, is a popular Chinese dish originating from Liuzhou in the Guangxi Zhuang Autonomous Region. This dish is known for its unique and strong aroma. . Users’ queries might include only a part of a restaurant’s title, such as “Niujie” for a barbecue restaurant named “Niujie BBQ”. This type of incomplete query can sometimes produce empty search results if the restaurant is unavailable during the search duration, leading to user frustration. Traditional retrieval methods struggle to address these challenges comprehensively. Techniques such as fuzzy matching, embedding retrieval, and query partitioning fail effectively to account for the nuanced dependencies between traditional domain knowledge—like understanding that “Niujie” implies barbecue—and common knowledge, such as recognizing typographical errors like “wontom”. Furthermore, the capability to extract relevant keywords based on query understanding is often lacking in these systems. Query rewriting emerges as a viable solution to these problems. It can enhance the clarity and relevance of user queries by transforming them into more precise representations. However, prior methods for query rewriting primarily rely on static rewrite vocabularies that are established manually. High-frequency queries may have pre-prepared rewrites, while low-frequency queries—often consisting of user errors, less common terms, or local specialties—receive little to no attention. Although LLMs facilitate automatic rewrite generation, they do not sufficiently answer a critical question: how can we determine if a specific rewrite is “good”? A ”good” rewrite should effectively retrieve not only relevant content that satisfies user queries but also additional content that interests the user. While offline and online experiments may guide the generation of rewrites, assessing the quality of each rewrite before deployment remains a significant challenge. Moreover, most existing methods generate rewrites just once, lacking mechanisms for updates and improvements. Figure 1: Workflow of IterQR : An iterative framework of 3 stages. Stage 1 initialize and generate query rewrite based on query. Prompt is designed to incorporate domain knowledge (associated interacted restaurant and cuisine. Besides, query rewrite is formulated as query understanding and process by CoT. The generated rewrites are fed to Stage 2 for online feedback collection, where the positive rewrites are utilized in Stage 3. LLM is post trained with multi-task objectives, using the positive rewrites as labels. The trained model serves to motivate new rewrites in Stage 1, prompting the continuous iteration. To address the above mentioned question comprehensively, we proposed IterQR : an iterative framework to generate query rewrites based on LLMs. As shown in Fig. 1 : each iteration involves generating query rewrites through LLMs. The prompts for this process are carefully crafted to reformulate the query rewriting task into successive stages (query understanding, correction, rewrite) employing methods like Chain-of-Thoughts (CoT). We inject domain knowledge by incorporating relevant restaurant titles and associated cuisines in the prompts, guiding LLMs to produce pertinent and context-aware content. The generated rewrites feed into our search system for deployment, enhancing user interactions and search effectiveness. In the subsequent stages, rewrites that lead to user interactions are collected as positive rewrites, serving as indicators of rewrite quality. This automatic and precise distinction of rewrite effectiveness allows us to refine our approach continually. In the final stage, we conduct post-training for the LLM using multi-task objectives to generate new rewrites, including: Rewrite Generation to reproduce the positive rewrites; Rewrite Quality to instruct LLM to distinguish whether the rewrite is “good” or not. Relevance to teach LLM with relevance information in the domain of cuisine delivery. The post-trained LLM is used to generate and motivate new rewrites in first stage, which is then evaluated in second stage. The positive rewrites are filtered and reserved. IterQR provides an iterative framework to continuously generate new rewrites with automatic evaluation. Domain knowledge and new information can be naturally incorporated during generation. The main contributions of IterQR are listed as follows: • IterQR pioneer to address the automatic evaluation of generated rewrites before final deployment, by feeding rewrites online for signal collection. • An iterative framework is adopted to motivate new rewrites, leading to dynamic update of rewrite vocabulary. • The traditional rewrite task is formulated as comprehensive query process including successive tasks of query understanding, correction, clarification and rewrite in generation, and multi-tasks post-training. 3 Related Works Query rewrite, or query expansion has long been a crucial technique to enhance the efficiency and accuracy of information retrieval and database querying. It serves as an important component for search in both general Web search (Google, Baidu) and e-Commercial search (Taobao, Meituan Delivery). The methods for query rewrite can be broadly categorized into two phases: pre-LLM methods and

Read the complete text