Abstract
Search query correction is a critical component of modern information retrieval, yet it faces a persistent tension between the efficiency of small specialized models and the semantic depth of Large Language Models (LLMs). We introduce Trigger³, a tri-modular framework designed to optimize this trade-off. By employing three adaptive triggers—Correction, LLM, and Fallback—the system intelligently routes queries to the most appropriate model. Experimental results on commercial datasets demonstrate that Trigger³ achieves state-of-the-art $F_{0.5}$ scores while invoking expensive LLM inference for fewer than 4% of queries, effectively mitigating over-correction and high operational costs.
1. Introduction
In online search environments, user queries are frequently marred by typos, phonetic errors, or missing characters. While traditional "small" models (e.g., GECToR or BART) offer high speed and low latency, they often lack the contextual reasoning required for complex errors. Conversely, LLMs possess superior semantic understanding but are prone to "over-correction" and hallucinations, particularly regarding niche domain terms or real-time events. Furthermore, the high inference cost of LLMs makes them impractical for universal application in high-traffic search engines. Trigger³ addresses these challenges by acting as an adaptive model selector that uses the right tool for each specific query.
2. The Trigger³ Framework
The Trigger³ framework consists of three specialized components that manage the correction pipeline:
- Correction Trigger (CT): A BERT-based classifier that determines if the original query is already correct. If so, the process terminates to save computation.
- LLM Trigger (LT): When a query is flagged as incorrect, it is first processed by a small model. The LT then evaluates the original query and the small model's output. If it predicts that the small model's correction is insufficient but an LLM could succeed, it triggers an LLM call.
- Fallback Trigger (FT): Serving as a safety net, the FT evaluates the final correction (from either model) against the original query. If the correction is likely to degrade search quality—common in highly specific domains—the system reverts to the user's original input.
3. Experimental Evaluation
The researchers evaluated Trigger³ using a commercial dataset of 1.4 million search logs from Kuaishou and the public QQ dataset. The framework is model-agnostic, tested with various small models (Seq2Edit, Seq2Seq) and LLMs (Qwen, Baichuan).
3.1 Performance and Efficiency
Trigger³ consistently outperformed standalone models. On the commercial dataset using GECToR, Trigger³ achieved an $F_{0.5}$ score of 74.60, compared to 62.32 for the small model and 71.30 for the standalone LLM. Crucially, when paired with BART, the framework only required LLM invocation for 3.84% of queries, demonstrating significant cost-efficiency without sacrificing accuracy.
3.2 Complementary Model Strengths
A key insight of the study is that small models and LLMs exhibit distinct failure modes. Small models often struggle with phonetic ambiguities in context, whereas LLMs may over-generalize specific entities.
4. Conclusion and Future Work
Trigger³ establishes a "do no harm" philosophy in query correction, prioritizing precision through its cascading trigger architecture. While the framework significantly reduces LLM costs and prevents over-correction, future work will focus on reducing the latency overhead of sequential triggers and integrating Retrieval-Augmented Generation (RAG) to handle real-time news and evolving domain entities more effectively.
Summary updated