A multi-agent retrieval augmented generation method and system

By using a multi-agent collaborative architecture for parsing, transformation, and verification, the efficiency and accuracy issues of traditional retrieval systems in complex queries and heterogeneous databases are resolved, enabling efficient and accurate generation of retrieval results.

CN120804377BActive Publication Date: 2025-11-11SHENZHEN CHUANGZHI MINIMALIST TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511304539.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2025-11-11
Estimated Expiration
2045-09-12

AI Technical Summary

Technical Problem

Traditional retrieval enhancement generation systems struggle to adapt to multi-dimensional query needs when faced with complex query intents and heterogeneous databases. They suffer from insufficient coverage or redundant conflicts in search results, increased response latency, and a lack of end-to-end retrieval quality assurance.

Method used

A multi-agent collaborative architecture is adopted. The first agent parses the task instructions to generate a retrieval feature set. The second agent performs targeted semantic transformation based on the retrieval strategy identifier. The database partition is located and metadata features are extracted using the target partition identifier. The third agent is selected to perform the query operation. Finally, the fourth agent performs verification and optimization to achieve end-to-end quality assurance.

Benefits of technology

It significantly improves retrieval coverage and result accuracy, reduces response latency, and enhances retrieval efficiency and quality, enabling it to adapt to complex query tasks across domains and databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804377B_ABST
    Figure CN120804377B_ABST
Patent Text Reader

Abstract

This application relates to a multi-agent retrieval enhancement generation method and system, which includes the following steps: parsing the task instruction through a first agent to generate a retrieval feature set; matching several corresponding second agents and performing directional semantic transformation on the original semantic vector to generate a query statement set; filtering several third agents and executing query operations through the third agents to obtain a preliminary retrieval set; inputting the preliminary retrieval set and the retrieval feature set into a fourth agent for verification to generate optimized retrieval results. In summary, the multi-agent retrieval enhancement generation method and system provided in this application realizes intelligent parsing of task instructions, cross-modal semantic transformation, dynamic database partitioning scheduling, and optimized verification of retrieval results through a multi-agent collaborative mechanism, which has the effects of improving retrieval accuracy and efficiency, enhancing adaptability to complex query intentions, and optimizing the collaborative retrieval capabilities of heterogeneous databases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of retrieval enhancement generation, and in particular to a multi-agent retrieval enhancement generation method and system. Background Technology

[0002] In the current field of information retrieval and knowledge management, the technical framework based on Retrieval-Augmented Generation (RAG) has been widely used in scenarios such as intelligent question answering, document analysis, and big data decision support.

[0003] Traditional RAG systems typically rely on a cascaded structure of a single retrieval model and a generative model. The general process involves first retrieving relevant document fragments from a knowledge base using a retrieval module, and then having a language model synthesize and output the answer. However, with increasingly complex application scenarios and ever-expanding data volumes, traditional RAG systems have gradually revealed the following shortcomings: First, single retrieval models often employ fixed retrieval strategies, making it difficult to adapt to multi-dimensional and heterogeneous user query intentions. This is especially true when queries involve complex semantic requirements across domains or databases, or when multiple query tasks are performed, leading to insufficient coverage or redundant conflicts in the search results. Second, due to a lack of dynamic awareness and scheduling capabilities regarding the underlying database structure, traditional RAG systems struggle to optimize retrieval paths based on data distribution characteristics and storage features, resulting in increased response latency and decreased retrieval accuracy.

[0004] Furthermore, existing RAG systems lack intelligent collaborative mechanisms in key areas such as query transformation, retrieval optimization, and result verification, failing to achieve end-to-end retrieval quality assurance. Especially when dealing with large-scale heterogeneous databases, traditional methods struggle to effectively coordinate retrieval strategies across different data partitions, making it difficult to balance retrieval efficiency and accuracy. Summary of the Invention

[0005] To address the aforementioned shortcomings, this application provides a multi-agent retrieval enhancement generation method and system.

[0006] The above-mentioned objective of this application is achieved through the following technical solution:

[0007] A multi-agent retrieval enhancement generation method includes the following steps:

[0008] In response to the received task instruction, the first intelligent agent parses the task instruction and generates a retrieval feature set, which includes the original semantic vector, retrieval strategy identifier and target partition identifier.

[0009] Based on the retrieval strategy identifier, several corresponding second agents are matched, and the original semantic vector is subjected to targeted semantic transformation through the matched second agents to generate a set of query statements.

[0010] Based on the target partition identifier, the corresponding database partition is matched from the preset retrieval database, and metadata features are extracted;

[0011] Several third agents are selected based on metadata features and retrieval strategy identifiers, and the selected third agents perform query operations based on the query statement set in the matching database partitions to obtain a preliminary retrieval set.

[0012] The preliminary retrieval set and the retrieval feature set are input into the fourth agent, which then verifies the preliminary retrieval set based on a preset set of verification rules and generates optimized retrieval results.

[0013] By adopting the above technical solution, the first intelligent agent performs deep analysis of task instructions and generates a retrieval feature set containing original semantic vectors, retrieval strategy identifiers, and target partition identifiers, achieving accurate understanding and structured representation of user query intent. Based on the retrieval strategy identifiers, the second intelligent agent performs targeted semantic transformation to generate a set of query statements adapted to different retrieval needs, effectively solving the problem of traditional systems having a single retrieval strategy and being unable to adapt to complex query intents. The target partition identifier is used to locate database partitions and extract metadata features, and then the third intelligent agent is selected to perform partitioned query operations, significantly improving the perception of data distribution characteristics and the level of retrieval path optimization. Finally, the fourth intelligent agent performs multi-dimensional verification and optimization of the preliminary retrieval results, establishing an end-to-end quality assurance mechanism. By constructing the above-mentioned multi-agent collaborative architecture, this application can significantly improve retrieval coverage and result accuracy when facing complex query tasks such as cross-domain and cross-database queries, while greatly reducing response latency, thus improving retrieval efficiency and retrieval quality.

[0014] In a preferred embodiment, this application can be further configured as follows: the first intelligent agent includes a feature extraction layer, an anomaly detection layer, an anomaly analysis layer, and an anomaly handling layer; the step of responding to a received task instruction by parsing the task instruction through the first intelligent agent to generate a retrieval feature set, wherein the retrieval feature set includes an original semantic vector, a retrieval strategy identifier, and a target partition identifier, includes the following steps:

[0015] The key features in the task instructions are extracted through the feature extraction layer. These key features include entity features, query constraint features, and ranking features.

[0016] An anomaly detection layer identifies anomalous factors in task instructions, including anomalous syntax, anomalous vocabulary, and anomalous logic.

[0017] The anomaly analysis layer performs correlation analysis on key features and anomalous factors, and marks the anomaly level.

[0018] The exception handling layer executes a preset exception handling strategy on the exception factors based on the exception level labeling results.

[0019] By adopting the above technical solution, a multi-layered collaborative architecture consisting of a feature extraction layer, an anomaly detection layer, an anomaly analysis layer, and an anomaly handling layer is configured in the first intelligent agent to achieve refined parsing and robust processing of task instructions. Specifically, the feature extraction layer extracts entity features, query constraint features, and ranking features from the task instructions, laying a structured data foundation for subsequent processing. The anomaly detection layer comprehensively identifies anomalous factors such as anomalous syntax, anomalous vocabulary, and anomalous logic in the task instructions, thereby effectively dealing with non-standard input. The anomaly analysis layer performs correlation analysis on key features and anomalous factors and marks anomaly levels to achieve anomaly impact assessment. Finally, the anomaly handling layer executes a preset anomaly handling strategy based on the anomaly level marking results to complete targeted processing of anomalous factors. Through this layered processing mechanism, this application achieves effective processing of task instructions with grammatical errors, inappropriate word choice, or logical inconsistencies, significantly improving the adaptability to input task analysis while enhancing the accuracy and completeness of the generated retrieval feature set.

[0020] In a preferred embodiment, this application can be further configured as follows: the step of matching several corresponding second agents based on the retrieval strategy identifier, and performing directional semantic transformation on the original semantic vector through the matched second agents to generate a query statement set includes the following steps:

[0021] The retrieval strategy identifier is matched with a preset agent performance mapping table, which includes the conversion algorithm type, data compatibility, and output level preference of the second agent.

[0022] Based on the performance matching results, the corresponding second agent is scheduled in parallel, and based on the output hierarchy preferences of the second agent, the original semantic vector is input to the corresponding processing layer for hierarchical transformation to generate several heterogeneous query statements.

[0023] By employing a pre-defined semantic collaboration strategy, heterogeneous query statements are subjected to multi-level semantic optimization to generate a set of query statements.

[0024] By adopting the above technical solution, an agent performance mapping table is established and accurately matched with the retrieval strategy identifier, thereby achieving the scheduling and efficient utilization of the second agent. Specifically, by matching the retrieval strategy identifier with the agent performance mapping table, which includes conversion algorithm type, data compatibility, and output level preference, it is ensured that the conversion of each retrieval task can be assigned to the most suitable second agent. Based on the performance matching results, multiple second agents are scheduled in parallel, and the original semantic vectors are input to the corresponding processing layer for hierarchical conversion according to their output level preferences, giving full play to the professional advantages of different second agents. Finally, the generated heterogeneous query statements are semantically optimized at multiple levels through a preset semantic collaboration strategy, effectively integrating query expressions at different abstraction levels, and ultimately generating a high-quality and diverse set of query statements. This application significantly improves the accuracy and completeness of query statement generation through the above-mentioned agent collaboration mechanism, ensures high compatibility between query statements and the target database, and greatly improves the efficiency of query generation through parallel processing.

[0025] In a preferred embodiment, this application can be further configured as follows: the processing layer includes a fuzzy concept layer, a relation parsing layer, and an instance matching layer; the step of parallel scheduling of the corresponding second agent based on the performance matching result, and inputting the original semantic vector into the corresponding processing layer for hierarchical transformation based on the output hierarchical preferences of the second agent to generate several heterogeneous query statements includes the following steps:

[0026] Adaptive slicing is performed on the original semantic vector, and concept features, association features, and instance features are extracted.

[0027] Based on the output hierarchy preference, conceptual features, association features, and instance features are input to the corresponding processing layer;

[0028] The input conceptual features are semantically generalized through a fuzzy concept layer to generate fuzzy query statements.

[0029] The relationship parsing layer performs path reasoning on the input association features to generate a graph query statement;

[0030] The instance matching layer maps the input instance features to terms to generate structured query statements.

[0031] By adopting the above technical solution, a multi-layered processing architecture comprising a fuzzy concept layer, a relation parsing layer, and an instance matching layer is constructed to achieve hierarchical transformation of the original semantic vector. Specifically, the original semantic vector is adaptively segmented and conceptual features, association features, and instance features are extracted to achieve structured decomposition of semantic information. Based on the output hierarchy preferences of the second agent, different features are input into the corresponding processing layers to ensure accurate matching between features and processing capabilities. The fuzzy concept layer performs semantic generalization processing on conceptual features to generate fuzzy query statements that can capture semantic similarity. The relation parsing layer performs path reasoning on association features to generate graph query statements that can express complex association relationships. The instance matching layer performs term mapping on instance features to generate structured query statements that support precise matching. By constructing the above-mentioned hierarchical processing mechanism, this application can simultaneously support query needs of different abstraction levels and different expression methods, significantly improving the semantic coverage and expressive power of query statements, and enhancing query accuracy.

[0032] In a preferred embodiment, this application can be further configured as follows: the step of performing multi-level semantic optimization on heterogeneous query statements through a preset semantic collaboration strategy to generate a query statement set includes the following steps:

[0033] Identify cross-modal semantic relationships among fuzzy query statements, graph query statements, and structured query statements. These cross-modal semantic relationships include semantic equivalence, semantic complementarity, and semantic contradiction.

[0034] A cross-modal semantic association matrix is ​​constructed based on cross-modal semantic relations, and multi-level semantic optimization is performed on the cross-modal semantic association matrix through a semantic collaboration strategy to generate multi-level optimized statements, including equivalent optimized query statements, enhanced compound query statements, and contradiction arbitration query statements.

[0035] The multi-level optimization statements are restructured and the corresponding query syntax adaptation strategy preset by the retrieval database is executed to generate a set of query statements.

[0036] By adopting the above technical solution, heterogeneous query statements are integrated and optimized using a preset semantic collaboration strategy to achieve the fusion of multimodal query statements. Specifically, by identifying the semantic equivalence, complementarity, and contradiction relationships between fuzzy query statements, graph query statements, and structured query statements, a diverse cross-modal semantic association network is established. Based on the aforementioned semantic relationships, a cross-modal semantic association matrix is ​​constructed, and a semantic collaboration strategy is used for multi-level optimization processing to generate multi-level optimized statements, including equivalent optimized query statements, enhanced composite query statements, and contradiction arbitration query statements. Finally, by structurally reorganizing the optimized statements and executing a query syntax adaptation strategy, a final unified query statement set is generated. This application effectively solves the conflict and redundancy problems between multi-source heterogeneous query statements through the above semantic collaboration strategy, significantly improves the semantic consistency and execution efficiency of query statements, and eliminates possible logical contradictions as much as possible while retaining the advantages of different query expression methods, ultimately generating a high-quality, executable query statement set.

[0037] In a preferred embodiment, this application can be further configured as follows: the metadata features include data distribution features, index structure features, and access pattern features; the step of filtering several third-party agents based on the metadata features and retrieval strategy identifiers, and then executing query operations based on a set of query statements in the matching database partitions through the filtered third-party agents to obtain a preliminary retrieval set, includes the following steps:

[0038] Based on the data distribution characteristics, the data size and distribution of the database partitions are evaluated to determine the data processing requirements.

[0039] Based on the characteristics of the index structure, the available index types and coverage of the database partition are analyzed to determine the index optimization requirements.

[0040] Based on access pattern characteristics, hot data areas and access frequencies of database partitions are identified to determine concurrent processing requirements and cache management requirements.

[0041] A profile of the intelligent agent's capabilities is constructed based on data processing requirements, index optimization requirements, concurrency processing requirements, and cache management requirements.

[0042] Several third-party agents are selected based on retrieval strategy identifiers and agent capability requirement profiles.

[0043] By employing the above technical solution, the metadata characteristics of database partitions are mined and utilized to filter third-party intelligent agents for retrieval. Specifically, the data scale and distribution of database partitions are assessed through data distribution characteristics to determine data processing requirements; the available index types and coverage are analyzed through index structure characteristics to determine index optimization requirements; and hot data areas and access frequencies are identified through access pattern characteristics to determine concurrent processing and cache management requirements. Based on the data processing requirements, index optimization requirements, concurrent processing requirements, and cache management requirements, an intelligent agent capability requirement profile is constructed, and the most suitable third-party intelligent agent is selected by combining retrieval strategy identifiers. Through the above requirement profile construction and matching steps, this application achieves dynamic selection of the third-party intelligent agent with the greatest processing advantage to execute query operations based on the specific characteristics and real-time status of each database partition, significantly improving the targeting and efficiency of query execution. While fully leveraging the professional processing capabilities of different intelligent agents, it achieves a high degree of adaptation between query operations and database partition characteristics.

[0044] In a preferred embodiment, this application can be further configured as follows: the fourth agent includes a sharding scheduling layer and a verification execution layer; the step of inputting the preliminary retrieval set and the retrieval feature set into the fourth agent, verifying the preliminary retrieval set by the fourth agent based on a preset verification rule set, and generating optimized retrieval results includes the following steps:

[0045] The initial retrieval set is segmented in multiple dimensions through a segmentation scheduling layer to obtain semantic association segmentation, source association segmentation, and quality level segmentation.

[0046] The verification execution layer executes a preset sharding verification strategy based on the multi-dimensional sharding results.

[0047] By adopting the above technical solution, a two-layer architecture of a sharding scheduling layer and a verification execution layer is constructed in the fourth intelligent agent to realize intelligent verification and optimization of the preliminary retrieval set. Specifically, the sharding scheduling layer performs multi-dimensional sharding processing on the preliminary retrieval set to generate semantic association shards, source association shards, and quality level shards, dividing the complex retrieval result set into subsets with common characteristics. The verification execution layer executes targeted verification strategies based on the characteristics of different shards. For example, semantic association shards are used to verify semantic consistency, source association shards are used to verify the reliability of data sources, and quality level shards are used to implement differentiated verification strengths. Through the above-mentioned sharding verification mechanism, this application significantly improves the targeting and efficiency of the verification process for the generated preliminary retrieval set, greatly improves verification efficiency while ensuring a certain level of verification quality, and provides a guarantee for generating high-quality optimized retrieval results.

[0048] The second objective of this invention is achieved through the following technical solution:

[0049] A multi-agent retrieval enhancement generation system, comprising:

[0050] The instruction parsing module is used to respond to the received task instruction by parsing the task instruction through the first intelligent agent and generating a retrieval feature set, which includes the original semantic vector, the retrieval strategy identifier and the target partition identifier.

[0051] The semantic transformation module is used to match several corresponding second agents based on the retrieval strategy identifier, and to perform targeted semantic transformation on the original semantic vector through the matched second agents to generate a set of query statements.

[0052] The feature extraction module is used to match the corresponding database partition from the preset retrieval database based on the target partition identifier and extract metadata features;

[0053] The filtering and query module is used to filter several third agents based on metadata features and retrieval strategy identifiers, and then use the filtered third agents to perform query operations based on the query statement set in the matching database partitions to obtain a preliminary retrieval set.

[0054] The optimization verification module is used to input the preliminary retrieval set and the retrieval feature set into the fourth agent. The fourth agent verifies the preliminary retrieval set based on the preset verification rule set and generates optimized retrieval results.

[0055] By adopting the above technical solution, the instruction parsing module is used to respond to the received task instruction, parse the task instruction through the first intelligent agent, and generate a retrieval feature set, which includes the original semantic vector, the retrieval strategy identifier, and the target partition identifier; the semantic transformation module is used to match several corresponding second intelligent agents based on the retrieval strategy identifier, and perform targeted semantic transformation on the original semantic vector through the matched second intelligent agents to generate a query statement set; the feature extraction module is used to match the corresponding database partition from the preset retrieval database based on the target partition identifier, and extract metadata features; the filtering query module is used to filter several third intelligent agents based on the metadata features and the retrieval strategy identifier, and execute query operations based on the query statement set in the matched database partition through the filtered third intelligent agents to obtain a preliminary retrieval set; the optimization verification module is used to input the preliminary retrieval set and the retrieval feature set into the fourth intelligent agent, and verify the preliminary retrieval set through the fourth intelligent agent based on the preset verification rule set, and generate optimized retrieval results.

[0056] This application also relates to a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described multi-agent retrieval enhancement generation method.

[0057] This application also relates to a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described multi-agent retrieval enhancement generation method.

[0058] In summary, the multi-agent retrieval enhancement generation method and system provided in this application realize intelligent parsing of task instructions, cross-modal semantic conversion, dynamic database partitioning scheduling, and retrieval result optimization and verification through a multi-agent collaborative mechanism. It effectively solves the technical bottlenecks of traditional RAG systems in complex query processing, heterogeneous database collaborative retrieval, and result verification, and has the effects of improving retrieval accuracy and efficiency, enhancing adaptability to complex query intents, and optimizing heterogeneous database collaborative retrieval capabilities. Attached Figure Description

[0059] Figure 1 This is a flowchart of an embodiment of a multi-agent retrieval enhancement generation method according to this application;

[0060] Figure 2 This is a flowchart of step S10 in an embodiment of a multi-agent retrieval enhancement generation method of this application;

[0061] Figure 3 This is a flowchart of step S20 in an embodiment of a multi-agent retrieval enhancement generation method of this application;

[0062] Figure 4 This is a flowchart of step S22 in an embodiment of a multi-agent retrieval enhancement generation method of this application;

[0063] Figure 5 This is a flowchart of step S23 in an embodiment of a multi-agent retrieval enhancement generation method of this application;

[0064] Figure 6 This is a flowchart illustrating step S40 of an embodiment of a multi-agent retrieval enhancement generation method of this application. Detailed Implementation

[0065] The following is in conjunction with the appendix Figure 1-6 This application will be described in further detail.

[0066] In one embodiment, such as Figure 1 As shown, this application discloses a multi-agent retrieval enhancement generation method, which specifically includes the following steps:

[0067] S10: In response to the received task instruction, the first intelligent agent parses the task instruction and generates a retrieval feature set, which includes the original semantic vector, the retrieval strategy identifier, and the target partition identifier.

[0068] In this embodiment, the task instruction is a user-inputted search request, typically in natural language, containing a clear search intent and potential constraints. For example, "Please find the sales data of a certain brand of new energy vehicles in North China in 2023, requiring quarterly statistics and excluding test drive vehicles" is a complex task instruction containing time range, brand type, geographical range, statistical dimensions, and exclusion conditions. Furthermore, the task instruction can also be a set of multiple related or unrelated search request expressions; the first intelligent agent is a computing module with task parsing capabilities, specifically implemented using natural language understanding models, used to decompose the semantic elements and operational requirements of the user instruction; retrieval. The feature set is a structured data processing object output by the first intelligent agent, which includes the original semantic vector, the retrieval strategy identifier, and the target partition identifier. The original semantic vector is a distributed vector representation obtained by transforming the task instruction through semantic coding models and other methods. Each dimension of the original semantic vector captures specific semantic features and is used to capture the deep semantic information of the instruction. The retrieval strategy identifier is encoded data representing different query strategies. It can be implemented using hash values ​​or vector embedding and is used to dynamically schedule and adapt the semantic transformation module. The target partition identifier is a logical partition identifier of the database storage structure. It can be implemented using partition keys or metadata tags and is used to accurately locate the data storage location.

[0069] Specifically, upon receiving a user's task instruction, the first intelligent agent first performs deep analysis of the instruction. Using natural language understanding technology and other methods, the first intelligent agent extracts the core semantic elements of the instruction and encodes them into a raw semantic vector. This raw semantic vector effectively represents the semantic connotation of the instruction. Simultaneously, the first intelligent agent generates a retrieval strategy identifier based on the task instruction. This retrieval strategy identifier is similar to a strategy selector, indicating which retrieval strategy should be used. Furthermore, the first intelligent agent generates a target partition identifier, which is used to accurately locate the data storage location, i.e., to guide how to quickly locate the relevant data partition in the retrieval database.

[0070] For example, when a user queries "2023 new energy vehicle sales data", the first AI will generate a vector containing semantics of the automotive field, formulate a statistical query strategy identifier, and locate the new energy vehicle section of the economic statistics database.

[0071] S20: Match several corresponding second agents based on the retrieval strategy identifier, and perform targeted semantic transformation on the original semantic vector through the matched second agents to generate a set of query statements;

[0072] In this embodiment, the second intelligent agent is a semantic transformation module cluster, which can be implemented using different combinations of neural network architectures, etc., to generate multimodal query statements. Specifically, it receives the original semantic vector as input and generates specific types of query statements through a built-in semantic transformation algorithm, including but not limited to statements of different query language specifications such as SQL queries, SPARQL queries, and Elasticsearch queries. The targeted semantic transformation is the process of "generating specific types of query statements through the built-in semantic transformation algorithm". The query statement set is the set of query commands output by the second intelligent agent, which includes different types or different optimization goals of query statements generated for the same retrieval requirement. The query statement set may include: structured query statements for exact matching, vector similarity query statements for semantic retrieval, graph query statements for association retrieval, etc.

[0073] Specifically, based on the retrieval strategy identifier, the second agent most suitable for handling the current task is matched. The matched second agents may each have their own specialties, such as being good at handling semantically fuzzy queries and being good at handling exact matching queries. The original semantic vector is input into the matched second agent, which performs targeted semantic transformation processing to convert the user's natural language requirements into query language that the database can understand.

[0074] For example, for a fuzzy query such as "find a laptop with a high cost-performance ratio", the second agent may generate a set of query statements that include multiple dimensions such as price range and performance parameters.

[0075] S30: Match the corresponding database partition from the preset retrieval database based on the target partition identifier, and extract metadata features;

[0076] In this embodiment, a database partition is a subset of data in the retrieval database divided according to specific rules. Each partition has an independent data storage structure and access characteristics. The partitioning of the database may be based on various dimensions, such as time dimension (e.g., annual partitioning, monthly partitioning), business dimension (e.g., product category partitioning, regional partitioning), and popularity dimension (hot data partitioning, cold data partitioning), etc. Each partition has its specific data distribution characteristics and optimization requirements. Metadata features are a set of features that describe the characteristics of the database partitions. Metadata features may include: data distribution features, index structure features, and access pattern features. Among them, data distribution features are used to describe the numerical distribution, category distribution, and spatial distribution characteristics of data within the partition; index structure features are used to record the available index types, index coverage, and index efficiency data of the partition; and access pattern features are used to statistically analyze the access frequency, access time patterns, and hot data areas of the partition.

[0077] Specifically, after locating the specific database partition in the search database based on the target partition identifier, the metadata characteristics of the database partition are analyzed in depth. These metadata characteristics can describe in detail the partition's data size, index structure, access patterns, and other features.

[0078] S40: Select several third agents based on metadata features and retrieval strategy identifiers, and use the selected third agents to perform query operations based on the query statement set in the matching database partitions to obtain a preliminary retrieval set;

[0079] In this embodiment, the third intelligent agent is a cluster of retrieval execution modules, which can be implemented using a distributed computing framework or other methods to adapt to retrieval operations of different database partitions; the preliminary retrieval set is the initial result set obtained after the third intelligent agent performs the query operation. It is pre-set to include data records retrieved from each data partition. The preliminary retrieval set has undergone preliminary relevance screening, but there may be duplicate records, conflicting data, or uneven quality, which require further verification and optimization.

[0080] Specifically, based on metadata features and retrieval strategy identifiers, several third agents are selected as the most suitable for performing query operations in the matched database partitions. The database partitions are then associated with the most suitable third agents in the selection results. The third agents then perform query operations based on the query statement set in their associated database partitions to obtain a preliminary retrieval set containing the data records retrieved from each data partition.

[0081] S50: Input the preliminary retrieval set and retrieval feature set into the fourth agent. The fourth agent verifies the preliminary retrieval set based on the preset verification rule set and generates optimized retrieval results.

[0082] In this embodiment, the fourth agent is a result verification module, which can be implemented by combining a rule engine with a machine learning model to eliminate redundant and contradictory results. The verification rule set is the set of verification rules used by the fourth agent, including syntax verification rules, semantic verification rules, and logical verification rules. Syntax verification is used to ensure that the result data conforms to the data pattern specification, semantic verification is used to check the consistency between the result and the query intent, and logical verification is used to detect logical conflicts and contradictions between results. The optimized search result is the final output result after processing by the fourth agent. It usually has the characteristics of high quality, high relevance, and high reliability. The optimized search result not only includes the original data record, but can also be supplemented with multi-dimensional indicator data such as quality score, confidence index, and source tracking information to provide users with a more comprehensive and reliable search service.

[0083] Specifically, the preliminary retrieval set and retrieval feature set are input into the fourth agent for verification and optimization. The fourth agent will perform multi-dimensional verification of the results according to the preset verification rule set, such as checking the semantic consistency of the results, verifying the reliability of the source of the data, and evaluating the quality level of the results. The final optimized retrieval results are generated through deduplication, sorting, and supplementation.

[0084] In one embodiment, the first intelligent agent includes a feature extraction layer, an anomaly detection layer, an anomaly analysis layer, and an anomaly handling layer, such as... Figure 2 As shown, step S10 includes the following steps:

[0085] S11: Extract key features from the task instructions through the feature extraction layer. The key features include entity features, query constraint features, and ranking features.

[0086] S12: The anomaly detection layer identifies anomalous factors in the task instructions, including anomalous syntax, anomalous vocabulary, and anomalous logic.

[0087] S13: Perform correlation analysis on key features and anomalous factors through the anomaly analysis layer, and mark the anomaly level;

[0088] S14: The exception handling layer executes a preset exception handling strategy on the exception factor based on the exception level labeling result.

[0089] In this embodiment, the feature extraction layer is a component used to extract structured key features from task instructions. Specifically, it can be implemented using named entity recognition modules, condition constraint parsing modules, and ranking weight calculation modules in natural language processing models. It is used to separate core entities (i.e., entity features), query condition restrictions (i.e., query constraint features), and result ranking requirements (i.e., ranking features) in task instructions. The anomaly detection layer is a component used to identify potential abnormal elements in task instructions. Specifically, it can be implemented using syntax tree traversal algorithms, word vector anomaly detection models, and logical rule matching engines. It is used to detect grammatical errors, uncommon or incorrect words, and logical contradictions. The anomaly analysis layer is a component used to evaluate the correlation between abnormal factors and key features. Specifically, it can be implemented using graph neural networks to construct a correlation graph between features and abnormal factors, and using clustering algorithms to analyze the scope of anomaly influence. It is used to determine and mark the degree of influence of abnormal factors, i.e., anomaly level marking. The anomaly handling layer is a component used to perform anomaly correction or filtering operations. Specifically, it can be implemented using preset rule base matching anomaly handling strategies, such as using a syntax correction model to replace abnormal grammatical fragments, using synonyms to replace abnormal words, and using a logic rewriting module to reconstruct abnormal logic.

[0090] Specifically, when a task instruction is input to the first intelligent agent, the feature extraction layer first extracts entity features, query constraint features, and ranking features. For example, it identifies entities such as time, location, and people in the instruction through an entity recognition model, extracts numerical ranges and attribute restrictions in the query conditions through a constraint parsing module, and parses the user's implicit ranking requirements through a ranking model. Subsequently, the anomaly detection layer scans the instruction text layer by layer. For example, it detects sentence structure errors through syntax tree analysis, identifies uncommon words through word vector distance calculation, and verifies whether there are contradictions in the query conditions through a logical reasoning engine. The anomaly analysis layer performs correlation analysis and anomaly level marking on the detected anomaly factors and the extracted key features. For example, when anomaly words are detected to have a strong correlation with entity features, the anomaly factor is marked as high priority. The anomaly handling layer executes corresponding strategies according to the anomaly level. For example, it uses a semantic reconstruction strategy for high-priority anomalies and a filtering strategy for low-priority anomalies. Finally, it generates an anomaly-free original semantic vector, a retrieval strategy identifier, and a target partition identifier.

[0091] In one embodiment, such as Figure 3 As shown, step S20 includes the following steps:

[0092] S21: Match the retrieval strategy identifier with a preset agent performance mapping table, wherein the agent performance mapping table includes the conversion algorithm type, data compatibility, and output level preference of the second agent;

[0093] S22: Based on the performance matching result, the corresponding second agent is scheduled in parallel, and based on the output hierarchy preference of the second agent, the original semantic vector is input to the corresponding processing layer for hierarchical transformation to generate several heterogeneous query statements;

[0094] S23: Perform multi-level semantic optimization on heterogeneous query statements through a preset semantic collaboration strategy to generate a query statement set.

[0095] In this embodiment, the agent performance mapping table is a database storing the attribute parameters of the second agent. Specifically, it can be implemented using a hash table or a relational database, and is used to match second agents with specific semantic transformation capabilities based on retrieval strategy identifiers. The transformation algorithm type describes the categories of semantic transformation algorithms supported by the second agent, such as rule-based template filling algorithms, neural network-based sequence generation algorithms, or knowledge graph-based reasoning algorithms. Data compatibility describes the input data formats and output query language types that the second agent can handle, including whether it supports specific database dialects and whether it is compatible with different vector encoding standards. The output hierarchy preference is the hierarchical division method for the second agent's processing of semantic vectors and the processing preferences for each level, used to guide the processing of semantic vectors across different processing layers. The process includes flow paths and processing procedures; heterogeneous query statements are a collection of query expressions with different syntax structures, which may include approximate queries based on vector similarity, exact queries based on keyword matching, path queries based on graph relationships, and other types; semantic coordination strategies are a set of optimization rules used to coordinate heterogeneous query statements, which may include rules for processing equivalence relations, rules for merging complementary relations, and rules for arbitrating contradictory relations, used to eliminate redundant information and enhance semantic coverage; multi-level semantic optimization is a hierarchical processing process for heterogeneous query statements, which includes syntax-level optimization (unifying query syntax specifications), semantic-level optimization (eliminating semantic conflicts), and logic-level optimization (optimizing query structure), improving the quality and executability of query statements through progressive refinement.

[0096] Specifically, after identifying the retrieval strategy identifier, a pre-defined agent performance mapping table is activated to match the retrieval strategy identifier with its performance, thereby selecting second agents with corresponding transformation capabilities. For example, if the identifier points to a graph retrieval strategy, second agents that support relation parsing are prioritized for matching. After selection, multiple second agents are scheduled in parallel to process the original semantic vectors simultaneously. Each second agent decomposes the semantic vector into different processing layers according to its output level preference, performing hierarchical transformation to generate several sets of query expressions with different syntactic structures. The generated query statements are then subjected to multi-level semantic optimization through a pre-defined semantic collaboration strategy. For example, duplicate queries can be merged through equivalence relations, compound queries can be constructed through complementary relations, and arbitration can be performed through contradictory relations. Finally, a set of syntactically adapted query statements is generated.

[0097] In one embodiment, the processing layer includes a fuzzy concept layer, a relation parsing layer, and an instance matching layer, such as... Figure 4 As shown, step S22 includes the following steps:

[0098] S221: Perform adaptive slicing on the original semantic vector and extract concept features, association features, and instance features;

[0099] S222: Based on the output hierarchy preference, input the concept features, association features, and instance features to the corresponding processing layer;

[0100] S223: Generate fuzzy query statements by semantically generalizing the input conceptual features through a fuzzy concept layer;

[0101] S224: Perform path reasoning on the input association features through the relation parsing layer to generate a graph query statement;

[0102] S225: The instance matching layer performs term mapping on the input instance features to generate a structured query statement.

[0103] In this embodiment, the fuzzy concept layer is a functional module for handling semantic generalization, which can be implemented using methods such as semantic expansion algorithms based on probability distributions. By expanding the concept boundaries, it transforms discrete semantic features into query conditions that can cover potentially related semantics. The relation parsing layer is a functional module for constructing association paths, which can be implemented using methods such as path reasoning algorithms based on knowledge graphs. By parsing the implicit associations between entities, it generates query conditions with logical structures. The instance matching layer is a functional module for precise term mapping, which can be implemented using methods such as term alignment algorithms based on structured databases. By matching a preset term mapping table, it transforms semantic features into query conditions that conform to the database structure. Adaptive sharding is an operation that dynamically segments semantic vectors. Specifically, it can be implemented using attention-weighted feature segmentation algorithms to automatically identify concept clusters, relational patterns, and instance sets within the vector, achieving effective feature separation. Conceptual features are the feature components in the original semantic vector that represent abstract concepts and category information. They typically correspond to the core topics and domain concepts in the query. Conceptual features have a high level of abstraction and strong scalability, forming the basis for generating semantically expanded queries. Association features are the feature components in the original semantic vector that represent relationships between entities. They reflect the semantic associations and interaction patterns between different concepts. Association features include relation type, relation strength, and relation method. Multidimensional information, including semantic features, forms the basis for constructing complex query conditions. Instance features are the feature components in the original semantic vector that represent specific instances and values, corresponding to the specific objects and constraints in the query. Instance features typically have a clear value range and precise matching requirements, making them key elements for generating accurate queries. Semantic generalization is a concept expansion and abstraction process used by the fuzzy concept layer. This process uses technologies such as knowledge graphs and semantic networks to expand specific conceptual features into related concept sets, generating query conditions with stronger generalization capabilities. Path reasoning is a process of association discovery and relationship chain construction used by the relation parsing layer. This process uses graph traversal and relation reasoning algorithms to discover direct relationships between entities. The system constructs query paths that express complex relationships through indirect associations; term mapping is a specific value matching and standardization process used by the instance matching layer. This process transforms abstract instance features into specific values ​​and standard terms in the database through a terminology dictionary and value range mapping table, ensuring the accuracy and executability of query conditions; fuzzy query statements are query statements with semantic expansion capabilities generated by the fuzzy concept layer. They use lenient matching conditions such as similarity matching and concept inclusion to recall semantically related but differently expressed results; graph query statements are query statements that express complex relationships generated by the relation parsing layer. They use graph query techniques such as path query and relation matching to discover and retrieve data with specific association patterns.Structured query statements are exact match queries generated by the instance matching layer. They employ precise conditions such as equality matching and range queries to accurately retrieve data records that meet specific value range requirements.

[0104] Specifically, when the original semantic vector is input into the second agent, it is first decomposed into three independent subsets—conceptual features, relational features, and instance features—through adaptive sharding. For example, conceptual features may contain abstract concepts in the query intent, relational features may contain logical relationships between entities, and instance features may contain specific terminology identifiers. Based on the output hierarchy preferences preset by the second agent, conceptual features are directed to the fuzzy concept layer for semantic generalization, such as expanding "medical equipment" to a set of synonyms like "diagnostic instruments" and "treatment devices," generating fuzzy query statements that cover potentially related concepts. Relational features are directed to the relation parsing layer for path reasoning, such as generating graph query statements containing multi-hop relationships through the relational path of "research and development institution-patent-product" in the knowledge graph. Instance features are directed to the instance matching layer for terminology mapping, such as mapping "CT machine" to the standard term "computed tomography scanning equipment" in the database, generating precise query statements that conform to structured query syntax.

[0105] In one embodiment, such as Figure 5 As shown, step S23 includes the following steps:

[0106] S231: Identify cross-modal semantic relationships among fuzzy query statements, graph query statements, and structured query statements, wherein the cross-modal semantic relationships include semantic equivalence relationships, semantic complementarity relationships, and semantic contradiction relationships;

[0107] S232: Construct a cross-modal semantic association matrix based on cross-modal semantic relations, and perform multi-level semantic optimization on the cross-modal semantic association matrix through a semantic collaboration strategy to generate multi-level optimized statements, including equivalent optimized query statements, enhanced compound query statements, and contradiction arbitration query statements;

[0108] S233: Restructure the multi-level optimized statements and execute the query syntax adaptation strategy corresponding to the preset database to generate a set of query statements.

[0109] In this embodiment, cross-modal semantic relations refer to the logical associations between query statements of different modalities. Specifically, this can be achieved by combining semantic similarity calculation with logical reasoning models, used to identify the semantic interactions between different query statements. Semantic equivalence relations refer to the relationship where different query statements express the same semantic content, such as the semantic equivalence between the fuzzy query "electric vehicles with long range" and the structured query "electric vehicles with a range greater than 500km". Semantic complementarity relations refer to the semantic supplementation and enhancement between query statements, such as the complementarity between the graph query "relationship between battery technology and range" and the structured query "battery capacity greater than 80kWh". Semantic contradiction relations refer to the semantic conflict or exclusion between query statements, such as the conceptual contradiction in the fuzzy query "affordable luxury car models". The cross-modal semantic association matrix is ​​a mathematical structure representing the strength of semantic associations between different query statements, specifically constructed using tensor decomposition or graph neural networks, used to quantify the weight distribution of semantic relations. Semantic collaboration strategies are optimization mechanisms for coordinating different semantic relations, specifically a set of optimization rules for coordinating heterogeneous query statements. Multi-level optimized statements are query statements optimized through collaboration. This set of query statements is used to improve the compatibility and execution efficiency of query statements. It includes equivalent optimized query statements, enhanced compound query statements, and conflict arbitration query statements. Equivalent optimized query statements are generated by deduplicating and optimizing semantically equivalent statements, eliminating duplicate queries while retaining the most representative query form. Enhanced compound query statements are generated through semantic complementarity fusion, deeply integrating query statements with complementary relationships to form a compound query expression with multi-dimensional advantages. Conflict arbitration query statements are generated by resolving semantic contradictions, using dynamic adjudication mechanisms based on evidence strength to intelligently arbitrate and select semantically conflicting query conditions. Structured reorganization is the logical reconstruction process of the optimized query statements, including logical structure reorganization (optimizing the organization order of query conditions to improve execution efficiency), syntactic structure reorganization (adjusting the query syntax to adapt to different database engines), and execution plan reorganization (optimizing the query execution strategy to reduce resource consumption). Query syntax adaptation strategies are a set of strategies to convert the optimized query statements into a syntactic structure recognizable by the target database, ensuring compatibility between the query statements and the target database.

[0110] Furthermore, query syntax adaptation strategies may include dialect conversion strategies (converting queries into the SQL dialect of a specific database), feature adaptation strategies (adjusting query functions and operators to match the features supported by the database), and performance tuning strategies (adding query hints and optimizing parameters to improve execution efficiency).

[0111] Specifically, in the process of generating query statement sets, cross-modal semantic relationship identification is first performed on fuzzy query statements, graph query statements, and structured query statements. For example, semantic embedding vector comparison is used to determine whether there are equivalent, complementary, or contradictory relationships between statements. Then, a cross-modal semantic association matrix is ​​constructed to quantify the association strength of different statements. For example, attention mechanisms are used to calculate the weight distribution of different statements on specific semantic dimensions. Based on this cross-modal semantic association matrix, a semantic collaboration strategy is applied to perform multi-level optimization. For example, statements of equivalent relationships are merged, logical enhancement of complementary relationships is performed, and arbitration screening of contradictory relationships is performed to generate equivalent optimized query statements, enhanced compound query statements, and contradictory arbitration query statements. Finally, the multi-level optimized statements are converted into query instructions that conform to the syntax specifications of the target database through structured reorganization. For example, query conditions and order are adjusted according to the database index type, or sharding constraints are added according to the data storage mode.

[0112] In one embodiment, metadata characteristics include data distribution characteristics, index structure characteristics, and access pattern characteristics, such as... Figure 6 As shown, step S40 includes the following steps:

[0113] S41: Evaluate the data size and distribution of database partitions based on data distribution characteristics to determine data processing requirements;

[0114] S42: Analyze the available index types and coverage of database partitions based on index structure characteristics to determine index optimization requirements;

[0115] S43: Identify hot data areas and access frequencies of database partitions based on access pattern characteristics to determine concurrent processing requirements and cache management requirements.

[0116] S44: Construct a profile of the intelligent agent's capability requirements based on data processing requirements, index optimization requirements, concurrent processing requirements, and cache management requirements;

[0117] S45: Select several third agents based on the retrieval strategy identifier and the agent's capability requirement profile.

[0118] In this embodiment, data distribution characteristics are metadata describing the statistical distribution characteristics of data within a partition, including statistical indicators such as data volume (e.g., number of records, storage space size), numerical distribution (e.g., mean, variance, quantiles of numerical fields), categorical distribution (e.g., uniformity of value distribution of enumeration fields), and spatial distribution (e.g., distribution density of geographic data). Specifically, statistical analysis modules can be used to quantify and evaluate data volume and dispersion. Data distribution characteristics reflect the overall distribution of data and provide a basis for evaluating query processing complexity. Index structure characteristics are metadata describing the partition index configuration, including available index types (e.g., B-tree index, hash index). Indexes include bitmap indexes, full-text indexes, etc.; index coverage (the number and coverage of fields involved in the index); index quality metrics (index selectivity, index depth, etc.); and index maintenance status. Specifically, the field mapping relationships of the index can be analyzed using index scanners, etc. The index structure characteristics determine the index resources available for queries. Access pattern characteristics are metadata that records the historical access patterns of partitions, including hot data areas (the range of frequently accessed data), access time distribution (the access frequency patterns in different time periods), access type ratio (the ratio of query, update, delete, etc.), and concurrent access characteristics. Specifically, high-frequency data can be extracted using access log analyzers, etc. The time-series characteristics and access pattern characteristics of the accessed region reflect the actual usage patterns of the partition; the data processing requirements information is the processing capacity requirement derived from the analysis of data distribution characteristics, including the required memory capacity, computing power, degree of parallel processing, and special processing function requirements, which ensures that the agent has the ability to handle the data scale and analysis needs of the partition; the index optimization requirements information is the index utilization requirements derived from the analysis of index structure characteristics, including the index types to be supported, the level of index optimization capability, and index maintenance requirements, which ensures that the agent can make full use of existing index resources; the concurrent processing requirements information is the concurrent performance requirements derived from the analysis of access pattern characteristics, including... The requirements for the number of concurrent connections, transaction processing capabilities, and lock management mechanisms must ensure that the agent can meet the concurrent access needs of the partition. The cache management requirements are cache optimization requirements derived from the analysis of access pattern characteristics, including cache capacity requirements, cache replacement strategy requirements, and data prefetching strategy requirements, which ensure that the agent can effectively utilize the cache to improve performance. The agent capability requirement profile is a comprehensive capability model consisting of data processing requirements, index optimization requirements, concurrent processing requirements, and cache management requirements. Specifically, multi-dimensional vector space mapping algorithms and other methods can be used to match the requirements with the performance tags of the agent to accurately select third agents with corresponding processing capabilities.

[0119] Specifically, once the database partition is determined, the data size and distribution of the partition are first assessed based on data distribution characteristics to determine data processing requirements, such as triggering distributed computing when the data volume exceeds a preset threshold. Subsequently, the available index types and coverage of the database partition are analyzed based on index structure characteristics to determine index optimization requirements. Simultaneously, hot data areas and access frequencies of the database partition are identified based on access pattern characteristics to determine concurrent processing and cache management requirements. These data processing, index optimization, concurrent processing, and cache management requirements are integrated into an agent capability requirement profile. Based on the retrieval strategy identifier and the agent capability requirement profile, several third agents are selected. For example, distributed processing capability, index optimization capability, and high-concurrency scheduling capability are used as selection criteria. Combined with the priority rules specified in the retrieval strategy identifier, third agents with corresponding capabilities are dynamically selected from the agent resource pool. The selected third agents execute query tasks according to their expertise.

[0120] In one embodiment, the fourth intelligent agent includes a fragmentation scheduling layer and a verification execution layer, and step S50 includes the following steps:

[0121] S51: The initial retrieval set is divided into multiple dimensions through the sharding scheduling layer to obtain semantic association shards, source association shards and quality level shards;

[0122] S52: The execution layer executes a preset sharding verification strategy based on the multi-dimensional sharding results.

[0123] In this embodiment, the sharding scheduling layer is a processing module for multi-dimensionally sharding the initial search results. Specifically, it can use a dynamic sharding algorithm combined with semantic relevance, data source characteristics, and quality assessment indicators to shard the results. Its function is to reorganize heterogeneous search results according to relevance dimensions to adapt to the subsequent verification process. The verification execution layer is a logical execution unit for implementing the sharding verification strategy. Specifically, it can load verification rules matching the sharding type through a rule engine. For example, it can execute redundancy resolution rules for semantically related shards and credibility verification rules for source-related shards. Its function is to implement differentiated verification operations for different sharding characteristics. The multi-dimensional sharding is a set of shards formed based on semantic relevance, data source attributes, and quality assessment results. Specifically, it can be implemented through semantic similarity calculation, source tag matching, and quality score threshold division. Its function is to decouple the complex search result set into subsets with inherent consistency to improve... To improve verification efficiency, semantic association sharding is a subset of shards based on the semantic relevance of the results. It includes retrieval results with consistent semantic themes and related concepts. Results within semantic association shards have high semantic cohesion, facilitating consistency verification and semantic deduplication. Source association sharding is a subset of shards based on the data source characteristics of the results. It includes results from the same data partition or with the same source characteristics, facilitating source reliability verification and data consistency checks. Quality level sharding is a subset of shards based on preliminary quality assessment results. Results are divided into different levels according to quality scores, facilitating differentiated verification intensity and optimizing the allocation of verification resources. Sharding verification strategy is a set of verification logic corresponding to the sharding type. Specifically, it can include semantic consistency verification, data source credibility verification, and quality level screening. Its role is to eliminate conflicting and noisy data in the retrieval results through a hierarchical verification mechanism.

[0124] Specifically, when the initial retrieval set is input to the fourth agent, the sharding scheduling layer first clusters retrieval results with similar topics into semantically related shards based on semantic relevance, for example, grouping documents involving the same entity or event into the same shard; simultaneously, it generates source-related shards based on metadata information of the data source, for example, distinguishing shards from academic databases, news websites, or user-generated content; further, it scores the confidence of the retrieval results using a quality assessment model, dividing them into high, medium, and low quality level shards according to preset thresholds; the verification execution layer then calls the corresponding verification rules for different shard types: performing semantic conflict detection and redundancy merging on semantically related shards, for example, detecting contradictory statements through entity relationship graphs; performing authority verification on source-related shards, for example, filtering data from low-confidence sources; and performing threshold filtering on quality level shards, for example, retaining only the top N results from high-quality shards; finally, the fourth agent reorganizes the verified shards and outputs further optimized retrieval results.

[0125] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0126] In one embodiment, a multi-agent retrieval enhancement generation system is provided, which corresponds one-to-one with the multi-agent retrieval enhancement generation system described in the above embodiments. This multi-agent retrieval enhancement generation system includes:

[0127] The instruction parsing module is used to respond to the received task instruction by parsing the task instruction through the first intelligent agent and generating a retrieval feature set, which includes the original semantic vector, the retrieval strategy identifier and the target partition identifier.

[0128] The semantic transformation module is used to match several corresponding second agents based on the retrieval strategy identifier, and to perform targeted semantic transformation on the original semantic vector through the matched second agents to generate a set of query statements.

[0129] The feature extraction module is used to match the corresponding database partition from the preset retrieval database based on the target partition identifier and extract metadata features;

[0130] The filtering and query module is used to filter several third agents based on metadata features and retrieval strategy identifiers, and then use the filtered third agents to perform query operations based on the query statement set in the matching database partitions to obtain a preliminary retrieval set.

[0131] The optimization verification module is used to input the preliminary retrieval set and the retrieval feature set into the fourth agent. The fourth agent verifies the preliminary retrieval set based on the preset verification rule set and generates optimized retrieval results.

[0132] For specific limitations regarding the multi-agent retrieval enhancement generation system, please refer to the limitations of the multi-agent retrieval enhancement generation method described above, which will not be repeated here. Each module in the aforementioned multi-agent retrieval enhancement generation system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0133] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a multi-agent retrieval enhancement generation method.

[0134] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a multi-agent retrieval enhancement generation method.

[0135] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A multi-agent retrieval enhancement generation method, characterized in that, Including the following steps: In response to the received task instruction, the first intelligent agent parses the task instruction and generates a retrieval feature set, which includes the original semantic vector, retrieval strategy identifier and target partition identifier. Based on the retrieval strategy identifier, several corresponding second agents are matched, and the original semantic vector is subjected to targeted semantic transformation through the matched second agents to generate a set of query statements. Based on the target partition identifier, the corresponding database partition is matched from the preset retrieval database, and metadata features are extracted; Several third agents are selected based on metadata features and retrieval strategy identifiers, and the selected third agents perform query operations based on the query statement set in the matching database partitions to obtain a preliminary retrieval set. The preliminary retrieval set and the retrieval feature set are input into the fourth agent, which then verifies the preliminary retrieval set based on a preset set of verification rules and generates optimized retrieval results.

2. The multi-agent retrieval enhancement generation method according to claim 1, characterized in that: The first intelligent agent includes a feature extraction layer, an anomaly detection layer, an anomaly analysis layer, and an anomaly handling layer. The step of responding to a received task instruction by parsing the task instruction and generating a retrieval feature set, wherein the retrieval feature set includes an original semantic vector, a retrieval strategy identifier, and a target partition identifier, includes the following steps: The key features in the task instructions are extracted through the feature extraction layer. These key features include entity features, query constraint features, and ranking features. An anomaly detection layer identifies anomalous factors in task instructions, including anomalous syntax, anomalous vocabulary, and anomalous logic. The anomaly analysis layer performs correlation analysis on key features and anomalous factors, and marks the anomaly level. The exception handling layer executes a preset exception handling strategy on the exception factors based on the exception level labeling results.

3. The multi-agent retrieval enhancement generation method according to claim 1, characterized in that: The step of matching several corresponding second agents based on retrieval strategy identifiers, and performing targeted semantic transformation on the original semantic vector through the matched second agents to generate a query statement set includes the following steps: The retrieval strategy identifier is matched with a preset agent performance mapping table, which includes the conversion algorithm type, data compatibility, and output level preference of the second agent. Based on the performance matching results, the corresponding second agent is scheduled in parallel, and based on the output hierarchy preferences of the second agent, the original semantic vector is input to the corresponding processing layer for hierarchical transformation to generate several heterogeneous query statements. By employing a pre-defined semantic collaboration strategy, heterogeneous query statements are subjected to multi-level semantic optimization to generate a set of query statements.

4. The multi-agent retrieval enhancement generation method according to claim 3, characterized in that: The processing layer includes a fuzzy concept layer, a relation parsing layer, and an instance matching layer. The step of parallel scheduling of the corresponding second agent based on the performance matching result, and inputting the original semantic vector into the corresponding processing layer for hierarchical transformation based on the output hierarchy preferences of the second agent to generate several heterogeneous query statements, includes the following steps: Adaptive slicing is performed on the original semantic vector, and concept features, association features, and instance features are extracted. Based on the output hierarchy preference, conceptual features, association features, and instance features are input to the corresponding processing layer; The input conceptual features are semantically generalized through a fuzzy concept layer to generate fuzzy query statements. The relationship parsing layer performs path reasoning on the input association features to generate a graph query statement; The instance matching layer maps the input instance features to terms to generate structured query statements.

5. The multi-agent retrieval enhancement generation method according to claim 4, characterized in that: The step of performing multi-level semantic optimization on heterogeneous query statements through a preset semantic collaboration strategy to generate a query statement set includes the following steps: Identify cross-modal semantic relationships among fuzzy query statements, graph query statements, and structured query statements. These cross-modal semantic relationships include semantic equivalence, semantic complementarity, and semantic contradiction. A cross-modal semantic association matrix is ​​constructed based on cross-modal semantic relations, and multi-level semantic optimization is performed on the cross-modal semantic association matrix through a semantic collaboration strategy to generate multi-level optimized statements, including equivalent optimized query statements, enhanced compound query statements, and contradiction arbitration query statements. The multi-level optimization statements are restructured and the corresponding query syntax adaptation strategy preset by the retrieval database is executed to generate a set of query statements.

6. The multi-agent retrieval enhancement generation method according to claim 1, characterized in that: The metadata features include data distribution features, index structure features, and access pattern features. The step of filtering several third-party agents based on metadata features and retrieval strategy identifiers, and then using the filtered third-party agents to perform query operations based on a set of query statements in matching database partitions to obtain a preliminary retrieval set, includes the following steps: Based on the data distribution characteristics, the data size and distribution of the database partitions are evaluated to determine the data processing requirements. Based on the characteristics of the index structure, the available index types and coverage of the database partition are analyzed to determine the index optimization requirements. Based on access pattern characteristics, hot data areas and access frequencies of database partitions are identified to determine concurrent processing requirements and cache management requirements. A profile of the intelligent agent's capabilities is constructed based on data processing requirements, index optimization requirements, concurrency processing requirements, and cache management requirements. Several third-party agents are selected based on retrieval strategy identifiers and agent capability requirement profiles.

7. The multi-agent retrieval enhancement generation method according to claim 1, characterized in that: The fourth intelligent agent includes a segmentation scheduling layer and a verification execution layer. The step of inputting the preliminary retrieval set and the retrieval feature set into the fourth intelligent agent, verifying the preliminary retrieval set based on a preset verification rule set, and generating optimized retrieval results includes the following steps: The initial retrieval set is segmented in multiple dimensions through a segmentation scheduling layer to obtain semantic association segmentation, source association segmentation, and quality level segmentation. The verification execution layer executes a preset sharding verification strategy based on the multi-dimensional sharding results.

8. A multi-agent retrieval enhancement generation system, characterized in that, include: The instruction parsing module is used to respond to the received task instruction by parsing the task instruction through the first intelligent agent and generating a retrieval feature set, which includes the original semantic vector, the retrieval strategy identifier and the target partition identifier. The semantic transformation module is used to match several corresponding second agents based on the retrieval strategy identifier, and to perform targeted semantic transformation on the original semantic vector through the matched second agents to generate a set of query statements. The feature extraction module is used to match the corresponding database partition from the preset retrieval database based on the target partition identifier and extract metadata features; The filtering and query module is used to filter several third agents based on metadata features and retrieval strategy identifiers, and then use the filtered third agents to perform query operations based on the query statement set in the matching database partitions to obtain a preliminary retrieval set. The optimization verification module is used to input the preliminary retrieval set and the retrieval feature set into the fourth agent. The fourth agent verifies the preliminary retrieval set based on the preset verification rule set and generates optimized retrieval results.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the multi-agent retrieval enhancement generation method as described in any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the multi-agent retrieval enhancement generation method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Database query statement generation method and device, equipment and storage medium

    CN118227655A

  • Intelligent agent-based big language model retrieval enhancement generation system and method

    CN120470088A