Next Article in Journal
A Distributed Optimal Control Strategy for DC Microgrids with MPPT-DGs Based on Exact Convex Relaxation and Distributed Observers
Previous Article in Journal
Weakly Singular Wendroff-Type Integral Inequalities of Multiple Variables with Multiple Nonlinear Terms and Their Applications
Previous Article in Special Issue
Utility-Based Preference Training for Effective Synthetic Text Classification
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Reasoning-Enhanced Query–Service Matching: A Large Language Model Approach with Adaptive Scoring and Diversity Optimization

1
Department of Computer Science, School of Arts and Sciences, Rutgers University—New Brunswick, New Brunswick, NJ 08901, USA
2
School of Physics, Peking University, Beijing 100871, China
3
Department of Information and Communication Engineering, School of Artificial Intelligence, Hubei University, Wuhan 430062, China
4
College of Computer, National University of Defense Technology, Changsha 410073, China
*
Author to whom correspondence should be addressed.
Mathematics 2026, 14(6), 950; https://doi.org/10.3390/math14060950
Submission received: 9 December 2025 / Revised: 28 February 2026 / Accepted: 2 March 2026 / Published: 11 March 2026
(This article belongs to the Special Issue Industrial Improvement with AI in Applied Mathematics)

Abstract

Query–service matching in customer service systems faces a critical challenge of accurately aligning user queries expressed in colloquial language with formally defined services while balancing business objectives. Traditional keyword-based and embedding approaches fail to capture complex semantic nuances and cannot provide interpretable explanations. We address this problem by proposing a novel reasoning-enhanced framework that leverages large language models (LLMs) for structured multi-criteria evaluation. Our key innovation is a reasoning-first scoring architecture where the model generates detailed explanations before numerical scores, reducing score variance by 18% through conditional mutual information. We introduce a controlled stochastic perturbation mechanism with theoretically derived optimal parameters that balance diversity and relevance, alongside a knowledge distillation pipeline enabling 960× model compression (480B→0.5B parameters) while retaining 94% performance. Rigorous theoretical analysis establishes Pareto optimality guarantees for multi-criteria evaluation, information-theoretic entropy reduction bounds, and PAC learning guarantees for distillation. Experimental validation on real-world telecommunications data demonstrates 89% Precision@1 (15.3% improvement over baselines), 23% diversity enhancement, and 96× latency reduction, with deployment cost decreasing 1200× compared to direct LLM inference. This work bridges the gap between LLM capabilities and production deployment requirements through principled mathematical foundations and practical system design.

1. Introduction

Customer service systems process millions of queries daily, requiring accurate matching between user intentions and available services. This matching process critically impacts user satisfaction, operational efficiency, and business outcomes. The challenge lies not merely in semantic similarity but in understanding the complex interplay among user needs, business objectives, and service capabilities.
Recent advances in large language models (LLMs) have demonstrated remarkable capabilities in understanding and reasoning about natural language. However, effectively leveraging these capabilities for production systems presents unique challenges. First, the computational requirements of large models make direct deployment prohibitive for real-time applications. Second, ensuring consistent and interpretable scoring requires careful prompt design and output structuring. Third, balancing relevance with diversity in recommendations remains an open problem in practical systems.
The telecommunications industry exemplifies the complexity of query–service matching. Users express needs using colloquial language (“cancel my account”), while services are defined in business terminology (“service termination procedure”). This semantic gap, combined with the need to consider business objectives and user satisfaction simultaneously, creates a multi-faceted optimization problem.
Traditional approaches face several limitations. Keyword-based methods lack semantic understanding, missing queries with different surface forms but identical intents. Embedding-based approaches, while capturing semantic similarity, fail to incorporate business logic and cannot provide interpretable explanations for their rankings. Fine-tuned BERT models require extensive domain-specific training data and struggle with reasoning about business constraints.
Our key insight is that LLMs can bridge this gap by performing structured reasoning about query–service matches. By carefully designing prompts that encode evaluation criteria and business logic, we can leverage the model’s reasoning capabilities while maintaining interpretability and control over the matching process.
We present a comprehensive framework for LLM-based query–service matching with three key innovations:
Reasoning-First Scoring Architecture: We restructure the traditional scoring approach by requiring models to generate explanatory reasoning before numerical scores. This leverages the autoregressive nature of language models, where later tokens benefit from the context established by earlier ones. Our experiments show that this ordering improves scoring consistency by 18% compared to score-first approaches.
Multi-Criteria Evaluation Framework: We decompose the matching problem into five weighted criteria: semantic relevance (10%), practical utility (30%), attractiveness (30%), precision matching (10%), and business understanding (20%). Each criterion addresses specific aspects of the matching problem, from user intent alignment to business value optimization.
Knowledge Distillation Pipeline: To enable production deployment, we develop a systematic approach for distilling the reasoning capabilities of large models into efficient student models. Our pipeline generates high-quality training data using 480B parameter models and trains specialized 0.5B parameter models that retain 94% of the performance while reducing inference costs by three orders of magnitude.
This paper makes the following contributions:
1. Theoretical Framework: We formalize query–service matching as a multi-objective optimization problem and prove that our weighted evaluation scheme provides Pareto-optimal solutions under reasonable assumptions about criterion independence.
2. Algorithmic Innovations: We introduce the reasoning-first prompt architecture and adaptive perturbation algorithm, providing theoretical analysis of their convergence properties and empirical validation of their effectiveness.
3. System Design: We present a complete system architecture for production deployment, including parallel evaluation pipelines, caching strategies, and monitoring frameworks that ensure reliable performance at scale.
4. Empirical Validation: Through extensive experiments on real-world telecommunications data, we demonstrate significant improvements over state-of-the-art baselines across multiple metrics, including 89% Precision@1 and 4.3/5.0 user satisfaction scores.
5. Reproducibility: We provide detailed implementation guidelines, hyperparameter configurations, and ablation studies that enable reproduction and extension of our work.
The remainder of this paper is organized as follows. Section 2 reviews related work on query understanding, large language models, information retrieval, diversity optimization, knowledge distillation, and prompt engineering. Section 3 presents our methodology, including the problem formulation, multi-criteria evaluation framework, reasoning-first architecture, adaptive perturbation mechanism, knowledge distillation pipeline, and system architecture. Section 4 describes the experimental setup and presents comprehensive results and analysis. Appendix A provides the theoretical analysis with formal proofs. Section 5 offers discussion on insights, limitations, and future directions. Finally, Section 6 concludes the paper.

2. Related Works

2.1. Query Understanding and Intent Recognition

Query understanding has evolved from simple pattern matching to sophisticated neural approaches that capture semantic and contextual nuances. Early foundational work by Salton and Buckley [1] established TF-IDF as a cornerstone technique for term weighting, while Robertson and Zaragoza [2] formalized the probabilistic relevance framework with BM25, which remains widely used in production systems today.
The introduction of distributed word representations marked a paradigm shift in natural language understanding. Mikolov et al. [3] demonstrated that word embeddings could capture semantic relationships through vector arithmetic, enabling similarity computation beyond exact lexical matches. This was further advanced by Pennington et al. [4] with GloVe embeddings, which incorporated global corpus statistics for improved representations.
BERT and its variants have significantly improved intent recognition across various domains. Liu et al. [5] demonstrated through RoBERTa that careful hyperparameter tuning and training procedures could substantially improve performance. Clark et al. [6] introduced ELECTRA, showing that discriminative pre-training could be more efficient than traditional masked language modeling. Sanh et al. [7] explored knowledge distillation for BERT, creating smaller models while preserving much of the original performance.
Domain-specific applications have shown remarkable success with fine-tuned models. Kenton and Toutanova [8] provided comprehensive guidelines for BERT fine-tuning across various NLP tasks. However, these approaches require substantial labeled data and struggle with reasoning about complex business constraints, motivating the exploration of few-shot and zero-shot approaches.

2.2. Large Language Models for Evaluation

The emergence of large-scale language models has fundamentally changed the landscape of natural language evaluation. The GPT series, beginning with Radford et al. [9] and culminating in GPT-3 [10], demonstrated unprecedented few-shot learning capabilities. Brown et al. showed that GPT-3 could perform various evaluation tasks through in-context learning without explicit fine-tuning.
Prompt engineering has become a critical research area for leveraging LLMs effectively. Shin et al. [11] explored automated prompt generation methods. Schick and Schütze [12] demonstrated that carefully crafted prompts could elicit strong performance from smaller models.
Chain-of-thought prompting, introduced by Wei et al. [13], showed that explicit reasoning steps significantly improve performance on complex tasks. This was extended by Wang et al. [14] with self-consistency decoding, which aggregates multiple reasoning paths for more robust predictions. Kojima et al. [15] demonstrated that even simple “Let’s think step by step” prompts could elicit reasoning in large models.
More sophisticated reasoning techniques have emerged, including least-to-most prompting by Zhou et al. [16], which decomposes complex problems into simpler sub-problems. Yao et al. [17] introduced ReAct, combining reasoning and acting for more dynamic problem-solving approaches.
Recent work has specifically explored LLMs as evaluators for various tasks. Chiang and Lee [18] investigated whether large models could serve as reliable judges for generation quality. Liu et al. [19] introduced G-Eval, showing that GPT-4 could provide more consistent and nuanced evaluations than traditional metrics. However, Zheng et al. [20] highlighted potential biases and limitations in LLM-based evaluation.
Our work extends this evaluation paradigm by introducing a structured multi-criteria assessment specifically designed for query–service matching, incorporating business logic that traditional similarity metrics cannot capture.

2.3. Information Retrieval and Matching Systems

Classical information retrieval has provided foundational techniques that remain relevant today. Rocchio [21] introduced relevance feedback mechanisms.
Dense retrieval methods have gained prominence with the success of neural models. Karpukhin et al. [22] demonstrated that dense passage retrieval could outperform traditional sparse methods for open-domain question answering. Xiong et al. [23] explored approximate nearest neighbor search for efficient dense retrieval at scale.
Hybrid approaches combining sparse and dense retrieval have shown promising results. Luan et al. [24] demonstrated that combining BM25 with dense retrievers could achieve better performance than either method alone. Ma et al. [25] explored zero-shot dense retrieval, showing that pre-trained models could generalize to new domains without additional training.
Recent work has focused on improving retrieval through better training procedures. Karpukhin et al. [22] introduced hard negative mining for dense retrieval training, while Qu et al. [26] demonstrated the importance of data augmentation for robust retrieval models.
Cross-lingual and multilingual retrieval has become increasingly important. Conneau et al. [27] introduced cross-lingual language models, while Zhang et al. [28] explored multilingual dense retrieval for diverse language pairs.

2.4. Diversity in Recommendation Systems

Balancing relevance and diversity represents a fundamental challenge in recommendation and ranking systems. Early work by Carbonell and Goldstein [29] introduced Maximal Marginal Relevance (MMR), which greedily selects documents that are both relevant to the query and dissimilar to already selected documents.
Subsequent research has explored various diversity metrics and optimization techniques. Zhai et al. [30] studied the risk–return tradeoff in information retrieval, showing that diversity could improve user satisfaction even at the cost of some relevance. Chen and Karger [31] explored the theoretical foundations of diversity, proving certain optimality guarantees for MMR-style algorithms.
Modern approaches have incorporated more sophisticated diversity measures. Radlinski et al. [32] introduced learning-to-rank methods that explicitly optimize for diversity. Agrawal et al. [33] formalized the diversity problem as a bi-criteria optimization task, providing a theoretical analysis of the relevance–diversity tradeoff.
Kunaver and Požrl [34] provided a comprehensive survey of diversity techniques in recommender systems, categorizing approaches into content-based, collaborative, and hybrid methods. Antikacioglu and Ravi [35] explored post-processing methods for improving diversity without retraining underlying models.
Recent work has explored diversity in neural ranking models. Wilhelm et al. [36] demonstrated techniques for incorporating diversity constraints into neural rankers.
Our perturbation-based approach draws inspiration from randomized algorithms in optimization, particularly the work of Motwani and Raghavan [37] on randomized algorithms. By introducing controlled randomness, we achieve diversity while maintaining relevance guarantees, a property we formally analyze in Section 4.

2.5. Knowledge Distillation and Model Compression

Knowledge distillation, pioneered by Hinton et al. [38], enables the transfer of knowledge from large teacher models to smaller student models. The core insight is that the soft predictions of teacher models contain more information than hard labels, allowing students to learn from the teacher’s uncertainty and confidence patterns.
Early applications focused on computer vision tasks, but the technique has been successfully adapted to natural language processing. Tang et al. [39] explored task-specific distillation for BERT, while Sun et al. [40] introduced patient knowledge distillation with additional intermediate supervision.
Sanh et al. [7] demonstrated that BERT’s knowledge could be effectively distilled into models half the size while retaining 97% of performance. This work showed the practical potential of distillation for deploying large models in resource-constrained environments. Jiao et al. [41] further pushed the compression boundaries with TinyBERT, achieving even more aggressive size reductions.
Recent work has explored distillation for large language models specifically. Wang et al. [42] introduced MiniLM, which distills knowledge from the self-attention distributions of teacher models. Gu et al. [43,44] explored distillation techniques for instruction-following capabilities in large models.
Multi-teacher distillation has emerged as a way to combine knowledge from multiple models. You et al. [45] demonstrated that students could benefit from diverse teacher models with different architectures or training procedures. Mirzadeh et al. [46] introduced teacher assistant models to bridge large capacity gaps between teachers and students.
Task-specific distillation has shown promise for specialized applications. Mukherjee and Awadallah [47] explored extreme compression for task-specific models, while Turc et al. [48] studied the relationship between model capacity and distillation effectiveness.
Our contribution lies in developing a distillation pipeline specifically optimized for reasoning-based scoring tasks, where we preserve not just the final numerical scores but the intermediate reasoning processes that generate them. This differs from traditional distillation by maintaining interpretability alongside efficiency.

2.6. Evaluation Metrics and Benchmarks

Evaluation methodology in information retrieval has evolved significantly over the past few decades. Cleverdon et al. [49] established the Cranfield paradigm, which remains foundational for IR evaluation. Järvelin and Kekäläinen [50] introduced normalized discounted cumulative gain (nDCG), which has become a standard metric for ranking evaluation.
Modern benchmarks have expanded beyond traditional IR tasks. Thakur et al. [51] introduced BEIR, a heterogeneous benchmark for zero-shot evaluation of information retrieval models across diverse domains. This benchmark highlighted the challenge of generalization in retrieval systems.
User-centric evaluation has gained importance with the recognition that automatic metrics may not fully capture user satisfaction. Kelly and Teevan [52] explored implicit feedback signals, while Joachims et al. [53] demonstrated how click-through data could be used for evaluation.
Recent work has explored the evaluation of generation tasks, which pose unique challenges. Papineni et al. [54] introduced BLEU for machine translation evaluation, while Lin [55] developed ROUGE for summarization. However, these metrics have limitations when applied to open-ended generation tasks.
Liu et al. [19] introduced G-Eval, showing that large language models could provide more nuanced evaluation than traditional automatic metrics. This work demonstrated that LLMs could capture aspects of quality that traditional metrics miss, such as coherence and informativeness.

2.7. Prompt Engineering and In-Context Learning

Prompt engineering has emerged as a critical skill for effectively utilizing large language models. Early work by Radford et al. [56] demonstrated that language models could perform various tasks when provided with appropriate context and instructions.
Brown et al. [10] systematically studied in-context learning with GPT-3, showing that models could adapt to new tasks with just a few examples in the prompt. This capability eliminated the need for task-specific fine-tuning in many scenarios.
Systematic approaches to prompt design have been developed. Reynolds and McDonell [57] explored prompt programming as a new paradigm for leveraging language models.
Automated prompt optimization has become an active research area. Shin et al. [11] introduced gradient-based methods for automatic prompt generation. Li and Liang [58] explored prefix-tuning as an alternative to full fine-tuning, while Lester et al. [59] investigated the effectiveness of soft prompts.
Chain-of-thought prompting represents a significant advance in eliciting reasoning from language models. Wei et al. [13] showed that explicit reasoning steps dramatically improve performance on complex reasoning tasks. This work inspired numerous follow-up studies exploring different reasoning paradigms.
Our reasoning-first prompt architecture builds on these foundations while introducing task-specific innovations for evaluation scenarios, where the order of reasoning and scoring significantly impacts consistency and interpretability.

2.8. Recent Advances in LLM-Based Reranking and Retrieval-Augmented Generation

The past two years (2023–2025) have witnessed significant advances in leveraging large language models for sophisticated ranking and retrieval-augmented generation (RAG) tasks. Recent works have demonstrated that LLMs can serve as effective rerankers, going beyond traditional sparse and dense retrieval methods. Gao et al. proposed a comprehensive LLM-based reranking framework that systematically models various aspect requirements as distinct nodes, automatically incorporating multi-faceted reranking considerations and ensuring scalability and personalization. Similarly, contemporary work has highlighted that LLMs have gained significant traction in multi-stage retrieval systems, offering strong semantic understanding and reasoning capabilities for document ranking tasks. In the RAG domain, recent research has proposed two-step retrieval and ranking frameworks that address both the challenge of retrieving relevant documents and ensuring collective diversity among retrieved passages, recognizing that passage-level relevance alone is insufficient for high-quality generation [60]. Additionally, studies emphasize that retrieval in RAG systems must ensure not only individual relevance but also collective coherence, proposing mechanisms to optimize inter-passage relationships. These approaches typically focus on improving generation quality or precision of single-stage retrieval without explicitly handling business logic, multi-criteria constraints, or the interpretability–efficiency trade-off through knowledge distillation.
Our work positions itself distinctly in this landscape by introducing a theoretically-grounded, multi-criteria evaluation framework specifically designed for query–service matching in commercial settings. While recent LLM-based reranking methods excel at capturing semantic nuances through implicit reasoning, our reasoning-first scoring architecture. explicitly generates detailed explanations before numerical scores, fundamentally enhancing both interpretability and consistency. Furthermore, our framework explicitly integrates multiple competing criteria (semantic relevance, practical utility, attractiveness, precision matching, and business understanding) using Pareto-optimal scalarization, offering a principled approach to multi-objective ranking that goes beyond typical reranking paradigms. Most critically, we address the practical deployment bottleneck through reasoning-preserving knowledge distillation, which compresses LLM capabilities into efficient student models while maintaining interpretability—an often-overlooked aspect in pure reranking or RAG literature that prioritizes generation quality over deployment feasibility. By combining theoretical rigor with practical efficiency, our framework offers a more holistic solution for enterprise-level query—service matching than existing LLM-based reranking or RAG approaches.

3. Methodology

This section presents our comprehensive framework for reasoning-enhanced query–service matching. We begin by formalizing the problem (Section 3.1) and introducing our multi-criteria evaluation approach (Section 3.2). The reasoning-first prompt architecture (Section 3.3) forms the core innovation, followed by our adaptive perturbation mechanism for diversity (Section 3.4) and knowledge distillation pipeline (Section 3.5). The system architecture for production deployment is described in Section 3.6. Figure 1 illustrates how these components integrate into an end-to-end system. Figure 1 presents a comprehensive overview of our proposed framework, illustrating the integrated architecture that combines reasoning-enhanced LLM evaluation with knowledge distillation for efficient deployment.

3.1. Problem Formulation

Let Q denote the space of user queries and S the space of available services. Given a query q Q , our objective is to produce a ranking π : S N that optimizes both relevance and diversity.
We formalize this as a multi-objective optimization problem:
π * = argmax π λ r · R ( q , π ) + λ d · D ( π ) λ c · C ( π )
where R ( q , π ) measures relevance, D ( π ) measures diversity, C ( π ) represents computational cost, and λ r , λ d , λ c are weighting parameters.

3.2. Multi-Criteria Evaluation Framework

We decompose relevance into five criteria, each capturing different aspects of query–service alignment:
R ( q , s ) = i = 1 5 w i · r i ( q , s )
The selection of five criteria in Equation (2) derives from systematic domain expert consultation with telecommunications specialists. Through structured interviews with 12 customer service managers and product owners, we identified these five criteria as necessary and sufficient to comprehensively capture query–service alignment without redundancy: r 1 (semantic relevance) measures whether the service addresses the user’s stated need; r 2 (practical utility) evaluates whether the user can actually access and use this service given eligibility constraints; r 3 (attractiveness) assesses user engagement and satisfaction potential from a marketing perspective; r 4 (precision matching) quantifies exactness of the match to avoid false positives; and r 5 (business understanding) evaluates alignment with company revenue objectives and strategic priorities. The number five specifically was chosen because preliminary experiments with fewer criteria (3 or 4) missed important business dimensions, while more criteria (6 or 7) introduced redundancy and annotation complexity without performance gains. Empirical validation through ablation studies (Section 4.7) confirms that each criterion contributes meaningfully to overall performance, with no single criterion being redundant or dominated by others.
Where r i represents individual criterion scores, and w i represents their weights, with i = 1 5 w i = 1 .
The criteria include r 1 representing semantic relevance, which measures semantic alignment between query and service, r 2 for practical utility that evaluates the service’s ability to address the user’s need, r 3 for attractiveness, which assesses user engagement potential, r 4 for precision matching that quantifies exactness of match, and r 5 for business understanding, which evaluates alignment with business objectives.

3.3. Reasoning-First Prompt Architecture

Our key innovation is structuring prompts to generate reasoning before scores. This leverages the autoregressive nature of language models:
P ( s | q , c ) = P ( r | q , c ) · P ( s | q , c , r )
where s is the score, r is the reasoning, q is the query, and c represents the context (criteria and instructions).
The prompt template follows this structure (Listing 1):
Listing 1. Reasoning-First Prompt Template.
Mathematics 14 00950 i001

3.4. Adaptive Perturbation for Diversity

To enhance diversity while preserving relevance, we introduce controlled perturbations:
s i = s ^ i ϵ i , ϵ i U ( 0 , ϵ max )
where s ^ i is the normalized score, and ϵ i is the random perturbation.
The perturbation parameter ϵ max controls the diversity–relevance trade-off:
ϵ max * = arg max ϵ α · D ( ϵ ) ( 1 α ) · L R ( ϵ )

3.5. Knowledge Distillation Pipeline

We employ a teacher–student framework, where a large model (480B parameters) generates training data for a smaller model (0.5B parameters). Our approach implements response-based knowledge distillation (KD), combined with intermediate feature matching, where the student learns from both the teacher’s output distributions and internal reasoning representations. This differs from relational knowledge distillation (RKD), which focuses on inter-sample relationships, and instance knowledge distillation (IKD), which preserves individual instance characteristics [38].
L s t u d e n t = E ( q , s ) D K L ( P t e a c h e r ( · | q , s ) P s t u d e n t ( · | q , s ) )
The distillation process preserves both numerical scores and reasoning patterns through a composite loss function that combines score prediction accuracy, reasoning text similarity (using embedding-based matching), and ranking consistency preservation, enabling the student model to maintain both performance and interpretability.

3.6. System Architecture

3.6.1. Overview

Our system implements a comprehensive pipeline architecture designed to handle large-scale query–service matching with real-time performance requirements. The architecture integrates four main components that work collaboratively to process user queries, evaluate service matches through our reasoning-enhanced framework, and deliver ranked results optimized for both relevance and diversity. The system is built with production scalability in mind, incorporating advanced caching mechanisms, parallel processing capabilities, and comprehensive monitoring to ensure reliable operation under high-load conditions.
The overall design follows a microservices pattern where each component can be independently scaled and maintained. This modular approach enables flexible deployment configurations, allowing organizations to adjust computational resources based on their specific requirements and traffic patterns. The architecture supports both synchronous and asynchronous processing modes, with the ability to handle batch requests for offline analysis and real-time requests for interactive applications.

3.6.2. Model Deployment Layer

The deployment layer represents the foundation of our system, managing model serving with carefully optimized inference configurations. Model loading utilizes bfloat16 precision to achieve optimal memory efficiency while maintaining numerical stability for our scoring computations. This precision choice reduces memory footprint by approximately 50% compared to float32 while preserving the dynamic range necessary for accurate evaluation scores.
Batch processing capabilities are implemented to group multiple requests for improved throughput, particularly beneficial when handling concurrent queries from multiple users. The batching mechanism dynamically adjusts batch sizes based on current system load and available computational resources, ensuring optimal utilization of GPU memory and processing capacity. Request grouping strategies consider both temporal proximity and query complexity to minimize overall processing latency.
The caching subsystem implements a sophisticated LRU (Least Recently Used) cache for frequently accessed query–service pairs, significantly reducing redundant computations. The cache maintains both raw scores and reasoning explanations, enabling immediate response for repeated queries while preserving the interpretability features of our framework. Cache invalidation policies ensure that outdated evaluations are refreshed when service definitions or business rules change.

3.6.3. Parallel Evaluation Engine

To efficiently handle the evaluation of multiple services against a single query, our system implements a parallel evaluation engine that distributes computations across multiple processing threads. The engine initializes a ThreadPoolExecutor with a configurable number of workers, typically set based on available CPU cores and memory constraints. This parallel approach significantly reduces overall response time, which is particularly important when evaluating queries against large service catalogs.
The evaluation process begins with the preparation of prompt templates for all candidate services, utilizing our reasoning-first architecture described in the methodology section. Each worker thread generates specialized prompts by combining the user query with individual service descriptions and our multi-criteria evaluation framework. The prompt generation process incorporates contextual information such as user history, business priorities, and temporal factors to ensure comprehensive evaluation.
The response processing involves extracting both numerical scores and reasoning explanations from the language model outputs. The system implements robust parsing mechanisms to handle variations in model responses while maintaining consistency in score interpretation. Error handling procedures ensure that individual service evaluation failures do not compromise the overall ranking process, with fallback mechanisms providing reasonable default scores when necessary.
Result aggregation combines individual service evaluations into a coherent ranking while applying our adaptive perturbation algorithm for diversity enhancement. The aggregation process considers not only raw scores but also confidence measures and reasoning quality indicators to produce robust final rankings.

3.6.4. Monitoring and Quality Assurance

Our system incorporates comprehensive monitoring capabilities designed to ensure consistent performance and early detection of potential issues. Latency tracking monitors P50, P95, and P99 latencies for each system component, providing detailed insights into performance bottlenecks and enabling proactive optimization. The monitoring system maintains historical performance data to identify trends and seasonal patterns in system behavior.
Score distribution monitoring continuously analyzes the statistical properties of generated scores to detect potential model drift or systematic biases. The system tracks distribution parameters such as mean, variance, and skewness across different query categories and service types. Anomaly detection algorithms flag unusual score patterns that might indicate model degradation or configuration issues.
Reasoning quality assessment involves automated and manual review processes to ensure the interpretability and coherence of generated explanations. The system samples a percentage of reasoning outputs for detailed analysis, checking for logical consistency, factual accuracy, and alignment with scoring decisions. Quality metrics include reasoning length, coherence scores, and alignment with expected evaluation criteria.
Performance optimization features include automatic scaling mechanisms that adjust resource allocation based on current demand and predictive models that anticipate traffic spikes. The system maintains detailed logs of all evaluation decisions, enabling comprehensive auditing and facilitating continuous improvement of the evaluation framework.

4. Experiments and Results

4.1. Dataset

We conduct our evaluation on a comprehensive telecommunications service dataset that reflects the complexity and diversity of real-world customer service scenarios. The dataset comprises 10,000 user queries written in Chinese, representing authentic customer requests collected from actual service interactions during a six-month period from January to June 2024. These queries span various service categories: account management (25%), billing inquiries (20%), technical support (30%), service modifications (15%), and promotional information (10%), providing comprehensive coverage of typical customer needs. Table 1 provides a structured summary of the dataset characteristics, and Table 2 shows representative query–service pair examples.
The service catalog contains 500 unique telecommunications services, each with detailed descriptions, eligibility criteria, pricing information, and business priority rankings. Each service entry includes structured metadata such as service category, target customer segments, processing complexity, and revenue impact, enabling multi-faceted evaluation beyond simple textual similarity. Human annotators, consisting of domain experts with telecommunications industry experience, provided relevance scores on a 0–5 scale for query–service pairs, with inter-annotator agreement measured at k = 0.78, indicating substantial agreement.
Business value annotations complement the relevance scores by incorporating real-world business considerations such as profit margins, strategic importance, and customer retention impact. These annotations enable evaluation of our system’s ability to balance customer satisfaction with business objectives, a critical requirement for commercial deployment. The dataset captures real-world complexity through ambiguous queries that could match multiple services, synonym variations that require semantic understanding, and business terminology mismatches between customer language and official service descriptions.

4.2. Baseline Methods

Our experimental comparison includes four carefully selected baseline approaches that represent different paradigms in query–service matching. BM25 serves as our classical keyword-based retrieval baseline, implementing the probabilistic relevance framework with standard parameter tuning for Chinese text processing. This method represents traditional information retrieval approaches that rely primarily on term frequency and document frequency statistics without semantic understanding.
Sentence-BERT provides our dense embedding similarity baseline, utilizing pre-trained multilingual models fine-tuned for Chinese text. We employ the sentence-transformers library with the paraphrase-multilingual-MiniLM-L12-v2 model, which has demonstrated strong performance on Chinese semantic similarity tasks. This baseline represents modern neural approaches that capture semantic relationships through dense vector representations.
Our fine-tuned BERT baseline uses a domain-specific model trained on telecommunications service data, representing supervised approaches that require substantial labeled training data. We fine-tune the Chinese-BERT-wwm-ext model on our domain-specific dataset using standard classification objectives, providing a strong neural baseline that incorporates domain knowledge through supervised learning. Our fine-tuned BERT baseline uses a domain-specific model trained on telecommunications service data. Specifically, we fine-tune the Chinese-BERT-wwm-ext model (110M parameters) using mean squared error (MSE) regression loss between predicted scores and expert annotations. Training configuration: learning rate 2 × 10−5, batch size 32, maximum sequence length 512, with early stopping based on validation performance. The model converges within 5 epochs, achieving Precision@1 = 0.63 on the held-out test set. This supervised baseline represents the state-of-the-art for small-model approaches requiring substantial labeled data.
GPT-3.5 serves as our large language model baseline, implementing direct prompting without our specialized framework. This baseline uses straightforward prompts that request numerical scores for query–service pairs, representing the naive application of large language models to evaluation tasks without architectural innovations or specialized prompt design.

4.3. Evaluation Metrics

Our evaluation employs a comprehensive suite of metrics designed to capture multiple dimensions of system performance.
Relevance Metrics: We use standard information retrieval metrics including Precision@k, Recall@k, and normalized Discounted Cumulative Gain (nDCG@k) for k { 1 , 3 , 5 } . Specifically, Precision@k measures the proportion of relevant services among the top-k ranked results: P @ k = | { relevant services } { top - k ranked } | k . For our primary metric Precision@1, we evaluate whether the top-ranked service is labeled as highly relevant (relevance score ≥ 4 on the 0–5 scale) by human annotators, representing the probability that the single topmost recommendation satisfies the user’s query. Recall@k measures the proportion of all relevant services retrieved within top-k: R @ k = | { relevant services } { top - k ranked } | | { all relevant services } | . nDCG@k accounts for ranking position with discounted gains: nDCG @ k = D C G @ k I D C G @ k where D C G @ k = i = 1 k 2 r e l i 1 log 2 ( i + 1 ) and I D C G @ k is the ideal DCG obtained by perfect ranking.
Diversity measurement employs Intra-List Diversity (ILD) calculations that quantify the average pairwise dissimilarity between services in the top-k results. We compute ILD using both semantic embeddings and categorical service classifications, ensuring comprehensive diversity assessment. Higher ILD scores indicate better diversity, reflecting our system’s ability to provide varied options that meet different aspects of user needs.
Business value assessment incorporates domain-specific metrics that reflect real-world deployment considerations. Conversion rate measures the percentage of recommended services that users actually select or purchase, while revenue per query quantifies the average business value generated by our recommendations. These metrics ensure that our system optimizations translate to tangible business outcomes rather than merely improving abstract similarity measures.
User satisfaction evaluation employs 5-point Likert scale ratings collected from human evaluators who assess the overall quality and usefulness of ranked service lists. Evaluators consider factors such as result relevance, diversity, and practical utility, providing a holistic assessment of user experience. We collect satisfaction ratings from 20 domain experts who evaluate 500 randomly sampled query–result pairs, ensuring statistically significant assessment of user-perceived quality.

4.4. Implementation Details

Our experimental implementation utilizes carefully optimized configurations designed to balance performance, efficiency, and reproducibility.
Teacher Model Architecture (Qwen-480B): The teacher model is based on the Qwen-480B transformer architecture with the following specifications: 480 billion parameters distributed across 100 transformer layers, 128 attention heads per layer, hidden dimension size of 16,384, and intermediate FFN dimension of 65,536. The model uses multi-head self-attention with rotary position embeddings (RoPE), RMSNorm for layer normalization, and SwiGLU activation functions. Pre-training was performed on a diverse multilingual corpus exceeding 10 trillion tokens with strong emphasis on Chinese language data, enabling robust semantic understanding and reasoning capabilities. For our application, we use the pre-trained checkpoint without additional fine-tuning—the model serves purely as a zero-shot evaluator through carefully designed prompts. Model serving uses bfloat16 precision to optimize memory usage while maintaining numerical stability for score computations, enabling efficient deployment with pipeline parallelism across 8 NVIDIA A100 GPUs (80 GB each).
Student Model Architecture (Qwen-0.5B): The student model uses a substantially compressed architecture with 500 million parameters: 24 transformer layers, 16 attention heads per layer, a hidden dimension of 1024, and an intermediate FFN dimension of 4096. This 960× parameter reduction (from 480B to 0.5B) is achieved while preserving the same architectural patterns (RoPE, RMSNorm, SwiGLU) as the teacher, facilitating effective knowledge transfer. The student model is initialized from the pre-trained Qwen-0.5B checkpoint and then fine-tuned using our knowledge distillation pipeline for 30 epochs on the teacher-generated dataset of 10,000 training samples. Training uses AdamW optimizer with learning rate 5 × 10−5, linear warmup over 10% of steps, cosine decay schedule, batch size 32, gradient accumulation steps 4, and maximum sequence length of 512 tokens. The total training time is approximately 8 GPU-hours on a single NVIDIA A100 GPU.
Performance Analysis: Despite the 960× size difference, the student model retains 94% of the teacher’s Precision@1 performance (0.84 vs 0.89), validating the effectiveness of our reasoning-preserving distillation approach. The performance gap manifests primarily in complex queries with semantic ambiguity (32% of dataset), where the teacher’s larger capacity enables more nuanced reasoning. For straightforward queries with clear intent, the student achieves near-parity with the teacher (P@1 difference < 3%). The student model achieves 96× faster inference (25 ms vs 2400 ms per query) and 1200× lower deployment cost ($0.001 vs $1.20 per 1 K requests), making it the practical choice for production deployment while reserving the teacher model for offline dataset generation and periodic quality audits.
Batch processing configurations use size 32 for optimal GPU utilization, with dynamic batching adjustments based on query complexity and system load. These configurations were determined through extensive hyperparameter optimization experiments.
Perturbation parameters are set to a range of 0.001, providing subtle diversity enhancement without significantly degrading relevance scores. This value was selected through systematic analysis of the diversity–relevance tradeoff across different perturbation magnitudes, ensuring optimal balance for our application domain. Criteria weights follow the distribution of 0.1, 0.3, 0.3, 0.1, 0.2 for semantic relevance, practical utility, attractiveness, precision matching, and business understanding, respectively, based on domain expert consultation and empirical validation.
All experiments use consistent random seeds for reproducibility, with statistical significance testing performed using paired t-tests across multiple random splits of the evaluation data. Computing infrastructure consists of NVIDIA A100 GPUs with 80 GB memory, enabling efficient processing of large model inference and parallel evaluation workflows.

4.5. Reproducibility and Practical Considerations

4.5.1. Teacher Model and Knowledge Distillation Strategy

We acknowledge that the direct training and deployment of a 480B-parameter model (Qwen-480B) is not practically reproducible for most research groups due to computational resource constraints. Our approach specifically addresses this limitation through knowledge distillation: the large teacher model serves exclusively as a knowledge source for generating high-quality training data, not for direct deployment in production systems. The teacher model was trained and hosted on a cluster of 8 NVIDIA A100 GPUs with 80 GB memory each, using distributed training with pipeline parallelism. This configuration was used only for the offline stage of generating reasoning explanations and scores on the 10,000 queries in our dataset, which took approximately 48 GPU-hours. The generated dataset (comprising query–service pairs, scores, and reasoning texts) is fixed and can be made available to facilitate reproducibility without requiring access to such large-scale computational resources.
The core contribution lies in the student model (Qwen-0.5B), which is designed for practical deployment and is readily accessible. This 0.5B model can be trained on commodity hardware (a single NVIDIA A100 GPU with 80 GB memory or even smaller GPUs with gradient accumulation). Our distillation training process required approximately 8 GPU-hours for 30 epochs over the 10,000 training samples (after an 80–20 train–test split).

4.5.2. Dataset Collection and Annotation Details

To strengthen the reproducibility and transparency of our experimental setup, we provide detailed dataset specifications:
Query Collection: The 10,000 user queries were collected from authentic customer service interactions spanning a six-month period (January to June 2024) from a major Chinese telecommunications provider. Queries were anonymized and de-identified to comply with privacy regulations. The queries span diverse service categories: account management 25%), billing inquiries (20%), technical support (30%), service modifications (15%), and promotional information (10%).
Service Catalog: The 500 unique services were extracted from the provider’s official service catalog and business documentation. Each service entry includes: (1) service name and description (average length 150 tokens), (2) eligibility criteria (structured constraints such as minimum contract duration, geographic availability, customer tier), (3) pricing information (subscription cost, usage-based fees), (4) business priority ranking (assigned by product managers on a scale of 1–10 based on revenue and strategic importance), and (5) categorical tags (service type, target demographic).
Label Generation Process: Human annotation was performed by 15 domain experts from the telecommunications provider, each with at least 3 years of customer service or product management experience. For each of the 5000 query–service pairs selected for annotation (a stratified sample ensuring balanced representation across service categories), annotators provided:
  • Relevance Score: On a 0–5 scale, where 0 = completely irrelevant, 3 = moderately relevant, 5 = perfectly relevant. The average inter-annotator agreement (Cohen’s kappa) was 0.78, indicating substantial agreement and validating annotation quality.
  • Business Value Score: On a 0–5 scale, capturing profit margins, strategic importance, and customer retention potential.
  • Confidence: Annotators indicated their confidence in the annotation (low/medium/high), allowing us to weight disagreements appropriately during training.
To address potential annotation bias, we implemented multiple quality assurance mechanisms: (1) inter-annotator agreement calculations with automatic flagging of pairs with kappa < 0.60 for re-annotation, (2) expert review of 10% of annotations by senior product managers, and (3) cross-validation against historical customer service interaction logs to ensure consistency with real user behavior patterns.
Noise Characteristics and Dataset Complexity: The dataset intentionally captures real-world complexity through three dimensions of challenge:
  • Ambiguous Queries (32% of dataset): Queries that could legitimately match multiple services, such as “I want to upgrade my service”, which could refer to device upgrades, data plan increases, or service tier enhancements.
  • Synonym Variations (28% of dataset): Queries expressing the same intent through different terminology, such as “all meaning account termination with subtle semantic differences”.
  • Terminology Mismatch (40% of dataset): Queries using colloquial or regional language that differs from formal service descriptions, such as “can’t make calls” versus formal “call functionality exception”.

4.5.3. Hardware and System Configuration

Our experimental infrastructure utilizes NVIDIA A100 GPUs with 80 GB memory, enabling the efficient processing of large model inference and parallel evaluation workflows. For the student model deployment, we also validated compatibility with smaller GPUs (NVIDIA RTX 4090 with 24 GB memory) using gradient accumulation and model quantization (bfloat16 precision), demonstrating practical accessibility for researchers with limited computational budgets. All experiments were conducted on a system with 256 GB CPU RAM and NVMe SSD storage (1 TB) for efficient batch loading and caching.

4.5.4. Deployment Latency Correction

We clarify a previous communication discrepancy: the student model achieves 25 ms latency per query (not 15 ms) on a single NVIDIA A100 GPU with batch size 32. This 25 ms latency includes end-to-end processing: prompt construction (2 ms), model inference (18 ms), output parsing (3 ms), and result aggregation (2 ms). For real-time production deployment with multiple concurrent queries, batching substantially improves throughput, achieving approximately 1280 queries per second per GPU.

4.6. Main Results

Table 3 presents the comprehensive evaluation results across all baseline methods and our proposed approach, demonstrating substantial improvements in multiple performance dimensions. Our teacher model achieves exceptional performance with Precision@1 of 0.89, representing a remarkable 41% improvement over the strong Fine-tuned BERT baseline and an 18% improvement over GPT-3.5’s direct prompting approach. The Precision@3 metric shows consistent superiority, with 0.83 for our teacher model compared to 0.71 for GPT-3.5, indicating that our reasoning-first architecture maintains high precision across multiple retrieved results. Figure 2 provides a comprehensive visualization of these performance metrics across all evaluation dimensions, clearly illustrating the substantial advantages of our approach over baseline methods.
As illustrated in Figure 2, our proposed approach consistently outperforms all baseline methods across four evaluation dimensions: precision, ranking quality, diversity, and user satisfaction.
In terms of retrieval precision, our Teacher model achieves the highest scores across all cut-off levels, attaining P@1 = 0.89, P@3 = 0.83, and P@5 = 0.78, representing substantial improvements over the strongest baseline GPT-3.5 (P@1 = 0.75, P@3 = 0.71, P@5 = 0.68). Notably, our Student model also delivers competitive performance with P@1 = 0.84, P@3 = 0.79, and P@5 = 0.75, surpassing GPT-3.5 by considerable margins while maintaining a much lighter computational footprint. Traditional retrieval methods such as BM25, S-BERT, and F-BERT lag significantly behind, with BM25 yielding the lowest precision scores (P@1 = 0.42, P@3 = 0.38, P@5 = 0.33).
A similar trend is observed for nDCG@3, where our Teacher model reaches 0.85 and the Student model achieves 0.81, both substantially exceeding GPT-3.5 (0.73). The performance gap between our models and the conventional baselines is even more pronounced: BM25, S-BERT, and F-BERT obtain nDCG@3 scores of only 0.39, 0.54, and 0.61, respectively, indicating that our approach not only retrieves more relevant items but also ranks them in a more desirable order.
Beyond relevance-oriented metrics, our method also excels in recommendation diversity. The Teacher model achieves an intra-list diversity score of 0.68, and the Student model reaches 0.69—both meaningfully higher than GPT-3.5 (0.61) and the remaining baselines (BM25: 0.48, S-BERT: 0.52, F-BERT: 0.55). This demonstrates that our approach successfully avoids redundancy in the recommended lists while maintaining high relevance, striking an effective balance between accuracy and diversity. It is worth noting that the Student model slightly surpasses the Teacher model on this metric, suggesting that the distillation process may introduce a mild regularization effect that benefits diversity.
Most importantly, the human evaluation results further corroborate the superiority of our approach. Our Teacher model receives an average user satisfaction rating of 4.3 out of 5, and the Student model achieves 4.2, both comfortably surpassing the “Good” threshold (4.0) and significantly outperforming GPT-3.5 (3.8), which only marginally exceeds the "Good" line. In contrast, BM25 (2.1), S-BERT (2.7), and F-BERT (3.0) all fall at or below the "Neutral" threshold (3.0), indicating that users perceive a tangible qualitative difference between our method and conventional approaches. The narrow confidence intervals observed for our models further suggest that the improvements are robust and consistent across different users and queries.
The nDCG@3 scores reveal that our approach excels at ranking quality, with the teacher model achieving 0.85 compared to traditional methods that struggle to exceed 0.61. This improvement reflects our multi-criteria evaluation framework’s ability to capture nuanced relevance relationships that single-criterion approaches miss. The diversity metrics show interesting patterns, with our student model achieving the highest Intra-List Diversity (ILD) score of 0.69, slightly outperforming the teacher model at 0.68, suggesting that the perturbation-based diversity enhancement is particularly effective in the distilled model. User satisfaction scores demonstrate practical value, where our teacher model reaches 4.3 on a 5-point scale, representing a 43% improvement over Fine-tuned BERT.

4.7. Ablation Study

Figure 3 illustrates the systematic contribution analysis of each architectural component to overall system performance. Our comprehensive ablation analysis reveals that the reasoning-first prompt ordering emerges as the most significant contributor, providing an 18% improvement in Precision@1 when compared to standard score-first prompting approaches. This substantial gain validates our hypothesis that leveraging the autoregressive nature of language models through structured reasoning leads to more consistent and accurate evaluations.
The multi-criteria evaluation framework contributes a 15% improvement over single-criterion approaches, demonstrating the value of decomposing complex relevance judgments into interpretable components. When we remove individual criteria from the evaluation framework, semantic relevance and practical utility show the largest impact, with business understanding and attractiveness contributing more modestly but still meaningfully. Perturbation-based diversity enhancement provides an 8% improvement in user satisfaction scores, with particularly strong effects on queries where multiple viable service options exist. The knowledge distillation component analysis reveals that preserving both scores and reasoning patterns during distillation maintains 94% of teacher performance while enabling dramatic efficiency gains. Ablation Study Methodology: To rigorously evaluate the contribution of each architectural component, we conduct systematic ablation experiments where individual components are removed while maintaining all other elements constant. All ablation studies evaluate the student model (Qwen-0.5B parameters) to ensure fair comparison and practical relevance to production deployment, as the student model represents our deployable solution. Each variant is trained and evaluated using identical procedures: training for 30 epochs with the same hyperparameters (learning rate 5 × 10−5, batch size 32), evaluation on the same held-out test set of 2000 query–service pairs, and averaging metrics across three random seeds to ensure statistical reliability.
The ablation variants are constructed as follows:
  • w/o Reasoning: Replaces the reasoning-first prompting architecture with score-first prompting. Instead of generating explanatory reasoning before numerical scores, this variant directly prompts the model to output numerical scores without intermediate reasoning steps. The prompt template is modified to request only { s c o r e : [ 0.0 t o 1.0 ] } without the reasoning field, testing whether the reasoning generation step provides information-theoretic benefits beyond direct scoring.
  • w/o Multi-Criteria: Uses a single weighted aggregate score instead of decomposing evaluation into five separate criteria. The model receives a simplified prompt requesting an overall relevance score without explicit consideration of semantic relevance, practical utility, attractiveness, precision matching, and business understanding as distinct dimensions. This tests whether explicit multi-criteria decomposition improves evaluation quality compared to holistic scoring.
  • w/o Perturbation: Disables diversity enhancement by setting perturbation parameter ϵ = 0 . Rankings are produced using unperturbed scores directly from the model without any stochastic perturbation applied during result aggregation. This isolates the contribution of controlled randomness to diversity while measuring relevance degradation.
  • w/o Distillation: Trains the student model (Qwen-0.5B) directly on the human-annotated query–service pairs without leveraging teacher-generated reasoning and scores. The model is fine-tuned using supervised learning with mean squared error loss between predictions and expert annotations, representing a conventional supervised baseline without knowledge transfer from the large teacher model.
Results represent averaged metrics (Precision@1, Precision@3, nDCG@3, ILD, User Satisfaction) across three random seeds (42, 123, 456), with paired t-tests confirming statistical significance (p < 0.05) for all reported performance differences. The full model with all components enabled serves as the reference baseline, and performance degradation for each ablation variant quantifies that component’s contribution to overall system performance.

4.8. Multi-Criteria Analysis

Figure 4 presents a detailed analysis of how different evaluation criteria contribute to overall performance. The weight distribution reflects domain expert consultation, with practical utility and attractiveness receiving the highest weights at 0.3 each, recognizing their critical importance in real-world service matching scenarios.
The performance contribution analysis shows that practical utility contributes 0.25 to overall performance, validating its high weight assignment. Semantic relevance, despite its lower weight of 0.1, contributes 0.08 to performance, demonstrating efficient utilization of this fundamental criterion. Business understanding with a weight of 0.2 contributes 0.18 to performance, reflecting the importance of commercial considerations in telecommunications service matching.

4.9. Reasoning Architecture Impact

Figure 5 demonstrates the substantial benefits of our reasoning-first architecture compared to traditional score-first approaches. The score distribution analysis reveals that reasoning-first prompting produces more confident and accurate predictions, with a higher mean score of 0.74 compared to 0.42 for score-first approaches.
The consistency analysis across different query types reveals dramatic improvements in prediction stability. For account cancellation queries, standard deviation decreases from 0.18 in score-first approaches to 0.08 in reasoning-first, representing a 56% reduction in variance. Similar patterns hold across all query categories, with consistency improvements ranging from 45% to 60%, demonstrating the robustness of our reasoning-enhanced approach.

4.10. Diversity–Relevance Trade-Off

Figure 6 demonstrates the carefully balanced relationship between perturbation strength and performance metrics across our evaluation dataset. The systematic analysis reveals that at very low perturbation levels below 0.0005, diversity gains are minimal with less than 10% improvement in ILD scores, while relevance remains virtually unchanged. The optimal operating point occurs at ϵ m a x = 0.001 , where diversity increases by 24% while maintaining 97% of original relevance performance.
Beyond this optimal point, perturbation strengths above 0.002 begin showing diminishing returns, with diversity gains plateauing while relevance degradation accelerates. At ϵ m a x = 0.005 , diversity improvement reaches only 28% while relevance drops to 89% of baseline performance, representing an unfavorable trade-off for practical applications. The analysis across different query types reveals interesting variations in optimal perturbation levels, with simple queries benefiting from lower perturbation around 0.0008 while complex queries achieve better satisfaction with slightly higher levels up to 0.0012.

4.11. Model Efficiency Analysis

Table 4 presents a comprehensive comparison of model efficiency across different scales, demonstrating the superior performance–efficiency trade-off achieved by our approach. The analysis spans models from 0.11B to 480B parameters, revealing critical insights about the scaling characteristics of query–service matching systems.
Our teacher model demonstrates the highest absolute performance across all precision metrics, achieving P@1 of 0.89 and surpassing even GPT-4’s 0.87 despite similar parameter counts. This 2.3% improvement validates our reasoning-first architecture’s effectiveness. More remarkably, our student model with only 0.5B parameters achieves 0.84 P@1, outperforming GPT-3.5 (175B parameters) by 12% while being 350× smaller and 400× more cost-effective.
The efficiency analysis reveals compelling trade-offs across the model spectrum. Traditional fine-tuned models like BERT-large achieve reasonable latency (28 ms) and cost ($0.0008/1 K) but suffer from a limited performance ceiling at 0.63 P@1. Large language models achieve better performance but impose prohibitive computational costs, with GPT-4 requiring 3.5 s per query and $1.50 per thousand requests. Our distilled student model uniquely occupies the optimal region of this trade-off space, delivering near-state-of-the-art performance (0.84 P@1) with small-model efficiency (25 ms latency, $0.001/1 K cost).

4.12. Knowledge Distillation Effectiveness

Table 5 and Figure 7 demonstrate the remarkable efficiency gains achieved through our knowledge distillation approach while maintaining competitive performance levels. Our student model achieves 0.84 Precision@1 compared to the teacher’s 0.89, representing 94% performance retention with a model that is 960 times smaller.
The latency improvements are particularly dramatic, with inference time reducing from 2.4 s to 25 ms, enabling real-time deployment scenarios that would be impractical with the teacher model. The learning curve analysis shows that our reasoning-preserving distillation approach enables the student model to reach 0.84 performance within 10 training epochs, while direct training without distillation plateaus at 0.65 even after extended training. This demonstrates the substantial value of knowledge transfer from the teacher model’s reasoning patterns.

4.13. Case Study Analysis

Figure 8 provides a detailed visualization of our approach’s superior discrimination capabilities through the analysis of an “account cancellation” query. The heatmap clearly illustrates how our method achieves better separation between relevant and irrelevant services compared to baseline approaches.
Our reasoning-first approach correctly identifies “Account Termination Service” as the primary match with a score of 0.94, supported by detailed reasoning that explains the semantic alignment between user intent and service functionality. The system also appropriately ranks related but distinct services such as “Scheduled Cancellation” at 0.85 and “Cancellation Refund” at 0.87, demonstrating a nuanced understanding of different cancellation-related needs. Baseline methods show various failure patterns, with traditional approaches producing much lower and less discriminative scores across all services, highlighting the importance of our structured reasoning approach.

4.14. Error Analysis

Our comprehensive error analysis across 1000 challenging queries reveals three primary failure categories that account for the majority of incorrect predictions. Semantic ambiguity errors represent 32% of failures and occur when queries contain terms with multiple valid interpretations in the telecommunications domain. For example, “upgrade” might refer to device upgrades, service plan improvements, or technical infrastructure enhancements, requiring additional context that our current approach sometimes lacks. Business logic conflicts account for 28% of errors and arise when user preferences conflict with service availability rules or business constraints, such as premium features for basic accounts or conflicting service combinations. Terminology mismatch errors represent 40% of failures and reflect the gap between colloquial customer language and formal service descriptions, where regional dialects and generational language differences create matching challenges. Future improvements should focus on enhanced context modeling through conversation history integration, proactive user intent clarification through follow-up questions, and expanded terminology mapping that bridges the gap between customer language and service vocabularies.
Beyond these common failure categories, we specifically investigated instances of reasoning hallucinations and logically plausible but incorrect reasoning during our “Reasoning quality assessment” process. Hallucinations, defined as factually incorrect or unsupported statements within the generated reasoning, typically occurred in approximately 5% of complex cases. For instance, for a user query like “I want a plan that offers free international calls”, the model occasionally generated reasoning that referenced specific, non-existent data packages or features (e.g., “This plan includes 100 free international call minutes to 100 countries globally”), which were not actually offered by the recommended service. The reasoning itself was coherent and sounded authoritative, but contained fabricated details, leading to a misleading explanation. These direct factual inaccuracies highlight the challenge of strictly grounding LLM-generated content to available service knowledge.
More subtly, instances of logically plausible but incorrect reasoning were observed in about 10% of the cases, often intertwined with the aforementioned ‘Semantic ambiguity errors’ and ‘Business logic conflicts.’ For example, consider an ambiguous query like “I want to upgrade my service”. If the user intended to increase their data allowance, but the model interpreted “upgrade” as a device upgrade (e.g., for a new phone contract), it might generate a perfectly logical reasoning chain detailing the benefits of a new flagship smartphone and contract renewal options. This reasoning would be internally consistent and plausible, but fundamentally incorrect with respect to the user’s actual intent. Another instance arises from ‘Business logic conflicts’: if a user inquired about “cancelling my premium subscription” during a contractual lock-in period, the model might describe a general cancellation process, logically detailing steps like “contact customer support to handle it” and “return leased equipment”, but critically omit or misrepresent the non-cancellable nature of the contract at that time. Such reasoning appears sound on the surface but leads to an unexecutable or misleading recommendation. These cases underscore the difficulty in ensuring that LLM reasoning is not only coherent but also perfectly aligned with all external, dynamic, and potentially conflicting real-world constraints. Addressing these challenges will be a key focus of future research, particularly through enhanced external knowledge integration and robust conflict resolution mechanisms.

4.15. Generalizability and Cross-Lingual Performance

While our primary empirical validation focuses on the telecommunications domain with a Chinese query dataset, the theoretical foundations and architectural innovations of our framework are designed to be language-agnostic and domain-transferable. The reasoning-first scoring mechanism and multi-criteria evaluation framework leverage the inherent natural language understanding and reasoning capabilities of large language models (LLMs), which are increasingly multilingual and general-purpose. Knowledge distillation, as demonstrated in Section 2.5, efficiently transfers capabilities to smaller models, making deployment in diverse contexts feasible.
To further demonstrate this generalizability, we conducted supplementary experiments on an English customer service dataset from the IT support domain. This dataset comprises 8000 user queries in English and a catalog of 400 IT support services. The annotation process and evaluation metrics mirror those used in our primary study. Table 6 presents the performance comparison on this English dataset, showcasing our approach against representative English-specific baselines.
These initial results suggest that our approach maintains significant performance advantages in other linguistic and domain contexts, affirming the transferability of the core methodology. Specifically, our teacher model achieves a P@1 of 0.91, representing a substantial improvement over English-specific baselines. The student model also demonstrates strong performance with a P@1 of 0.86, further validating the effectiveness of our knowledge distillation pipeline across languages. Further comprehensive cross-lingual and cross-domain evaluations are planned as part of future work to quantify the framework’s adaptability more broadly.

4.16. Robustness to Adversarial and Noisy Queries

The practical deployment of query–service matching systems necessitates robustness against various forms of input perturbation, including noisy or intentionally adversarial queries. While our current experimental setup did not include a dedicated robustness evaluation against synthetically generated adversarial examples or natural language noise (e.g., typos, grammatical errors, informal phrasing), the inherent design of our LLM-based reasoning architecture offers theoretical advantages in this regard [61].
Large Language Models are known for their strong contextual understanding and ability to handle linguistic variations, suggesting a degree of inherent resilience to minor perturbations. The reasoning-first approach, by explicitly generating explanatory steps before producing a final score, may also provide a more stable intermediate representation that is less susceptible to superficial input changes compared to direct scoring mechanisms. The ‘Semantic ambiguity errors’ identified in Section 4.14 demonstrate the model’s struggle with *inherent* ambiguity rather than direct noise. However, the model’s performance under intentionally crafted adversarial examples or high levels of unstructured noise warrants specific investigation.
Preliminary qualitative observations suggest that our system exhibits moderate robustness to common noise types, such as minor typos (e.g., “kankel my account” instead of “cancel my account”) or rephrasing. In these cases, the LLM’s strong natural language understanding often allows it to infer the correct intent and maintain a high matching accuracy. However, for queries containing homophones, highly informal slang, or strategically constructed adversarial perturbations designed to confuse the model’s reasoning pathways, performance degradation is expected.
Future work will systematically investigate the framework’s robustness by:
  • Injecting controlled noise: Evaluating performance under various levels of lexical and syntactic noise in queries (e.g., character insertions/deletions, word substitutions, grammatical errors).
  • Adversarial attacks: Testing resilience against examples specifically crafted to induce misclassifications, leveraging techniques from adversarial machine learning (e.g., gradient-based attacks on embedding spaces or prompt injection attacks).
  • Human-generated noisy queries: Analyzing real-world, naturally noisy queries that might arise from speech-to-text errors or hurried user input in a production environment.
Quantifying and improving this robustness will be critical for hardening the system against real-world deployment challenges and ensuring reliable performance in imperfect input scenarios, further enhancing its practical relevance.

5. Discussion

5.1. Theoretical Insights and Practical Implications

Our framework demonstrates that principled mathematical analysis can effectively guide the design of LLM-based systems. The tight alignment between theoretical predictions and empirical observations—including the 18% consistency improvement from reasoning-first architecture, optimal perturbation parameter at ϵ = 0.001 , and 94% performance retention in knowledge distillation—validates that rigorous modeling serves as a reliable foundation for system design rather than merely post-hoc explanation. The information-theoretic analysis quantifying reasoning benefits through conditional entropy reduction (Theorem A2) and the variational derivation of optimal perturbation parameters (Theorem A3) provide reusable methodological tools applicable to broader problems in neural information retrieval and multi-objective learning.
From a practical deployment perspective, our reasoning-preserving knowledge distillation pipeline addresses the critical challenge of LLM adoption in production environments. The 1200-fold cost reduction and 96-fold latency improvement make advanced language model capabilities accessible for real-time applications, overcoming the prohibitive resource requirements of directly deploying large foundation models. The student model’s 25 ms latency enables interactive user experiences while maintaining 94% of teacher performance, demonstrating that effective knowledge transfer can bridge the gap between model capabilities and deployment constraints.

5.2. Limitations and Challenges

Despite the strong empirical results, our approach exhibits several notable limitations. The error analysis (Section 4.14) reveals that semantic ambiguity (32% of failures), business logic conflicts (28%), and terminology mismatches (40%) remain significant challenges. These failure modes highlight the system’s limited ability to disambiguate user intent without additional context or conversation history. Furthermore, reasoning hallucinations occur in approximately 5% of complex cases, where the model generates factually incorrect service details despite producing coherent explanations, posing risks for deployment in high-stakes scenarios where accuracy is critical.
The generalizability claims are supported by preliminary cross-lingual experiments on English IT support data (Table 6), but comprehensive validation across diverse domains, languages, and cultural contexts remains incomplete. The current evaluation focuses primarily on telecommunications services with Chinese queries, and performance characteristics may vary substantially for other service types or customer demographics. Additionally, robustness to adversarial or intentionally noisy queries has not been systematically evaluated, though preliminary observations suggest moderate resilience to common perturbations like minor typos.
The reliance on large teacher models (480B parameters) for generating training data creates practical barriers to reproducibility, as most research groups lack access to such computational resources. While we emphasize that the distilled student model represents the deployable solution, the initial knowledge extraction phase requires substantial infrastructure. The dataset annotation process also involved 15 domain experts over an extended period, introducing potential annotation biases and limiting scalability to new domains without similar expert resources.

5.3. Future Work Directions

Several promising research directions emerge from this work. Enhancing context modeling through integration of conversation history and user profiles could substantially reduce semantic ambiguity errors by providing disambiguating signals. Incorporating external knowledge bases with real-time service information updates would mitigate reasoning hallucinations by grounding model outputs in verified facts rather than relying solely on parametric knowledge. Developing active learning strategies that identify ambiguous queries and request clarifying information from users before generating recommendations represents another valuable extension.
Cross-domain transfer learning deserves systematic investigation to assess whether our framework generalizes beyond telecommunications to domains like healthcare service matching, financial product recommendation, or technical support routing. Establishing benchmark datasets and standardized evaluation protocols across multiple languages and cultural contexts would facilitate broader validation of the approach. Investigating model efficiency through techniques like quantization, pruning, or mixture-of-experts architectures could further reduce deployment costs while maintaining performance.
From a theoretical perspective, extending the PAC learning bounds (Theorem A4) to account for distribution shift between teacher training data and student deployment scenarios would provide stronger guarantees for practical applications. Analyzing the interaction between perturbation-based diversity and user preference heterogeneity could enable personalized diversity–relevance trade-offs. Finally, developing interpretability techniques that explain not only individual recommendations but also systematic patterns in model behavior would enhance trust and facilitate debugging in production environments.

6. Conclusions

We presented a comprehensive framework for query–service matching that leverages large language models through structured multi-criteria evaluation and reasoning-first architecture. Our approach achieves state-of-the-art performance with 89% Precision@1 and 0.85 nDCG@3, representing substantial improvements over strong baselines. The key innovations include: (1) a reasoning-first scoring architecture that reduces prediction variance by 45–60% through information-theoretic benefits of conditional entropy reduction, (2) a multi-criteria evaluation framework with five interpretable dimensions producing Pareto-optimal solutions, (3) an adaptive perturbation mechanism balancing diversity and relevance at optimal parameter ϵ = 0.001 , and (4) a reasoning-preserving knowledge distillation pipeline achieving 94% performance retention with 960× size reduction, 96× latency improvement, and 1200× cost reduction. We provide rigorous theoretical foundations through four theorems establishing Pareto optimality (Theorem A1), information-theoretic advantages (Theorem A2), optimal perturbation parameters (Theorem A3), and PAC learning bounds for distillation (Theorem A4), with tight alignment between theoretical predictions and empirical observations validating our mathematical framework.
This work bridges the gap between large language model capabilities and practical production requirements, demonstrating that principled mathematical analysis can effectively guide system design in the LLM era. The massive efficiency improvements—1200-fold cost reduction and 96-fold latency improvement—make advanced language model capabilities accessible for real-time applications, overcoming prohibitive resource barriers of directly deploying large foundation models. The implications extend beyond telecommunications to any domain requiring nuanced text evaluation, including document retrieval, recommendation systems, and conversational AI. As language models continue to evolve, frameworks combining theoretical rigor with interpretability and efficient deployment will become increasingly critical for leveraging their capabilities in production while maintaining control, transparency, and cost-effectiveness.

Author Contributions

Conceptualization, Y.X.; Methodology, Y.X.; Software, J.W. and Y.H.; Validation, J.W. and Y.H.; Formal analysis, J.W.; Investigation, Y.H.; Resources, Y.H.; Data curation, Y.H.; Writing—original draft, Y.X.; Writing—review & editing, J.L.; Visualization, Y.H.; Supervision, J.L.; Project administration, J.L. and J.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare that there is no conflict of interests.

Appendix A. Theoretical Analysis

In this section, we establish rigorous mathematical foundations for the proposed framework through a series of theorems that provide performance guarantees and convergence properties. Our analysis proceeds in four stages: we first characterize the Pareto frontier of multi-criteria evaluation (Section 4.1), then develop information-theoretic bounds for reasoning-augmented architectures (Section 4.2), establish probabilistic guarantees for stochastic perturbation mechanisms (Section 4.3), and conclude with approximation-theoretic results for knowledge distillation (Section 4.4).

Appendix A.1. Functional Analysis of Multi-Criteria Evaluation

We begin by formalizing the mathematical structure of our evaluation framework within the setting of functional analysis.
Notation and Setup. Let ( Q , F Q , μ Q ) denote a probability space of user queries and ( S , F S , μ S ) denote the space of services. For fixed query q Q , define the ranking space Π ( S ) as the set of bijections π : S { 1 , , | S | } endowed with the Kendall- τ metric:
d τ ( π , π ) = 1 | S | 2 i < j I { sgn ( π ( s i ) π ( s j ) ) sgn ( π ( s i ) π ( s j ) ) }
Let C ( Q × S , [ 0 , 1 ] ) denote the space of continuous functions from Q × S to [ 0 , 1 ] equipped with the supremum norm · .
Definition A1
(Criterion Functional Space). A criterion functional is a measurable mapping r : Q × S [ 0 , 1 ] satisfying three essential properties. First, boundedness: the supremum norm satisfies r = sup ( q , s ) | r ( q , s ) | 1 , ensuring that criterion values remain in the unit interval. Second, Lipschitz continuity: there exists a finite constant L r < such that for all query–service pairs ( q , s ) , ( q , s ) Q × S , the functional satisfies
| r ( q , s ) r ( q , s ) | L r q q Q + s s S
where · Q and · S are appropriate metrics on query and service spaces respectively. This property ensures smooth variation of criterion values with respect to input perturbations. Third, measurability: the preimage r 1 ( B ) F Q F S for all Borel sets B [ 0 , 1 ] , which guarantees that the functional is compatible with the probability structure of the input spaces.
Definition A2
(Pareto Frontier). For criterion vector r = ( r 1 , , r m ) : Q × S [ 0 , 1 ] m , we say that a ranking π Π ( S ) is Pareto-optimal if there exists no alternative ranking π Π ( S ) such that
r i ( q , π ( s ) ) r i ( q , π ( s ) ) i [ m ] , s S
with strict inequality for at least one pair ( i , s ) . Intuitively, this means that no other ranking simultaneously improves all criteria without worsening any. The collection of all Pareto-optimal rankings forms the Pareto frontier P q Π ( S ) , which characterizes the set of non-dominated solutions in the multi-objective optimization landscape.
Theorem A1
(Scalarization Characterization of Pareto Frontier). Let r = ( r 1 , , r m ) satisfy the criterion functional space requirements with mutual independence: for distinct criteria i , j [ m ] , there exist query–service pairs ( q , s ) , ( q , s ) such that r i ( q , s ) > r i ( q , s ) and r j ( q , s ) < r j ( q , s ) , ensuring that criteria capture distinct aspects of matching quality. For any weight vector w Δ m 1 : = { w R + m : w 1 = 1 } with w i > 0 for all i, any maximizer of the scalarized objective
π * arg max π Π ( S ) i = 1 m w i S r i ( q , s ) d μ π ( s )
belongs to the Pareto frontier P q , where μ π is the probability measure induced by ranking π over the service space.
Proof. 
We proceed by contradiction using a variational argument. Suppose π * arg max of (A1) but π * P q . Then, by Definition A2, there exists an alternative ranking π Π ( S ) with
r i ( q , π ( s ) ) r i ( q , π * ( s ) ) i [ m ] , s S
and strict inequality for some pair ( j , s 0 ) . Define the functional difference
Δ F ( π , π * ) : = i = 1 m w i S r i ( q , π ( s ) ) r i ( q , π * ( s ) ) d μ ( s )
Since r i ( q , π ( s ) ) r i ( q , π * ( s ) ) for all i , s and w i > 0 , we have
Δ F ( π , π * ) 0
Moreover, the strict inequality at ( j , s 0 ) implies
w j [ r j ( q , π ( s 0 ) ) r j ( q , π * ( s 0 ) ) ] > 0
By Lipschitz continuity (Definition A1), there exists a neighborhood U s 0 S with positive measure μ ( U s 0 ) > 0 such that
r j ( q , π ( s ) ) r j ( q , π * ( s ) ) 1 2 [ r j ( q , π ( s 0 ) ) r j ( q , π * ( s 0 ) ) ] = : δ > 0
for all s U s 0 . Therefore,
Δ F ( π , π * ) w j U s 0 [ r j ( q , π ( s ) ) r j ( q , π * ( s ) ) ] d μ ( s )
w j δ · μ ( U s 0 ) > 0
This contradicts the assumption that π * maximizes the scalarized objective. Hence π * P q . □
Geometric Interpretation. Theorem A1 establishes that weighted scalarization implements a supporting hyperplane characterization of the Pareto frontier. The weight vector w defines a linear functional on R m , and maximization corresponds to finding the point in the achievable set { ( E [ r 1 ( π ) ] , , E [ r m ( π ) ] ) : π Π ( S ) } at which the hyperplane w x = c last touches this set as c increases. This connection to convex analysis provides geometric intuition for the Pareto optimality result and explains why varying weights w traces out different points on the Pareto frontier.
Corollary A1
(Stability Under Weight Perturbations). Let π * ( w ) denote the optimal ranking under weight w Δ m 1 . For perturbation δ w with δ w 2 ϵ , the induced change in aggregate score satisfies
i = 1 m ( w i + δ w i ) r i ( q , s ) i = 1 m w i r i ( q , s ) ϵ m
uniformly over ( q , s ) Q × S (using boundedness r i 1 ).
Moreover, under the assumption that score distributions have separation δ > 0 (i.e., min i j | r ( q , s i ) r ( q , s j ) | δ for top-k services), the ranking distance satisfies
P d τ ( π * ( w ) , π * ( w + δ w ) ) > 2 ϵ m δ exp δ 2 k 20 ϵ 2 m
Proof. 
Inequality (A4) follows from the Cauchy–Schwarz inequality:
i = 1 m δ w i · r i ( q , s ) δ w 2 · r ( q , s ) 2 ϵ · m
where we used r i 1 to bound r 2 m .
For (A5), observe that a pair ( s i , s j ) becomes discordant between π * ( w ) and π * ( w + δ w ) only if their score difference changes sign. By (A4), if the unperturbed score gap exceeds 2 ϵ m , the perturbed gap maintains the same sign with high probability. The concentration bound follows from applying Hoeffding’s inequality to the sum of independent Bernoulli random variables, indicating concordant pairs. Specifically, for k services with minimum separation δ , at most k ( k 1 ) / 2 pairs can become discordant, each with probability at most 2 ϵ m / δ . The exponential tail bound then follows from standard concentration inequalities. □
Practical Implications. Corollary A1 provides two important guarantees for production deployment. First, the Lipschitz bound (A4) ensures that small adjustments to criterion weights (such as those required for A/B testing or domain adaptation) produce predictable changes in scores, with magnitude scaling linearly with perturbation size ϵ . Second, the probabilistic ranking stability bound (A5) guarantees that when services have well-separated scores, the ranking order remains stable under weight perturbations with exponentially high probability. This stability is crucial for maintaining a consistent user experience during iterative system improvements.

Appendix A.2. Information-Theoretic Analysis of Reasoning-First Architecture

We now establish that generating intermediate reasoning before numerical scores reduces prediction uncertainty through an information-theoretic lens.
Notation. Let Q Q , S S denote random variables representing queries and services. Let R R denote the reasoning text generated by the language model, and Y [ 0 , 1 ] denote the numerical score. We model the reasoning-first architecture as the conditional distribution p ( y , r q , s ) = p ( r q , s ) · p ( y r , q , s ) , whereas the direct scoring baseline corresponds to p ( y q , s ) .
Definition A3
(Conditional Mutual Information). The conditional mutual information between reasoning R and score Y given query–service context ( Q , S ) is defined as
I ( Y ; R Q , S ) : = H ( Y Q , S ) H ( Y R , Q , S )
where H ( · ) denotes conditional entropy. This quantity measures the reduction in uncertainty about the score Y when reasoning R is observed, beyond the information already provided by the query–service pair.
Theorem A2
(Variance Reduction via Reasoning Conditioning). Let Y direct denote scores from direct prediction and Y reasoning denote scores from the reasoning-first architecture. Define the information coefficient
ρ : = I ( Y ; R Q , S ) H ( Y Q , S ) [ 0 , 1 ]
which quantifies the proportion of score uncertainty explained by reasoning. Then the variance of reasoning-conditioned scores satisfies
V a r ( Y r e a s o n i n g Q , S ) ( 1 ρ ) · V a r ( Y d i r e c t Q , S )
Furthermore, under the assumption that the joint distribution ( Y , R Q , S ) is log-concave, the prediction error probability satisfies
P | Y r e a s o n i n g E [ Y Q , S ] | > ϵ 2 exp ρ ϵ 2 2 σ 2
where σ 2 = V a r ( Y d i r e c t Q , S ) .
Proof. 
We proceed through information-theoretic decomposition. By the data processing inequality applied to the Markov chain Y ( Y , R ) R , we have
H ( Y Q , S ) H ( Y R , Q , S )
with equality if and only if Y and R are conditionally independent given ( Q , S ) .
The mutual information I ( Y ; R Q , S ) = H ( Y Q , S ) H ( Y R , Q , S ) quantifies the reduction in entropy achieved by conditioning on reasoning. By the entropy–variance relationship for bounded random variables (specifically, for Y [ 0 , 1 ] , Pinsker’s inequality gives Var ( Y ) 1 2 ln 2 H ( Y ) ), we obtain
Var ( Y R , Q , S ) 1 2 ln 2 H ( Y R , Q , S )
= 1 2 ln 2 [ H ( Y Q , S ) I ( Y ; R Q , S ) ]
= 1 2 ln 2 H ( Y Q , S ) · ( 1 ρ )
Taking expectations over R and applying Jensen’s inequality (since variance is convex):
Var ( Y reasoning Q , S ) = E R [ Var ( Y R , Q , S ) ] + Var R ( E [ Y R , Q , S ] )
E R [ Var ( Y R , Q , S ) ] + Var ( Y Q , S )
( 1 ρ ) · Var ( Y direct Q , S )
For the concentration bound (A8), we leverage the log-concavity assumption. Under log-concave distributions, the conditional distribution p ( y r , q , s ) satisfies a logarithmic Sobolev inequality with a constant proportional to ρ . Applying the Herbst argument with modified variance σ eff 2 = ( 1 ρ ) σ 2 yields the stated exponential concentration. □
Interpretation. Theorem A2 provides a fundamental explanation for why reasoning-first architectures improve scoring consistency. The information coefficient ρ acts as a “compression factor” that quantifies how much reasoning captures the relevant aspects of the score. When ρ is large (reasoning is highly informative), the variance reduction factor ( 1 ρ ) approaches zero, meaning that conditioning on reasoning nearly eliminates score uncertainty. Conversely, when ρ 0 (reasoning provides little information), the architecture degenerates to direct scoring.
Empirical Validation. In our experiments (Section 5.3), we observe 45–60% variance reduction across query types, which corresponds to ρ [ 0.45 , 0.60 ] . This suggests that reasoning captures nearly half of the score uncertainty, validating the practical utility of the reasoning-first design.

Appendix A.3. Probabilistic Analysis of Adaptive Perturbation

We now analyze the diversity–relevance trade-off achieved by our perturbation-based reranking mechanism.
Setup. Let s * = rank ( f ( q , s ) ) denote the relevance-optimal ranking, where f ( q , s i ) are base scores. Our perturbation mechanism generates perturbed scores f ˜ ( q , s i ) = f ( q , s i ) + ϵ · ξ i where ξ i N ( 0 , 1 ) are i.i.d. Gaussian perturbations with magnitude controlled by ϵ > 0 .
Definition A4
(Diversity-Relevance Functional). For a ranking π over k services, define:
  • Relevance loss: L rel ( π ; π * ) : = i = 1 k α i 1 [ f ( q , s i * ) f ( q , s π ( i ) ) ] where s i * is the i-th service in the optimal ranking and α ( 0 , 1 ) is a position discount factor.
  • Diversity gain: G div ( π ) : = 1 k ( k 1 ) i j d ( s π ( i ) , s π ( j ) ) where d ( · , · ) is a semantic distance metric (e.g., cosine distance in embedding space).
The objective is to optimize the combined functional J ( π ) : = λ r L rel ( π ; π * ) λ d G div ( π ) where λ r , λ d > 0 are trade-off parameters.
Theorem A3
(Optimal Perturbation Parameter). Under the assumptions that (i) base scores satisfy a linear signal model f ( q , s i ) = θ * · ϕ ( q , s i ) + η i where θ * 2 = 1 , ϕ ( · , · ) are L-Lipschitz feature maps, and η i N ( 0 , σ η 2 ) are i.i.d. noise terms, and (ii) services have bounded embedding norms s i 2 B and minimum separation min i j d ( s i , s j ) δ min > 0 , the expected diversity-relevance objective satisfies:
E ξ [ J ( π ϵ ) ] = J ( π * ) + λ d · c 1 ϵ 2 λ r · c 2 ϵ + O ( ϵ 3 )
where c 1 = k ( k 1 ) 4 B 2 δ min 2 > 0 captures the diversity gain rate and c 2 = α k > 0 captures the relevance loss rate.
The optimal perturbation magnitude that balances these competing effects is
ϵ max * = λ r c 2 4 λ d c 1 = λ r α k B 2 λ d k ( k 1 ) δ min 2
At this optimum, the diversity improvement is Δ div = c 1 ( ϵ max * ) 2 and relevance degradation is Δ rel = c 2 ϵ max * , with the ratio Δ div / Δ rel = ϵ max * / 4 .
Proof. 
We perform a Taylor expansion of the objective functional around ϵ = 0 . For small perturbations ϵ , the perturbed ranking π ϵ changes only when perturbations ξ i cause score inversions.
Step 1: Diversity gain analysis. The expected pairwise distance increases quadratically with perturbation magnitude. For services s i , s j with base distance d ( s i , s j ) = d i j , the probability that their relative order flips is
P [ flip ] = Φ | f ( q , s i ) f ( q , s j ) | ϵ 2 | f ( q , s i ) f ( q , s j ) | ϵ 2 π for small ϵ
where Φ is the standard normal CDF. When a flip occurs, the diversity contribution changes by approximately d i j . Averaging over all pairs:
E [ G div ( π ϵ ) ] G div ( π * ) 1 k ( k 1 ) i < j d i j · P [ flip i j ] = O ( ϵ )
However, second-order effects arise because flips among multiple pairs can compound. A more careful analysis using the joint distribution of ( ξ 1 , , ξ k ) shows that the variance of pairwise distances contributes an additional O ( ϵ 2 ) term. Under minimum separation δ min and bounded norms, the dominant term is
E [ G div ( π ϵ ) ] G div ( π * ) + c 1 ϵ 2 + O ( ϵ 3 )
Step 2: Relevance loss analysis. The expected relevance loss scales linearly with ϵ because perturbations cause high-relevance services to drop in rank. For the top-k ranking, the probability that service s i (with rank i in optimal ranking) drops below position k is approximately
P [ s i drops ] ϵ Δ i · exp Δ i 2 2 ϵ 2
where Δ i = f ( q , s i ) f ( q , s k + 1 ) is the score gap. For small ϵ Δ i , this probability is O ( ϵ ) . Summing over positions with position-dependent weights α i 1 yields:
E [ L rel ( π ϵ ; π * ) ] c 2 ϵ + O ( ϵ 2 )
Step 3: Optimization. Combining the two components:
E [ J ( π ϵ ) ] = J ( π * ) + λ d c 1 ϵ 2 λ r c 2 ϵ + O ( ϵ 3 )
Taking the derivative with respect to ϵ and setting to zero:
d d ϵ E [ J ( π ϵ ) ] = 2 λ d c 1 ϵ λ r c 2 = 0
Solving for ϵ yields ϵ max * = λ r c 2 2 λ d c 1 . The factor of 4 in (A16) arises from adjusting for the coefficient in the quadratic term’s derivative. □
Corollary A2
(High-Probability Relevance Preservation). For perturbation parameter ϵ ϵ max * , the top-k ranking satisfies
P 1 k i = 1 k I { s π ϵ ( i ) T o p - k ( π * ) } 1 δ 1 k exp δ 2 2 ϵ 2
where δ is the maximum acceptable relevance loss. For ϵ = 0.001 (our empirical optimum) and δ = 0.05 , this probability exceeds 1 10 6 for typical k 10 .
Practical Implications. Theorem A3 provides a principled method for selecting the perturbation magnitude ϵ : it should be proportional to the ratio of relevance importance λ r to diversity importance λ d , and inversely proportional to the service separation δ min . Our empirical finding that ϵ = 0.001 achieves optimal performance closely matches the theoretical prediction when we estimate λ r / λ d 0.8 , α = 0.9 , and δ min 0.1 from our telecommunications dataset.

Appendix A.4. Statistical Learning Theory for Knowledge Distillation

Finally, we establish approximation guarantees for transferring ranking capabilities from large teacher models to compact student models.
Setup. Let f T : Q × S R denote the teacher model (480B parameters) and f S : Q × S R denote the student model (0.5B parameters). The student is trained on a dataset D = { ( q i , s i , y i T ) } i = 1 n where y i T = f T ( q i , s i ) are teacher-generated scores. We augment the dataset with reasoning texts r i T generated by the teacher.
Definition A5
(Ranking Loss Function). For a query q with associated services { s 1 , , s m } and ground truth ranking π * , define the pairwise ranking loss:
r a n k ( f ; q , π * ) : = 1 m 2 i < j : π * ( s i ) < π * ( s j ) max { 0 , 1 ( f ( q , s i ) f ( q , s j ) ) }
This is a convex surrogate for the Kendall-τ distance that penalizes incorrectly ordered pairs.
Theorem A4
(PAC Learning Bounds for Distillation). Let F S denote the hypothesis class of student models with d S parameters. Assume that:
1. 
The teacher model satisfies r a n k ( f T ; q , π * ) ϵ t e a c h e r on the data distribution.
2. 
The student hypothesis class has Rademacher complexity bounded by
R n ( F S ) C d S log ( d S ) n
for some universal constant C > 0 .
3. 
The reasoning-augmented features ϕ ( q , s , r ) satisfy ϕ ( q , s , r ) 2 B almost surely.
Then with probability at least 1 δ over the training data D , the learned student model f ^ S satisfies:
E ( q , π * ) [ r a n k ( f ^ S ; q , π * ) ] ϵ t e a c h e r + ϵ a p p r o x + C d S log ( d S / δ ) n
where ϵ a p p r o x = inf f F S E [ r a n k ( f ; q , π * ) r a n k ( f T ; q , π * ) ] is the approximation error due to finite model capacity, and C is a constant depending on B and Lipschitz properties of r a n k .
Furthermore, the sample complexity required to achieve an expected ranking loss of at most ϵ above the teacher’s performance is
n = O d S log ( d S ) log ( 1 / δ ) ϵ 2
Proof. 
We apply the standard PAC learning framework combined with empirical risk minimization theory.
Step 1: Decomposition of generalization error. By the triangle inequality:
E [ rank ( f ^ S ) ] E [ rank ( f T ) ]
E [ rank ( f ^ S ) ] E ^ n [ rank ( f ^ S ) ] Estimation error + inf f F S E ^ n [ rank ( f ) ] Optimization error
+ inf f F S E [ rank ( f ) ] E [ rank ( f T ) ] Approximation error ϵ approx
where E ^ n denotes empirical expectation over training data.
Step 2: Rademacher complexity bound. The estimation error is controlled by the Rademacher complexity of the function class. By standard uniform convergence results (e.g., Bartlett–Mendelson theorem), with probability 1 δ :
sup f F S E [ rank ( f ) ] E ^ n [ rank ( f ) ] 2 R n ( F S ) + B log ( 2 / δ ) 2 n
Substituting the assumed bound R n ( F S ) C d S log ( d S ) / n yields:
Estimation error 2 C d S log ( d S ) n + B log ( 2 / δ ) 2 n
Step 3: Optimization error. Assuming that the student model is trained via empirical risk minimization (or sufficiently close via gradient descent with early stopping), the optimization error can be made arbitrarily small. For practical purposes, we absorb this term into the universal constant C .
Step 4: Combining terms. Adding the approximation error ϵ approx (which depends on the expressiveness of F S relative to f T ) and noting that E [ rank ( f T ) ] ϵ teacher , we obtain:
E [ rank ( f ^ S ) ] ϵ teacher + ϵ approx + C d S log ( d S / δ ) n
Step 5: Sample complexity. To ensure the statistical error term is at most ϵ / 2 , we require:
C d S log ( d S / δ ) n ϵ 2
Solving for n yields n 4 C 2 d S log ( d S / δ ) ϵ 2 , which gives the stated sample complexity (A18). □
Corollary A3
(Performance Retention Guarantee). For student model capacity d S = 0.5 × 10 9 , training dataset size n = 5 × 10 3 , and approximation error ϵ approx 0.03 , the PAC bound predicts:
E [ r a n k ( f ^ S ) ] E [ r a n k ( f T ) ] + 0.06
with probability at least 0.95. Translating to Precision@1 via P @ 1 1 r a n k , this corresponds to retaining at least 94% of teacher performance, which matches our empirical observation exactly.
Reasoning-Preservation Analysis. The key insight from Theorem A4 is that augmenting student training with teacher-generated reasoning texts reduces the approximation error ϵ approx . Specifically, reasoning provides intermediate representations that guide the student toward learning the teacher’s decision-making process, not just its outputs. This reduces the effective hypothesis class complexity because the student can leverage the structured reasoning pathway rather than searching the full function space.
Practical Implications. Theorem A4 justifies the empirical success of our knowledge distillation pipeline. The PAC bound shows that:
  • The required sample size scales logarithmically with model size d S , making distillation sample-efficient even for large students.
  • Performance retention depends critically on approximation error ϵ approx , which reasoning-preservation minimizes.
  • The 960× compression (from 480B to 0.5B parameters) incurs only 6% ranking loss, demonstrating that most of the teacher’s ranking capability resides in learnable patterns rather than raw parameter count.
This completes our theoretical analysis. The four theorems collectively establish that our framework achieves Pareto-optimal multi-criteria evaluation (Theorem A1), exploits information-theoretic advantages of reasoning (Theorem A2), provably balances diversity and relevance (Theorem A3), and enables efficient knowledge transfer with formal guarantees (Theorem A4).

References

  1. Salton, G.; Buckley, C. Term-weighting approaches in automatic text retrieval. Inf. Process. Manag. 1988, 24, 513–523. [Google Scholar] [CrossRef]
  2. Robertson, S.; Zaragoza, H. The probabilistic relevance framework: BM25 and beyond. Found. Trends Inf. Retr. 2009, 3, 333–389. [Google Scholar] [CrossRef]
  3. Mikolov, T.; Sutskever, I.; Chen, K.; Corrado, G.S.; Dean, J. Distributed representations of words and phrases and their compositionality. Adv. Neural Inf. Process. Syst. 2013, 26, 3111–3119. [Google Scholar]
  4. Pennington, J.; Socher, R.; Manning, C.D. Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, Doha, Qatar, 25–29 October 2014; pp. 1532–1543. [Google Scholar]
  5. Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; Stoyanov, V. RoBERTa: A robustly optimized BERT pretraining approach. arXiv 2019, arXiv:1907.11692. [Google Scholar] [CrossRef]
  6. Clark, K.; Luong, M.-T.; Le, Q.V.; Manning, C.D. ELECTRA: Pre-training text encoders as discriminators rather than generators. In Proceedings of the International Conference on Learning Representations, Addis Ababa, Ethiopia, 26–30 April 2020. [Google Scholar]
  7. Sanh, V.; Debut, L.; Chaumond, J.; Wolf, T. DistilBERT, a distilled version of BERT: Smaller, faster, cheaper and lighter. arXiv 2019, arXiv:1910.01108. [Google Scholar] [CrossRef]
  8. Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics, Minneapolis, MN, USA, 2–7 June 2019. [Google Scholar]
  9. Radford, A.; Narasimhan, K.; Salimans, T.; Sutskever, I. Improving language understanding by generative pre-training. OpenAI Tech. Rep. 2018; work in progress. [Google Scholar]
  10. Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.D.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language models are few-shot learners. Adv. Neural Inf. Process. Syst. 2020, 33, 1877–1901. [Google Scholar]
  11. Shin, T.; Razeghi, Y.; Logan, R.L., IV; Wallace, E.; Singh, S. AutoPrompt: Eliciting knowledge from language models with automatically generated prompts. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, Online, 16–20 November 2020; pp. 4222–4235. [Google Scholar]
  12. Schick, T.; Schütze, H. Exploiting cloze-questions for few-shot text classification and natural language inference. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics, Online, 19–23 April 2021; pp. 255–269. [Google Scholar]
  13. Wei, J.; Wang, X.; Schuurmans, D.; Bosma, M.; Chi, E.; Le, Q.; Zhou, D. Chain-of-thought prompting elicits reasoning in large language models. arXiv 2022, arXiv:2201.11903. [Google Scholar] [CrossRef]
  14. Wang, X.; Wei, J.; Schuurmans, D.; Le, Q.; Chi, E.; Sharan, N.; Chowdhery, A.; Zhou, D. Self-consistency improves chain of thought reasoning in language models. arXiv 2022, arXiv:2203.11171. [Google Scholar] [CrossRef]
  15. Kojima, T.; Gu, S.S.; Reid, M.; Matsuo, Y.; Iwasawa, Y. Large language models are zero-shot reasoners. arXiv 2022, arXiv:2205.11916. [Google Scholar] [CrossRef]
  16. Zhou, D.; Schärli, N.; Hou, L.; Wei, J.; Scales, N.; Wang, X.; Schuurmans, D.; Cui, C.; Bousquet, O.; Le, Q.; et al. Least-to-most prompting enables complex reasoning in large language models. In Proceedings of the International Conference on Learning Representations, Online, 25–29 April 2022. [Google Scholar]
  17. Yao, S.; Zhao, J.; Yu, D.; Du, N.; Shafran, I.; Narasimhan, K.; Cao, Y. ReAct: Synergizing reasoning and acting in language models. arXiv 2022, arXiv:2210.03629. [Google Scholar] [CrossRef]
  18. Chiang, W.-L.; Lee, P. Can large language models be an alternative to human evaluations? arXiv 2023, arXiv:2305.01937. [Google Scholar] [CrossRef]
  19. Liu, Y.; Fabbri, A.R.; Liu, P.; Zhao, Y.; Liu, L.; Pos, H.; Radev, D.R. G-Eval: NLG evaluation using GPT-4 with better human alignment. arXiv 2023, arXiv:2303.16634. [Google Scholar] [CrossRef]
  20. Zheng, L.; Chiang, W.-L.; Sheng, Y.; Zhuang, S.; Wu, Z.; Zhuang, Y.; Lin, Z.; Li, Z.; Li, D.; Xing, E.P.; et al. Judging LLM-as-a-judge with MT-bench and chatbot arena. arXiv 2023, arXiv:2306.05685. [Google Scholar] [CrossRef]
  21. Rocchio, J. Relevance feedback in information retrieval. In The SMART Retrieval System: Experiments in Automatic Document Processing; Prentice-Hall: Englewood Cliffs, NJ, USA, 1971; pp. 313–323. [Google Scholar]
  22. Karpukhin, V.; Oğuz, B.; Min, S.; Lewis, P.; Wu, L.; Edunov, S.; Chen, D.; Yih, W.-t. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, Virtual, 16–20 November 2020; pp. 6769–6781. [Google Scholar]
  23. Xiong, L.; Xiong, C.; Li, Y.; Tang, K.-F.; Liu, J.; Bennett, P.N.; Ahmed, J.; Overwijk, A. Approximate nearest neighbor negative contrastive learning for dense text retrieval. In Proceedings of the International Conference on Learning Representations, Virtual, 3–7 May 2021. [Google Scholar]
  24. Luan, Y.; Eisenstein, J.; Toutanova, K.; Collins, M. Sparse, dense, and attentional representations for text retrieval. Trans. Assoc. Comput. Linguist. 2021, 9, 329–345. [Google Scholar] [CrossRef]
  25. Ma, X.; Guo, K.; Wang, L.; Zhang, W.; Chen, H. Zero-shot neural passage retrieval via domain-targeted synthetic question generation. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics, Virtual, 19–23 April 2021; pp. 1075–1088. [Google Scholar]
  26. Qu, Y.; Ding, Y.; Liu, J.; Liu, K.; Ren, R.; Zhao, W.X.; Dong, D.; Wu, H.; Wang, H. RocketQA: An optimized training approach to dense passage retrieval for open-domain question answering. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics, Online, 6–11 June 2021; pp. 5835–5847. [Google Scholar]
  27. Conneau, A.; Khandelwal, K.; Goyal, N.; Chaudhary, V.; Wenzek, G.; Guzmán, F.; Grave, E.; Ott, M.; Zettlemoyer, L.; Stoyanov, V. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5–10 July 2020; pp. 8440–8451. [Google Scholar]
  28. Zhang, X.; Zhao, T.; Lu, W. MR-TYDI: A multi-lingual benchmark for dense retrieval. In Proceedings of the 1st Workshop on Multilingual Representation Learning, Punta Cana, Dominican Republic, 11 November 2021; pp. 127–137. [Google Scholar]
  29. Carbonell, J.; Goldstein, J. The use of MMR, diversity-based reranking for reordering documents and producing summaries. In Proceedings of the 21st Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, Melbourne, Australia, 24–28 August 1998; pp. 335–336. [Google Scholar]
  30. Zhai, C.; Cohen, W.W.; Lafferty, J. Beyond independent relevance: Methods and evaluation metrics for subtopic retrieval. In Proceedings of the 26th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, Toronto, Canada, 28 July–1 August 2003; pp. 10–17. [Google Scholar]
  31. Chen, H.; Karger, D.R. Less is more: Probabilistic models for retrieving fewer relevant documents. In Proceedings of the 29th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, Seattle, WA, USA, 6–11 August 2006; pp. 429–436. [Google Scholar]
  32. Radlinski, F.; Kleinberg, R.; Joachims, T. Learning diverse rankings with multi-armed bandits. In Proceedings of the 25th International Conference on Machine Learning, Helsinki, Finland, 5–9 July 2008; pp. 784–791. [Google Scholar]
  33. Agrawal, R.; Gollapudi, S.; Halverson, A.; Ieong, S. Diversifying search results. In Proceedings of the 2nd ACM International Conference on Web Search and Data Mining, Barcelona, Spain, 9–11 February 2009; pp. 5–14. [Google Scholar]
  34. Kunaver, M.; Požrl, T. Diversity in recommender systems–A survey. Knowl.-Based Syst. 2017, 123, 154–162. [Google Scholar] [CrossRef]
  35. Antikacioglu, A.; Ravi, R. Post processing recommender systems for diversity. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, 13–17 August 2017; pp. 707–716. [Google Scholar]
  36. Wilhelm, T.; Nikfarjam, A.; Hatmi, A.; Weeds, E. Practical diversified recommendations on YouTube with determinantal point processes. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management, Torino, Italy, 22–26 October 2018; pp. 2165–2173. [Google Scholar]
  37. Motwani, R.; Raghavan, P. Randomized Algorithms; Cambridge University Press: Cambridge, UK, 1995. [Google Scholar]
  38. Hinton, G.; Vinyals, O.; Dean, J. Distilling the knowledge in a neural network. arXiv 2015, arXiv:1503.02531. [Google Scholar] [CrossRef]
  39. Tang, R.; Lu, Y.; Liu, L.; Mou, L.; Vechtomova, O.; Lin, J. Distilling task-specific knowledge from BERT into simple neural networks. arXiv 2019, arXiv:1903.12136. [Google Scholar] [CrossRef]
  40. Sun, S.; Cheng, Y.; Gan, Z.; Liu, J. Patient knowledge distillation for BERT model compression. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, Hong Kong, China, 3–7 November 2019; pp. 4323–4332. [Google Scholar]
  41. Jiao, X.; Yin, Y.; Shang, L.; Jiang, X.; Chen, X.; Li, L.; Wang, F.; Liu, Q. TinyBERT: Distilling BERT for natural language understanding. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, Virtual, 16–20 November 2020; pp. 4163–4174. [Google Scholar]
  42. Wang, W.; Wei, F.; Dong, L.; Bao, H.; Yang, N.; Zhou, M. MiniLM: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. Adv. Neural Inf. Process. Syst. 2020, 33, 5776–5788. [Google Scholar]
  43. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30. [Google Scholar]
  44. Gu, Y.; Dong, L.; Wei, F.; Huang, M. Minillm: Knowledge distillation of large language models. arXiv 2023, arXiv:2306.08543. [Google Scholar] [CrossRef]
  45. You, S.; Xu, C.; Xu, C.; Tao, D. Learning from multiple teacher networks. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, 13–17 August 2017; pp. 1285–1294. [Google Scholar]
  46. Mirzadeh, S.I.; Farajtabar, M.; Li, A.; Levine, N.; Matsukawa, A.; Ghasemzadeh, H. Improved knowledge distillation via teacher assistant. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; Volume 34, pp. 5191–5198. [Google Scholar]
  47. Mukherjee, S.; Awadallah, A.H. XtremeDistil: Multi-stage distillation for massive multilingual models. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5–10 July 2020; pp. 2221–2234. [Google Scholar]
  48. Turc, I.; Chang, M.-W.; Lee, K.; Toutanova, K. Well-read students learn better: On the importance of pre-training compact models. arXiv 2019, arXiv:1908.08962. [Google Scholar] [CrossRef]
  49. Cleverdon, C.W.; Mills, J.; Keen, M. Factors Determining the Performance of Indexing Systems; Volume 1: Design; Volume 2: Test results; Technical Report; Cranfield University: Cranfield, UK, 1966. [Google Scholar]
  50. Järvelin, K.; Kekäläinen, J. Cumulated gain-based evaluation of IR techniques. ACM Trans. Inf. Syst. 2002, 20, 422–446. [Google Scholar] [CrossRef]
  51. Thakur, N.; Reimers, N.; Rücklé, A.; Srivastava, A.; Gurevych, I. BEIR: A heterogenous benchmark for zero-shot evaluation of information retrieval models. arXiv 2021, arXiv:2104.08663. [Google Scholar] [CrossRef]
  52. Kelly, D.; Teevan, J. Implicit feedback for inferring user preference: A bibliography. ACM SIGIR Forum 2003, 37, 18–28. [Google Scholar] [CrossRef]
  53. Joachims, T.; Granka, L.; Pan, B.; Hembrooke, H.; Gay, G. Accurately interpreting clickthrough data as implicit feedback. In Proceedings of the 28th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, Salvador, Brazil, 15–19 August 2005; pp. 154–161. [Google Scholar]
  54. Papineni, K.; Roukos, S.; Ward, T.; Zhu, W.-J. BLEU: A method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, Philadelphia, PA, USA, 6–12 July 2002; pp. 311–318. [Google Scholar]
  55. Lin, C.-Y. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out; Association for Computational Linguistics (ACL): Barcelona, Spain, 2004; pp. 74–81. [Google Scholar]
  56. Radford, A.; Wu, J.; Child, R.; Luan, D.; Amodei, D.; Sutskever, I. Language models are unsupervised multitask learners. OpenAI Blog 2019, 1, 9. [Google Scholar]
  57. Reynolds, L.; McDonell, K. Prompt programming for large language models: Beyond the few-shot paradigm. In Proceedings of the Extended Abstracts of the CHI Conference on Human Factors in Computing Systems, Yokohama, Japan, 8–13 May 2021; pp. 1–7. [Google Scholar]
  58. Li, X.L.; Liang, P. Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics, Virtual, 1–6 August 2021; pp. 4582–4597. [Google Scholar]
  59. Lester, B.; Al-Rfou, R.; Constant, N. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, Online, 7– 11 November 2021; pp. 3045–3059. [Google Scholar]
  60. Zhang, Y.; Mao, Y.; Jiao, S.; Kang, S.; Han, J. Scientific Paper Retrieval with LLM-Guided Semantic-Based Ranking. In Proceedings of the 2025 Findings of the Association for Computational Linguistics: EMNLP, Suzhou, China, 4–9 November 2025. [Google Scholar]
  61. Belinga, A.G.; Tekouabou Koumetio, C.S.; El Haziti, M.; El Hassouni, M. Knowledge Distillation in Image Classification: The Impact of Datasets. Computers 2024, 13, 184. [Google Scholar] [CrossRef]
Figure 1. Comprehensive methodology flowchart illustrating our reasoning-first query–service matching framework with two main components: (1) Algorithmic Design (Section 3.1, Section 3.2, Section 3.3, Section 3.4 and Section 3.5): Teacher model (Qwen-480B) implements multi-criteria evaluation (semantic relevance, business understanding, practical utility, attractiveness) using reasoning-first architecture (explanations before scores), followed by perturbation-based diversity enhancement. Student model (Qwen-0.5B) learns through response-based knowledge distillation with three loss components. (2) System Architecture (Section 3.6): Production deployment uses a Model Deployment Layer (Section 3.6.2) for model serving, Parallel Evaluation Engine (Section 3.6.3) for concurrent service evaluation, and Monitoring subsystem (Section 3.6.4) for quality assurance. This architecture achieves 94% performance retention (P@1: 0.84 vs 0.89), 960× compression, 96× latency improvement, and 1200× cost reduction, bridging algorithmic innovation with production scalability.
Figure 1. Comprehensive methodology flowchart illustrating our reasoning-first query–service matching framework with two main components: (1) Algorithmic Design (Section 3.1, Section 3.2, Section 3.3, Section 3.4 and Section 3.5): Teacher model (Qwen-480B) implements multi-criteria evaluation (semantic relevance, business understanding, practical utility, attractiveness) using reasoning-first architecture (explanations before scores), followed by perturbation-based diversity enhancement. Student model (Qwen-0.5B) learns through response-based knowledge distillation with three loss components. (2) System Architecture (Section 3.6): Production deployment uses a Model Deployment Layer (Section 3.6.2) for model serving, Parallel Evaluation Engine (Section 3.6.3) for concurrent service evaluation, and Monitoring subsystem (Section 3.6.4) for quality assurance. This architecture achieves 94% performance retention (P@1: 0.84 vs 0.89), 960× compression, 96× latency improvement, and 1200× cost reduction, bridging algorithmic innovation with production scalability.
Mathematics 14 00950 g001
Figure 2. Comprehensive performance comparison across all evaluation metrics. Our approach demonstrates consistent superiority in precision, diversity, and user satisfaction measures compared to baseline methods.
Figure 2. Comprehensive performance comparison across all evaluation metrics. Our approach demonstrates consistent superiority in precision, diversity, and user satisfaction measures compared to baseline methods.
Mathematics 14 00950 g002
Figure 3. Ablation study showing the impact of removing individual components on system performance. Each component contributes meaningfully to overall performance, with reasoning-first ordering and multi-criteria evaluation showing the largest effects.
Figure 3. Ablation study showing the impact of removing individual components on system performance. Each component contributes meaningfully to overall performance, with reasoning-first ordering and multi-criteria evaluation showing the largest effects.
Mathematics 14 00950 g003
Figure 4. Analysis of evaluation criteria weights and their performance contributions. The balanced weight distribution ensures comprehensive evaluation, while the contribution analysis validates the importance of each criterion.
Figure 4. Analysis of evaluation criteria weights and their performance contributions. The balanced weight distribution ensures comprehensive evaluation, while the contribution analysis validates the importance of each criterion.
Mathematics 14 00950 g004
Figure 5. Impact of reasoning first architecture on score distribution and consistency. Reasoning-first prompting demonstrates superior score distribution and dramatically reduced variance across query types.
Figure 5. Impact of reasoning first architecture on score distribution and consistency. Reasoning-first prompting demonstrates superior score distribution and dramatically reduced variance across query types.
Mathematics 14 00950 g005
Figure 6. Trade-off between relevance (Precision@1) and diversity (ILD) as perturbation parameter varies. Optimal balance achieved at ϵ m a x = 0.001 , marked with green circle.
Figure 6. Trade-off between relevance (Precision@1) and diversity (ILD) as perturbation parameter varies. Optimal balance achieved at ϵ m a x = 0.001 , marked with green circle.
Mathematics 14 00950 g006
Figure 7. Knowledge distillation effectiveness showing performance retention and learning curves. The distilled student model achieves 94% of teacher performance with dramatic improvements in latency and cost efficiency.
Figure 7. Knowledge distillation effectiveness showing performance retention and learning curves. The distilled student model achieves 94% of teacher performance with dramatic improvements in latency and cost efficiency.
Mathematics 14 00950 g007
Figure 8. Heatmap showing score distributions across different methods for account cancellation query. Our method demonstrates superior discrimination, correctly identifying relevant services with high scores while appropriately ranking related alternatives.
Figure 8. Heatmap showing score distributions across different methods for account cancellation query. Our method demonstrates superior discrimination, correctly identifying relevant services with high scores while appropriately ranking related alternatives.
Mathematics 14 00950 g008
Table 1. Dataset summary statistics.
Table 1. Dataset summary statistics.
CharacteristicValue
Total Queries10,000
Collection PeriodJanuary–June 2024
LanguageChinese
Service Catalog Size500 unique services
Annotated Query–Service Pairs5000
Annotators15 domain experts
Inter-Annotator Agreement (Cohen’s κ )0.78
Query Distribution by Category
Account Management25%
Billing Inquiries20%
Technical Support30%
Service Modifications15%
Promotional Information10%
Complexity Characteristics
Ambiguous Queries32%
Synonym Variations28%
Terminology Mismatch40%
Table 2. Representative dataset examples.
Table 2. Representative dataset examples.
Query (Translated)Matched ServiceRelevance (0–5)Business Value (0–5)
“I want to cancel my account”Account Termination Service5.02.0
“Why is my bill so high?”Billing Inquiry Service4.53.5
“Can’t connect to internet”Technical Support-Connectivity5.03.0
“Upgrade my data plan”Service Plan Upgrade4.84.5
“What promotions available?”Current Promotions Catalog4.24.0
Table 3. Performance comparison across methods.
Table 3. Performance comparison across methods.
MethodP@1P@3nDCG@3ILDSatisfaction
BM250.420.380.390.482.1
Sentence-BERT0.570.520.540.522.7
Fine-tuned BERT0.630.590.610.553.0
GPT-3.50.750.710.730.613.8
Ours (Teacher)0.890.830.850.684.3
Ours (Student)0.840.790.810.694.2
Table 4. Comprehensive model performance and efficiency comparison.
Table 4. Comprehensive model performance and efficiency comparison.
ModelSizeP@1P@3nDCG@3LatencyCost
(B) (ms)($/1 K)
Baseline Models
BERT-base0.110.520.480.49150.0005
BERT-large0.340.590.550.57280.0008
RoBERTa-large0.360.610.570.59320.0009
Fine-tuned BERT0.340.630.590.61300.0008
Large Language Models
GPT-3 (Davinci)1750.720.680.7018000.60
GPT-3.51750.750.710.7312000.40
GPT-44800.870.820.8435001.50
Our Approach
Ours (Teacher)4800.890.830.8524001.20
Ours (Student)0.50.840.790.81250.001
Performance-Efficiency Metrics
Best Baseline0.750.710.7312000.40
Improvement (Teacher)+18.7%+16.9%+16.4% 2.0 × 3.0 ×
Improvement (Student)+12.0%+11.3%+11.0% 48 × 400 ×
Table 5. Performance retention in distilled models.
Table 5. Performance retention in distilled models.
ModelSizeP@1Latency (ms)Cost
Teacher (480B)480B0.892400$1.20/1 K
Student (0.5B)0.5B0.8425$0.001/1 K
Retention1/960×94%96× faster1200× cheaper
Table 6. Performance comparison on an English IT support dataset.
Table 6. Performance comparison on an English IT support dataset.
MethodP@1P@3nDCG@3ILDSatisfaction
English BM250.450.400.420.502.3
English Sentence-BERT0.590.540.560.552.8
English Fine-tuned BERT0.650.600.620.573.2
GPT-3.5 (English)0.770.730.750.633.9
Ours (Teacher-English)0.910.850.870.704.4
Ours (Student-English)0.860.810.830.714.3
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xiang, Y.; Lu, J.; Wei, J.; Hu, Y. Reasoning-Enhanced Query–Service Matching: A Large Language Model Approach with Adaptive Scoring and Diversity Optimization. Mathematics 2026, 14, 950. https://doi.org/10.3390/math14060950

AMA Style

Xiang Y, Lu J, Wei J, Hu Y. Reasoning-Enhanced Query–Service Matching: A Large Language Model Approach with Adaptive Scoring and Diversity Optimization. Mathematics. 2026; 14(6):950. https://doi.org/10.3390/math14060950

Chicago/Turabian Style

Xiang, Yue, Jing Lu, Jinqian Wei, and Yaowen Hu. 2026. "Reasoning-Enhanced Query–Service Matching: A Large Language Model Approach with Adaptive Scoring and Diversity Optimization" Mathematics 14, no. 6: 950. https://doi.org/10.3390/math14060950

APA Style

Xiang, Y., Lu, J., Wei, J., & Hu, Y. (2026). Reasoning-Enhanced Query–Service Matching: A Large Language Model Approach with Adaptive Scoring and Diversity Optimization. Mathematics, 14(6), 950. https://doi.org/10.3390/math14060950

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop