A multi-agent routing method based on difficulty perception recovery and matrix completion
By employing a multi-agent routing method based on sparse evaluation and structure-aware matrix completion, the problems of high computational overhead and semantic mismatch in existing technologies are solved, achieving efficient and accurate agent routing decisions that can adapt to different business needs.
Patent Information
- Application Number
- CN202610926448.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-11-06
AI Technical Summary
Existing agent routing methods in large-scale deployments incur huge computational overhead and struggle to accurately perceive the inherent difficulty of tasks, leading to semantic mismatches and insufficient routing decision accuracy. They perform poorly, especially when dealing with highly complex and specialized long-tail tasks.
We adopt a multi-agent routing method based on difficulty-aware recovery and matrix completion. We construct a sparse performance matrix through a sparse evaluation protocol, combine a structure-aware matrix completion method and a lightweight probe to extract multi-dimensional difficulty features, and use a two-stage retrieval mechanism for accurate mapping and routing decisions. This reduces benchmark testing overhead and improves performance prediction accuracy.
It achieves efficient routing decisions in a large-scale intelligent agent pool iterative environment, accurately perceives task difficulty, avoids semantic mismatch, improves performance prediction accuracy, balances cost and quality, adapts to different business preferences, and reduces benchmark testing costs.
Smart Images

Figure CN123048117A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of large language models, and in particular to a multi-agent routing method based on difficulty-aware recovery and matrix completion. Background Technology
[0002] Agent routing is an important task in multi-agent systems and large-scale language model applications. Its aim is to balance response quality and resource overhead by dynamically selecting the optimal model and policy configuration while ensuring system performance. The core idea is to automatically match queries to the most suitable agent based on the inherent characteristics of the input task, thereby achieving on-demand allocation of computing resources.
[0003] In practical applications, agent routing can significantly improve the overall performance of automated systems. Efficient routing mechanisms are indispensable for fields such as news summary generation, complex logical reasoning, and enterprise-level multimodal task processing. It ensures that the system calls lightweight models to reduce latency when handling trivial tasks, while accurately accessing high-performance large models when facing demanding tasks, ensuring the depth and reliability of inference support, and achieving a globally optimal cost-effectiveness ratio.
[0004] Existing agent routing methods are mainly based on cascade rules or predictive regression. For example, by setting a quality threshold, models of different sizes are guided sequentially to form a cascade architecture of "smaller models trying first, larger models as a backup"; or a classifier is used to predict the expected performance score of each model for the task based on the semantic embedding of the query. In addition, some solutions perform agent selection by calculating the semantic similarity between the real-time query and historical successful cases and using retrieval enhancement.
[0005] However, existing research methods still face significant shortcomings in large-scale deployments: Unsustainable training costs: Many methods rely on exhaustive benchmarking, requiring performance data from all candidate agents on the full dataset. As the agent pool grows or the model iterates frequently, this exhaustive performance evaluation leads to exponential increases in computational overhead. Limited semantic matching dimensions: Most existing matching mechanisms are limited to surface-level semantic relevance, often mistaking "semantic similarity" for "equal difficulty." This mechanism easily overlooks the inherent logical nesting depth of tasks, the breadth of domain-specific knowledge, and the constraints of multi-step reasoning. Consequently, routing decisions lack accuracy when handling highly complex and specialized long-tail tasks, making it difficult to achieve truly intelligent task routing.
[0006] A search revealed Chinese Patent Publication No. CN119514638, which discloses a dynamic and efficient routing method and apparatus for a hybrid expert large model. The method includes: acquiring input data and a pre-trained hybrid expert large model, wherein the hybrid expert large model includes an allocator module and a router; dividing the input data into multiple terms; using the allocator module to determine the optimal number of experts for each term; and using the router to select an expert combination for each term based on the optimal number of experts, and routing each term to the corresponding expert combination. However, this existing patent exhibits exponentially increasing evaluation costs as the data scale and number of models increase, lacking sustainable deployment capabilities. Furthermore, this existing patent only focuses on surface semantic similarity, incorrectly equating "semantic similarity" with "difficulty equivalence," ignoring the inherent differences in task logical depth, knowledge breadth, and constraint complexity, easily leading to routing errors of "semantic similarity but mismatched difficulty."
[0007] Therefore, existing technologies suffer from significant overhead in benchmarking of agent performance, a lack of accurate perception of the inherent difficulty of tasks in routing logic, and a tendency to generate semantic mismatches, which are technical problems that need to be solved. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a multi-agent routing method based on difficulty-aware recovery and matrix completion.
[0009] The objective of this invention can be achieved through the following technical solutions: A multi-agent routing method based on difficulty-aware recovery and matrix completion includes the following steps: Step S1: Construct the operation space and build a sparse performance matrix by executing a sparse evaluation protocol; Step S2: Use the structure-aware matrix completion method to perform global performance spectrum recovery on the sparse performance matrix to obtain the performance prediction value of the user's query problem under all agent configurations. Step S3: Use a lightweight probe to extract multi-dimensional difficulty features of the user's query question to be processed, realize the defined difficulty, and enable the routing to have difficulty awareness. Step S4: Use a two-stage retrieval mechanism to retrieve the difficulty-aligned nearest neighbor set of the user's query question to be processed, and accurately map the difficulty. Step S5: Based on the performance mean of the homogeneous nearest neighbor set of the multidimensional difficulty element features, calculate the utility score of each agent configuration, and select the configuration with the highest score as the routing decision.
[0010] As a preferred technical solution, the operating space consists of a Cartesian product of multiple large language models and multiple inference strategies; The sparse performance matrix is constructed by executing a sparse evaluation protocol to obtain the response accuracy and inference cost of the query set on a subset of the operation space.
[0011] As a preferred technical solution, the operating space is defined as follows: : ; in, This is a collection of base language models containing different computational scales and capability gradients. It is a collection that includes various prompting strategies such as direct answering, thought chain reasoning, and abstract backtracking reasoning; The query set is defined as For query sets Each query question Only a subset of anchor point configurations are randomly selected or based on heuristic rules for inference attempts, and their response accuracy is recorded. and the reasoning cost consumed .
[0012] As a preferred technical solution, the structure-aware matrix completion method specifically includes: Based on the accuracy rate and reasoning cost Calculation efficiency score Based on efficiency scores, the system performs weighted feature clustering on the queries to be processed, dividing the query set into multiple difficulty-aligned clusters. Taking advantage of the low-rank property of the performance matrix, a bias-based interpolation algorithm is used within each cluster to reconstruct unobserved performance data; The efficiency score The calculation expression is: ; in, To solve the problem at the minimum logarithmic cost, For the observed cost vector, For stability coefficient, To query the highest logarithmic cost generated across all observation configurations.
[0013] As a preferred technical solution, performing the trade-off between feature clustering and structure-aware performance completion specifically includes: For each query question We construct its trade-off feature vector, which is the set of efficiency scores under the observed configuration, and use a clustering algorithm to divide the query set into multiple clusters that are highly aligned with the difficulty level and performance response pattern; this clustering process decomposes the globally complex nonlinear performance manifold into multiple locally low-rank linear manifolds. Within each cluster, matrix completion theory is used to reconstruct the unobserved data, specifically for the entries to be completed within the cluster. Estimate its performance prediction value according to the following formula. : ; in, This represents the global average accuracy of all evaluated entries within the current cluster. The target base model represents the average accuracy across all evaluated strategies within this cluster. The algorithm measures the average accuracy of the target inference strategy across all evaluated models within the cluster. By capturing the model's inherent capabilities and the strategy's performance bias, the algorithm achieves high-precision interpolation of unknown gaps, ultimately constructing a complete global performance spectrum.
[0014] As a preferred technical solution, the structure-aware matrix completion method satisfies the following theoretical constraints during execution: ; in, The number of observed entries, It is a positive value. For incoherent parameters, Let be the rank of the performance matrix. To maximize the number of queries and the number of agent configurations, the above constraints are satisfied to ensure accurate recovery of the global performance manifold from sparse observations.
[0015] As a preferred technical solution, the dimension difficulty element features include logical depth, knowledge depth, constraint complexity, semantic ambiguity, and symbol density; The logical depth measures the number of reasoning steps required to derive a conclusion from known conditions, reflecting logical complexity. The knowledge depth measure whether the required knowledge belongs to a scarce field or a specific discipline, reflecting the knowledge threshold. The constraint complexity measures the stringency of the format, word count, or rule constraints that the output must follow; The semantic ambiguity measures the clarity of the intended expression and assesses the potential risk of misunderstanding. The symbol density measures the frequency of occurrence of mathematical formulas, code snippets, or structured symbols.
[0016] As a preferred technical solution, the lightweight probe is a small-scale language model guided by prompting engineering, used to quantitatively evaluate the query question in five dimensions: logical depth, knowledge depth, constraint complexity, semantic ambiguity, and symbol density. The logic depth assessment primarily evaluates the length of the reasoning chain; The knowledge depth assessment primarily evaluates the scarcity of the required professional knowledge; The constraint complexity evaluation mainly assesses the output constraints; The semantic ambiguity assessment primarily evaluates the clarity of the instructions; The symbol density assessment mainly evaluates the frequency of occurrence of statistical mathematical formulas, code segments, and special logic symbols.
[0017] As a preferred technical solution, the two-stage retrieval mechanism specifically includes: The first stage is semantic coarse screening: extracting the target query question based on the semantic encoder. The semantic embedding vectors are used to calculate their cosine similarity with samples in the historical database, quickly filtering out the top samples. The set of the most semantically relevant candidate samples; The second stage is difficulty-aware reordering: calculating the target query problem. Construct deep interaction feature vectors from interaction feature vectors with candidate nearest neighbors. The algorithm uses a regressor to predict the affinity of candidate nearest neighbors for the target query performance prediction, and then selects a difficulty-aligned nearest neighbor set. ; The deep interaction feature vector : ; in, To bridge the gap in difficulty between new queries and historical samples, As a historical sample, These are cross-multiplication terms of features across various dimensions, used to capture nonlinear difficulty coupling effects; The interaction vectors are input into a regression model to predict the affinity of candidate samples for the current query performance estimate. By eliminating samples that "look similar but are not equally difficult," the top-ranking nearest neighbor set is finally identified. .
[0018] As a preferred technical solution, the utility score calculation process for the routing decision is as follows: Configure for each potential configuration in the operating space The system aggregates The performance data of each sample in the set in the completion performance spectrum are used to calculate its effectiveness for the target query problem. Expected utility : ; in, The restored prediction accuracy. The restored predicted cost, A cost sensitivity coefficient defined by the user; when At higher levels, a preference is placed on lightweight agents; when When the value is low, it tends to call powerful large models to ensure high-quality output; Final output expected utility The configuration with the highest value is used as the routing choice, thereby accurately locating the optimal combination of agents that meets the user's specific performance-cost preferences in the discrete operating space.
[0019] Compared with the prior art, the present invention has the following beneficial effects: 1. By employing routing decisions to accurately perceive task difficulty, semantic mismatches are avoided; Unlike traditional matching logic that relies solely on surface semantic similarity: 1) By extracting five-dimensional difficulty features—logic depth, knowledge depth, constraint complexity, semantic ambiguity, and symbol density—using lightweight probes, a difficulty quantification system independent of the semantic space was constructed, which can distinguish between tasks that are "semantically similar but have vastly different reasoning requirements, professional thresholds, and constraints." 2) Two-stage retrieval mechanism: First, the candidate range is narrowed down by semantic coarse screening, and then samples that are "semantically similar but not in sync" are eliminated by difficulty interaction feature rearrangement. The final nearest neighbor set matches both semantic relevance and difficulty consistency, which solves the problem of insufficient routing accuracy for long-tail high-difficulty tasks caused by existing methods equating "semantic similarity" with "difficulty parity".
[0020] 2. Higher performance prediction accuracy, balancing cost and quality; Structure-aware matrix completion is not a globally uniform completion: 1) Based on efficiency scores, perform difficulty-aligned clustering on queries, decomposing the global nonlinear performance manifold into multiple local low-rank linear manifolds; 2) Within each cluster, missing data is filled in using interpolation logic based on global average accuracy, model capability background, and policy efficiency bias. Compared to general matrix completion, this approach better reflects the distribution of multi-agent performance and results in lower performance prediction errors.
[0021] 3. Significantly reduces benchmark testing overhead, adapting to large-scale agent pool iterations: Instead of iterating through all agent configurations for all queries, performance evaluation can be performed by randomly or heuristically selecting a subset of anchor point configurations for a single query.
[0022] 4. Routing decisions can flexibly adapt to different business preferences. An adjustable cost sensitivity coefficient is introduced: when this sensitivity coefficient is increased, lightweight and low-power configurations are prioritized, which is suitable for scenarios that are sensitive to response speed and cost; when this sensitivity coefficient is decreased, high-performance configurations are prioritized, which is suitable for professional scenarios with extremely high output quality requirements. It can meet the personalized cost and performance trade-offs of different businesses within the same framework without retraining the routing model. Attached Figure Description
[0023] Figure 1 This is a schematic diagram illustrating the specific process of the method of the present invention. Detailed Implementation
[0024] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0025] Example 1: like Figure 1 The diagram shown is a flowchart of the present invention, including: Step S1: Construct an operation space consisting of the intersection of a large language model and an inference strategy, and construct a sparse performance matrix by executing a sparse evaluation protocol; Step S2: Use the structure-aware matrix completion method to perform global performance spectrum recovery on the sparse performance matrix to obtain the performance prediction value of the user's query problem under all agent configurations. Step S3: Use a lightweight probe to extract the multidimensional difficulty features of the user's query question to be processed; Step S4: Use a two-stage retrieval mechanism to retrieve the difficulty-aligned nearest neighbor set of the user's query question; Step S5: Based on the performance mean of the homogeneous nearest neighbor set of the multidimensional difficulty element features, calculate the utility score of each agent configuration, and select the configuration with the highest score as the routing decision.
[0026] In step S1, the operation space consists of the Cartesian product of multiple large language models and multiple inference strategies. By executing a sparse evaluation protocol, the response accuracy and inference cost of the query set on a subset of the operation space are obtained, and a sparse performance matrix is constructed. The operation space consists of the Cartesian product of multiple large language models and multiple inference strategies. By executing a sparse evaluation protocol, the response accuracy and inference cost of the query set on a subset of the operation space are obtained, and a sparse performance matrix is constructed. The operating space is defined as : ; in, This is a collection of base language models containing different computational scales and capability gradients. It is a collection that includes various prompting strategies such as direct answering, thought chain reasoning, and abstract backtracking reasoning; The query set is defined as For query sets Each query question Only a subset of "anchor" configurations are randomly selected or based on heuristic rules for inference attempts, and their response accuracy is recorded. and the reasoning cost consumed .
[0027] In this way, while ensuring the statistical significance of the data structure, the data acquisition cost of benchmark testing can be reduced to one-half to two-thirds of the conventional level.
[0028] In step S2, the structure-aware matrix completion method includes: Based on the observed accuracy and reasoning cost Calculation efficiency score Based on efficiency scores, the system performs weighted feature clustering on the queries to be processed, dividing the query set into multiple difficulty-aligned clusters. By leveraging the low-rank property of the performance matrix, a bias-based interpolation algorithm is used within each cluster to reconstruct unobserved performance data.
[0029] The efficiency score The calculation expression is: ; in, To solve this problem, the minimum logarithmic cost, For the observed cost vector, For stability coefficient, This query generates the highest logarithmic cost across all observation configurations; This formula smooths the cost span through logarithmic transformation, subjecting the accuracy score to a penalty constraint of resource expenditure, and calculating the efficiency score. Standardized within the range [0,1], a higher score indicates that the configuration can solve the current problem with lower resource costs; efficiency score The design fully considers the balance between performance and cost in the nonlinear space. It adopts... The reasoning cost is addressed because in multi-agent systems, the cost range of models of different sizes can span several orders of magnitude. Directly using the raw cost would lead to the utility function being dominated by the high-cost model, thus masking performance differences. Through logarithmic transformation, this invention can compress the cost to a comparable range.
[0030] In addition, the stability coefficient in the formula This is not only to prevent the denominator from being zero, but more importantly, it adjusts the system's sensitivity to "zero-cost potential." Within the standardized interval [0,1], the closer the score is to 1, the closer the configuration is to the "optimal cost-effectiveness boundary" of the current query across all observed configurations. This quantification method provides statistically significant input features for subsequent trade-off feature clustering, ensuring that the clustering results reflect the true reasoning difficulty of the query problem, rather than just semantic classification.
[0031] Example 2: The performance completion of the trade-off feature clustering and edge-bias-based structure-aware performance enhancement includes: 1) For each query question We construct its trade-off feature vector, which is the set of efficiency scores under the observed configuration, and use a clustering algorithm to divide the query set into multiple clusters that are highly aligned with the difficulty level and performance response pattern; this clustering process decomposes the globally complex nonlinear performance manifold into multiple locally low-rank linear manifolds. 2) Within each cluster, matrix completion theory is used to reconstruct the unobserved data. Specifically, for each entry to be completed within the cluster... Estimate its performance prediction value according to the following formula. : ; in, This represents the global average accuracy of all evaluated entries within the current cluster. The target base model represents the average accuracy across all evaluated strategies within this cluster. The algorithm measures the average accuracy of the target inference strategy across all evaluated models within the cluster. By capturing the model's inherent capabilities and the strategy's performance bias, the algorithm achieves high-precision interpolation of unknown gaps, ultimately constructing a complete global performance spectrum.
[0032] The structure-aware matrix completion method satisfies the following theoretical constraints during execution: ; in, The number of observed entries, It is a positive value. For incoherent parameters, Let be the rank of the performance matrix. To maximize the number of queries and the number of agent configurations, the above constraints are satisfied to ensure accurate recovery of the global performance manifold from sparse observations.
[0033] In step S3, the multidimensional difficulty element features include logical depth, knowledge depth, constraint complexity, semantic ambiguity, and symbol density. The logic depth assessment primarily evaluates the length of the reasoning chain; The knowledge depth assessment primarily evaluates the scarcity of the required professional knowledge; The constraint complexity evaluation mainly assesses the output constraints; The semantic ambiguity assessment primarily evaluates the clarity of the instructions; The symbol density assessment mainly evaluates the frequency of occurrence of statistical mathematical formulas, code segments, and special logic symbols. The probe agent outputs a five-dimensional difficulty feature vector. This vector provides a structured basis for solving the matching problem of "semantically related but mismatched in difficulty".
[0034] Lightweight probes are small-scale language models guided by hint engineering, used to quantitatively score query questions across the five dimensions mentioned above. The specific scoring criteria are as follows: Logical depth: This mainly assesses the length of the reasoning chain; for example, simple common sense questions are rated 1 point; complex queries that require multiple steps of induction, deduction or mathematical proof are rated 4-5 points.
[0035] Knowledge Depth: Assess the scarcity of the required professional knowledge; general knowledge questions are rated 1 point; specialized inquiries involving quantum physics, cutting-edge biochemistry, or specific legal provisions are rated 4-5 points.
[0036] Constraint complexity: Evaluate output constraints; if only the answer is required, get 1 point; if a specific output format (such as JSON), word limit, and must meet a specific tone or quotation format are required, get 4-5 points.
[0037] Semantic ambiguity: Assess the clarity of instructions; clear instructions (such as "calculate 1+1") receive 1 point; instructions with ambiguous intent, ambiguity, or requiring contextual completion receive 4-5 points.
[0038] Symbol density: the frequency of occurrence of statistical mathematical formulas, code segments, and special logical symbols; through the quantitative characterization of these five dimensions, this invention can construct a "difficulty space manifold", thereby solving the problem of "semantic similarity but difficulty mismatch" in traditional semantic matching.
[0039] In step S4, the two-stage retrieval mechanism specifically includes: The first stage is semantic coarse screening: extracting the target query question based on the semantic encoder. The semantic embedding vectors are used to calculate their cosine similarity with samples in the historical database, quickly filtering out the top samples. The set of the most semantically relevant candidate samples; The second stage is difficulty-aware reordering: calculating the target query problem. Construct deep interaction feature vectors from interaction feature vectors with candidate nearest neighbors. The algorithm uses a regressor to predict the affinity of candidate nearest neighbors for the target query performance prediction, and then selects a difficulty-aligned nearest neighbor set. .
[0040] For candidate samples, construct deep interaction feature vectors. : ; in, To bridge the "difficulty gap" between new queries and historical samples As a historical sample, These are cross-multiplication terms of features across various dimensions, used to capture nonlinear difficulty coupling effects; The interaction vectors are input into a regression model to predict the affinity of candidate samples for the current query performance estimate. By eliminating samples that "look similar but are not equally difficult," the top-ranking nearest neighbor set is finally identified. .
[0041] In step S5, the utility score calculation process for the routing decision is as follows: For each potential configuration in the operation space... The system aggregates The performance data of each sample in the set in the completion performance spectrum are used to calculate its effectiveness for the target query problem. Expected utility : ; in, The restored prediction accuracy. The restored predicted cost, A cost sensitivity coefficient defined by the user; when At higher levels, a preference is placed on lightweight agents; when When the value is low, it tends to call powerful large models to ensure high-quality output; Final output expected utility The configuration with the highest value is used as the routing choice, thereby accurately locating the optimal combination of agents that meets the user's specific performance-cost preferences in the discrete operating space.
[0042] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A multi-agent routing method based on difficulty-aware recovery and matrix completion, characterized in that, Includes the following steps: Step S1: Construct the operation space and build a sparse performance matrix by executing a sparse evaluation protocol; Step S2: Use the structure-aware matrix completion method to perform global performance spectrum recovery on the sparse performance matrix to obtain the performance prediction value of the user's query problem under all agent configurations. Step S3: Use a lightweight probe to extract multi-dimensional difficulty features of the user's query question to be processed, realize the defined difficulty, and enable the routing to have difficulty awareness. Step S4: Use a two-stage retrieval mechanism to retrieve the difficulty-aligned nearest neighbor set of the user's query question to be processed, and accurately map the difficulty. Step S5: Based on the performance mean of the homogeneous nearest neighbor set of the multidimensional difficulty element features, calculate the utility score of each agent configuration, and select the configuration with the highest score as the routing decision.
2. The multi-agent routing method based on difficulty perception recovery and matrix completion according to claim 1, characterized in that, The operating space consists of the Cartesian product of multiple large language models and multiple inference strategies; The sparse performance matrix is constructed by executing a sparse evaluation protocol to obtain the response accuracy and inference cost of the query set on a subset of the operation space.
3. The multi-agent routing method based on difficulty-aware recovery and matrix completion according to claim 1, characterized in that, The operation space is defined as : ; in, This is a collection of base language models containing different computational scales and capability gradients. It is a collection that includes various prompting strategies such as direct answering, thought chain reasoning, and abstract backtracking reasoning; The query set is defined as For query sets Each query question Only a subset of anchor point configurations are randomly selected or based on heuristic rules for inference attempts, and their response accuracy is recorded. and the reasoning cost consumed .
4. A multi-agent routing method based on difficulty-aware recovery and matrix completion according to claim 1 or 3, characterized in that, The structure-aware matrix completion method specifically includes: Based on the accuracy rate and reasoning cost Calculation efficiency score Based on efficiency scores, the system performs weighted feature clustering on the queries to be processed, dividing the query set into multiple difficulty-aligned clusters. By leveraging the low-rank property of the performance matrix, a bias-based interpolation algorithm is used within each cluster to reconstruct unobserved performance data; The efficiency score The calculation expression is: ; in, To solve the problem at the minimum logarithmic cost, For the observed cost vector, For stability coefficient, To query the highest logarithmic cost generated across all observation configurations.
5. A multi-agent routing method based on difficulty-aware recovery and matrix completion according to claim 4, characterized in that, Performing the trade-off between feature clustering and structure-aware performance completion specifically includes: For each query question We construct its trade-off feature vector, which is the set of efficiency scores under the observed configuration, and use a clustering algorithm to divide the query set into multiple clusters that are highly aligned with the difficulty level and performance response pattern; this clustering process decomposes the globally complex nonlinear performance manifold into multiple locally low-rank linear manifolds. Within each cluster, matrix completion theory is used to reconstruct the unobserved data, specifically for the entries to be completed within the cluster. Estimate its performance prediction value according to the following formula. : ; in, This represents the global average accuracy of all evaluated entries within the current cluster. The target base model represents the average accuracy across all evaluated strategies within this cluster. The algorithm measures the average accuracy of the target inference strategy across all evaluated models within the cluster. By capturing the model's inherent capabilities and the strategy's performance bias, the algorithm achieves high-precision interpolation of unknown gaps, ultimately constructing a complete global performance spectrum.
6. A multi-agent routing method based on difficulty-aware recovery and matrix completion according to claim 5, characterized in that, The structure-aware matrix completion method satisfies the following theoretical constraints during execution: ; in, The number of observed entries, It is a positive value. For incoherent parameters, Let be the rank of the performance matrix. To maximize the number of queries and the number of agent configurations, the above constraints are satisfied to ensure accurate recovery of the global performance manifold from sparse observations.
7. A multi-agent routing method based on difficulty-aware recovery and matrix completion according to claim 1, characterized in that, The dimensional difficulty features include logical depth, knowledge depth, constraint complexity, semantic ambiguity, and symbol density. The logical depth measures the number of reasoning steps required to derive a conclusion from known conditions, reflecting logical complexity. The knowledge depth measure whether the required knowledge belongs to a scarce field or a specific discipline, reflecting the knowledge threshold. The constraint complexity measures the stringency of the format, word count, or rule constraints that the output must follow; The semantic ambiguity measures the clarity of the intended expression and assesses the potential risk of misunderstanding. The symbol density measures the frequency of occurrence of mathematical formulas, code snippets, or structured symbols.
8. A multi-agent routing method based on difficulty-aware recovery and matrix completion according to claim 1 or 7, characterized in that, The lightweight probe is a small-scale language model guided by prompting engineering, used to quantitatively evaluate query questions in five dimensions: logical depth, knowledge depth, constraint complexity, semantic ambiguity, and symbol density. The logic depth assessment primarily evaluates the length of the reasoning chain; The knowledge depth assessment primarily evaluates the scarcity of the required professional knowledge; The constraint complexity evaluation mainly assesses the output constraints; The semantic ambiguity assessment primarily evaluates the clarity of the instructions; The symbol density assessment mainly evaluates the frequency of occurrence of statistical mathematical formulas, code segments, and special logic symbols.
9. A multi-agent routing method based on difficulty-aware recovery and matrix completion according to claim 1, characterized in that, The two-stage retrieval mechanism specifically includes: The first stage is semantic coarse screening: extracting the target query question based on the semantic encoder. The semantic embedding vector is used to calculate its cosine similarity with samples in the historical database, and the top samples are quickly selected. The set of the most semantically relevant candidate samples; The second stage is difficulty-aware reordering: calculating the target query problem. Construct deep interaction feature vectors from interaction feature vectors with candidate nearest neighbors. The algorithm uses a regressor to predict the affinity of candidate nearest neighbors for the target query performance prediction, and then selects a difficulty-aligned nearest neighbor set. ; The deep interaction feature vector : ; in, To bridge the gap in difficulty between new queries and historical samples, As a historical sample, These are cross-multiplication terms of features across various dimensions, used to capture nonlinear difficulty coupling effects; The interaction vectors are fed into a regression model to predict the affinity of candidate samples for the current query performance estimate. By eliminating samples that "look similar but are not equally difficult," the top-ranking nearest neighbor set is ultimately identified. .
10. A multi-agent routing method based on difficulty-aware recovery and matrix completion according to claim 1, characterized in that, The utility score calculation process for the routing decision is as follows: Configure for each potential configuration in the operating space The system aggregates The performance data of each sample in the set in the completion performance spectrum are used to calculate its effectiveness for the target query problem. Expected utility : ; in, The restored prediction accuracy. The restored predicted cost, A cost sensitivity coefficient defined by the user; when At higher levels, a preference is placed on lightweight agents; when When the value is low, it tends to call powerful large models to ensure high-quality output; Final output expected utility The configuration with the highest value is used as the routing choice, thereby accurately locating the optimal combination of agents that meets the user's specific performance-cost preferences in the discrete operating space.
