Abstract
Medical search engines face unique challenges due to the high stakes of health-related queries and the prevalence of misleading product listings. We present AR-Med, a production-ready framework designed to enhance search relevance by integrating Large Language Models (LLMs) with Retrieval-Augmented Generation (RAG) and cross-modal verification. By distilling knowledge from a 32B parameter teacher model into a hyper-efficient 0.6B student model, AR-Med achieves a 24% absolute improvement in search accuracy while maintaining sub-10ms latency. The system has been successfully deployed on a major medical delivery platform, demonstrating significant gains in user engagement metrics.
Introduction
In the medical domain, search relevance is critical; a "close enough" result can lead to incorrect treatments or health risks. Traditional keyword-based or BERT-based systems often fail to resolve semantic ambiguity in queries (e.g., product codes like "001") or combat "traffic hijacking," where merchants use popular brand names to promote generic products. While LLMs offer the reasoning capabilities needed to solve these issues, their deployment is hindered by high latency and the risk of medical hallucinations. AR-Med addresses these challenges by grounding LLM reasoning in verified knowledge and optimizing for industrial-scale performance.
Methodology
The AR-Med framework is built upon three core pillars designed to ensure reliability, accuracy, and speed.
1. Retrieval-Augmented Framework (RAG)
To prevent hallucinations, AR-Med utilizes a two-stage RAG process. Instead of relying solely on internal model weights, the system retrieves and expands queries using verified medical knowledge bases. This process filters out noise and provides the model with the necessary context to handle complex medical terminology and specific TCM diagnoses.
2. Cross-Modal Information Matching
To counter merchant "cheating," the system incorporates multimodal analysis. Using models like Qwen2.5-VL, AR-Med extracts key attributes—such as ingredients, dosage forms, and brand names—directly from product images. These visual attributes are cross-referenced with textual descriptions to identify discrepancies, ensuring that the physical product matches the search intent.
3. Knowledge Distillation
To meet the strict <10ms latency requirements of live search, a "Teacher-Student" distillation scheme is employed. A large teacher model (Qwen3-32B) generates high-quality labels for online data, which are then used to fine-tune a compact student model (Qwen3-0.6B). This allows the system to deliver LLM-level reasoning at the speed required for processing billions of daily queries.
Datasets: LocalQSMed
The framework was evaluated using LocalQSMed, a new benchmark consisting of 4,400 query-SPU (Standard Product Unit) pairs. The dataset was annotated by 20 medical experts and covers a wide range of categories, including Chinese and Western medicines, medical devices, and nutrition products. Crucially, LocalQSMed includes "bad cases" from real-world traffic, specifically targeting common misclassifications and hallucinations found in existing systems.
Results and Discussion
AR-Med demonstrated a significant performance leap over traditional methods. Offline evaluation showed an accuracy of over 93%, representing a 24% absolute improvement over the previous BERT-based production baseline (69%).
As shown in the performance analysis, the distilled student models (e.g., Qwen3-0.6B) achieved precision levels comparable to much larger models across various medical categories. In some instances, the specialized small models outperformed general-purpose 70B parameter models, highlighting the efficacy of domain-specific distillation.
Online A/B testing on the Meituan platform confirmed these results, showing marked improvements in Click-Through Rate (CTR) and Conversion Rate (CVR). The system successfully mitigated "overthinking" in larger models by implementing consistency checks and noise filtering, ensuring that simple queries remained accurately handled.
Conclusion
AR-Med successfully bridges the gap between the reasoning power of LLMs and the rigorous demands of industrial medical search. By combining RAG, multimodal verification, and efficient distillation, the framework provides a robust solution to ambiguity and merchant manipulation. Future work will focus on refining relevance categories for "less relevant" items and expanding the benchmark to include a broader array of medical product types.
Summary updated