MiniELM: A Lightweight and Adaptive Query Rewriting Framework for E-Commerce Search Optimization
Duy A. Nguyen, Rishi Kesav Mohan, Van Yang, Pritom Saha Akash, Kevin Chen-Chuan Chang · 2025
Read MiniELM: A Lightweight and Adaptive Query Rewriting Framework for E-Commerce Search Optimization by Duy A. Nguyen, Rishi Kesav Mohan, Van Yang, Pritom Saha Akash, Kevin Chen-Chuan Chang (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-2501-18056.txt.
Introduction
Duy Nguyen and four co-authors built MiniELM in twenty twenty-five, a lightweight framework for rewriting shoppers' search queries. E-commerce search suffers a wording gap between how users ask and how products are described. Large language models rewrite queries well but are too slow and costly to run live, so they sit offline and go stale.
Their hybrid pipeline distills a big model's skill into a small student offline, then refines it online with reinforcement learning from real-time feedback. The reward signal comes from language models simulating human judgment, avoiding manual labeling. On the Amazon ESCI data set, the system improved relevance, diversity, and adaptability of rewrites. The design targets the moving target of live retail search, where queries shift daily.
Catalog record
| CREATOR | Duy A. Nguyen, Rishi Kesav Mohan, Van Yang, Pritom Saha Akash, Kevin Chen-Chuan Chang |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 42 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2501-18056
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
MiniELM: A Lightweight and Adaptive Query Rewriting Framework for E-Commerce Search Optimization Duy A. Nguyen, Rishi Kesav Mohan, Van Yang, Pritom Saha Akash, Kevin Chen-Chuan Chang Abstract Query rewriting (QR) is a critical technique in e-commerce search, addressing the lexical gap between user queries and product descriptions to enhance search performance. Existing QR approaches typically fall into two categories: discriminative models and generative methods leveraging large language models (LLMs). Discriminative models often struggle with natural language understanding and offer limited flexibility in rewriting, while generative LLMs, despite producing high-quality rewrites, face high inference latency and cost in online settings. These limitations force offline deployment, making them vulnerable to issues like information staleness and semantic drift. To overcome these challenges, we propose a novel hybrid pipeline for QR that balances efficiency and effectiveness. Our approach combines offline knowledge distillation to create a lightweight but efficient student model with online reinforcement learning (RL) to refine query rewriting dynamically using real-time feedback. A key innovation is the use of LLMs as simulated human feedback , enabling scalable reward signals and cost-effective evaluation without manual annotations. Experimental results on Amazon ESCI dataset demonstrate significant improvements in query relevance, diversity, and adaptability, as well as positive feedback from the LLM simulation. This work contributes to advancing LLM capabilities for domain-specific applications, offering a robust solution for dynamic and complex e-commerce search environments. 1 Introduction Context. Product search is a central component of e-commerce platforms like Amazon or eBay, enabling users to discover relevant items from vast catalogs. In these platforms, users often face challenges when formulating queries, leading to suboptimal search experiences. These challenges are magnified in scenarios where users may not use precise or correct terminology, employ synonyms, or mix languages in their search phrases due to ineptitude of language proficiency. Additionally, the search terms might be misspelled or overly general, making it difficult for traditional search systems to retrieve relevant products. For example, a user may search for “dress”, which is too broad, while others might input “summer dress”, “boho maxi dress”, or “red evening gown”, each reflecting different intents but lacking clarity without additional context. As e-commerce platforms continue to grow in both scale and diversity, ensuring accurate and relevant product retrieval becomes increasingly difficult, necessitating the need for advanced query rewriting techniques. query rewriting (QR) refers to the process of transforming an input query into one or more alternative queries that are semantically similar but may be phrased differently, thereby improving the likelihood of retrieving more relevant products. In the context of e-commerce platforms, effective QR is crucial for bridging the gap between user intent and the diverse ways products can be described in the catalog (Figure 1 ). Figure 1: Overview of an E-commerce search pipeline with Query Rewriting module installed. Previous literature. Query rewriting (QR) methods can be broadly categorized into discriminative and generative approaches. Further details about existing work are provided in Appendix 2 . Discriminative methods Xu and Croft (2017) ; Mandal et al. (2019) ; Li et al. (2022) ; Shekarpour et al. (2017) ; Diaz (2016) focus on reformulating queries by identifying similar terms from a predefined query rewriting set, leveraging sparse retrieval techniques to find relevant products. For example, using traditional Information Retrieval (IR) techniques, a query like “laptop under 500” might be rewritten as “budget laptop” or “cheap laptops” by detecting semantically similar phrases. While computationally efficient, these methods face critical limitations. They often struggle with long-tail queries, where reformulation sets lack appropriate alternatives, leading to inadequate or irrelevant rewrites. Furthermore, their reliance on static, predefined mappings limits flexibility, particularly for queries with complex or ambiguous user intent. Addressing these challenges requires a more dynamic and adaptable approach capable of handling diverse user inputs. In response to these limitations, Generative methods Agrawal et al. (2023) ; Qiu et al. (2021) ; Jagerman et al. (2023) , such as those using Large Language Models (LLMs), have gained popularity due to their superior language understanding and contextual flexibility. By training on extensive corpora of query-reformulation pairs, generative models can produce diverse, contextually relevant rewrites. For instance, an LLM might reformulate the query “best wireless headphones” into alternatives like “top-rated wireless earphones” or “best Bluetooth headphones”, potentially enhancing the coverage and relevance of search results. These methods represent a significant leap forward, offering the ability to dynamically generate novel query reformulations without relying on predefined sets. However, generative methods also have their drawbacks, particularly in real-world e-commerce applications. The large-scale nature of LLMs results in high inference latency and computational costs, making real-time deployment impractical. To mitigate this, LLMs are often deployed in an “offline” manner, precomputing query rewrites for popular searches and storing them in cache memory Agrawal et al. (2023) . While this reduces latency, it introduces issues like information staleness, as the models are not continuously updated to reflect new products, trends, or user behavior. This is especially problematic in e-commerce, where product catalogs and user preferences evolve rapidly, leading to outdated or irrelevant rewrites. These challenges highlight the need for a solution that combines the language ability of LLMs with a compact, efficient, and real-time adaptable framework. The online deployment of an efficient and effective query rewriting module in e-commerce search systems remains a significant challenge for existing approaches. Ideally, such a module should retain the strong language capabilities of an LLM while being compact, resource-efficient, and practical for real-time deployment. Contribution. In this paper, we propose a novel adaptive query rewriting pipeline that effectively balances efficiency and performance, addressing the limitations of current approaches. Our solution employs a dual-phase training framework for a large language model (LLM), integrating offline and online training. In the offline phase, we leverage knowledge distillation to create a compact and efficient student model, termed the Mini E-commerce Language Model (MiniELM) , distilled from a large foundation teacher model while preserving semantic fidelity. In the online phase, MiniELM is fine-tuned using reinforcement learning with dynamic reward signals derived from simulated user feedback. This approach not only reduces inference costs but also ensures that the model aligns with and captures relevance, diversity, and user preferences in product retrievals. A key innovation of our method is the use of simulated human feedback via LLMs , replacing resource-intensive manual annotations. This mechanism effectively mimics real-world deployment scenarios while enabling scalable evaluation and continuous model refinement. Additionally, we introduce reward models that assess query rewrites on relevance, diversity, and coverage of user intent, ensuring comprehensive performance metrics. Experimental results on the Amazon ESCI dataset Reddy et al. (2022) validate MiniELM’s effectiveness across both offline and online stages, demonstrating its superiority over baseline methods. In summary, our contributions are as follows: • Propose MiniELM, a lightweight and efficient query rewriting model derived through knowledge distillation. • Introduce a two-phase training framework integrating offline knowledge distillation and online reinforcement learning. • Develop scalable reward models and leverage LLM-based simulated feedback to refine query rewriting dynamically. • Validate MiniELM through extensive experiments on the Amazon ESCI dataset, showcasing its effectiveness and superiority. 2 Related Works 2.1 Discriminative Method Discriminative methods frame query rewriting as a retrieval task, expanding original queries with relevant terms using pseudo-relevance feedback, thesaurus-based techniques, and search log-based methods. These approaches