Multi-intelligent-agent search enhancement generation method and system
Through the multi-agent collaborative architecture, efficient and accurate retrieval of complex query intentions and heterogeneous databases is achieved, which solves the shortcomings of traditional systems in adaptability and quality assurance and improves retrieval efficiency and accuracy.
Patent Information
- Application Number
- CN202511304539.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Traditional retrieval enhancement generation systems find it difficult to adapt to multi-dimensional query requirements when faced with complex query intent and heterogeneous databases. They suffer from insufficient coverage or redundant conflicts in retrieval results, increased response delays, and a lack of end-to-end retrieval quality assurance.
By constructing a multi-agent collaborative architecture, including the first agent parsing the task instructions and generating a retrieval feature set; matching the second agent based on the retrieval strategy identifier to perform directional semantic conversion and generate a query statement set; locating the database partition based on the target partition identifier and extracting metadata features; screening the third agent to execute the query operation; and the fourth agent performing verification and optimization, finally generating an optimized retrieval result.
It significantly improves retrieval coverage and result accuracy, reduces response delays, improves retrieval efficiency and quality, and can adapt to complex cross-domain and cross-database query tasks.
Smart Images

Figure CN120804377A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of retrieval-augmented generation, and in particular to a multi-agent retrieval-augmented generation method and system. BACKGROUND
[0002] In the current field of information retrieval and knowledge management, the technology framework based on retrieval-augmented generation (RAG) has been widely applied to intelligent question answering, document analysis, and big data decision support scenarios.
[0003] Traditional RAG systems are usually implemented by relying on the series structure of a single retrieval model and a generation model. The general process is to first obtain relevant document fragments from a knowledge base through a retrieval module, and then output the answer synthesized by a language model. However, with the increasing complexity of application scenarios and the continuous expansion of data scale, the traditional RAG system gradually exposes the following defects: first, a single retrieval model often uses a fixed retrieval strategy, which is difficult to adapt to multi-dimensional and heterogeneous user query intentions. Especially when the query involves complex semantic requirements or multiple query tasks across domains or databases, the retrieval results are prone to have insufficient coverage or redundancy conflicts; second, due to the lack of dynamic perception and scheduling capabilities for the underlying database structure, the traditional RAG system is difficult to optimize the retrieval path according to the data distribution characteristics and storage features, resulting in increased response delay and decreased retrieval accuracy.
[0004] In addition, the existing RAG system lacks intelligent coordination mechanisms in key links such as query conversion, retrieval optimization, and result verification, and cannot achieve end-to-end retrieval quality assurance. Especially when facing large-scale heterogeneous databases, the traditional method is difficult to effectively coordinate the retrieval strategies of different data partitions, resulting in difficulty in balancing retrieval efficiency and accuracy. SUMMARY
[0005] In order to solve the above defects, the present application provides a multi-agent retrieval-augmented generation method and system.
[0006] The above invention purpose of the present application is realized by the following technical scheme: A multi-agent retrieval-augmented generation method, comprising the steps of: In response to the received task instruction, the first agent analyzes the task instruction to generate a retrieval feature set, which includes an original semantic vector, a retrieval strategy identifier, and a target partition identifier; Based on the retrieval strategy identifier, a plurality of corresponding second agents are matched, and the original semantic vector is subjected to directional semantic conversion by the matched second agents to generate a query statement set; match a corresponding database partition from a preset retrieval database based on the target partition identifier, and extract metadata features; filter a plurality of third intelligent agents based on the metadata features and the retrieval strategy identifier, and perform a query operation based on the query statement set in the matched database partition through the filtered third intelligent agents to obtain a preliminary retrieval set; input the preliminary retrieval set and the retrieval feature set into a fourth intelligent agent, verify the preliminary retrieval set based on a preset verification rule set through the fourth intelligent agent, and generate an optimized retrieval result.
[0007] By adopting the above technical solution, the first intelligent agent performs deep analysis on the task instruction and generates a retrieval feature set containing an original semantic vector, a retrieval strategy identifier, and a target partition identifier, thereby realizing accurate understanding and structured representation of the user query intention; the retrieval strategy identifier is used to dynamically match the second intelligent agent for directional semantic conversion, thereby generating a query statement set adapted to different retrieval requirements, effectively solving the problem of single retrieval strategy in traditional systems and difficulty in adapting to complex query intentions; the target partition identifier is used to locate the database partition and extract the metadata features, and then the third intelligent agent is filtered to perform a partitioned query operation, thereby significantly improving the perception ability of data distribution features and the optimization level of the retrieval path; finally, the fourth intelligent agent performs multi-dimensional verification and optimization on the preliminary retrieval result, thereby establishing an end-to-end quality assurance mechanism; by constructing the above multi-intelligent agent collaborative architecture, the application can significantly improve the retrieval coverage and result accuracy when facing complex query tasks such as cross-domain and cross-database, while greatly reducing the response delay, thereby improving the retrieval efficiency and retrieval quality.
[0008] In a preferred example, the 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 processing layer; the step of generating a retrieval feature set by the first intelligent agent in response to the received task instruction, the retrieval feature set including an original semantic vector, a retrieval strategy identifier, and a target partition identifier, includes the following steps: extracting key features in the task instruction through the feature extraction layer, the key features including entity features, query constraint features, and sorting features; identifying abnormal factors in the task instruction through the anomaly detection layer, the abnormal factors including abnormal syntax, abnormal vocabulary, and abnormal logic; performing correlation analysis on the key features and the abnormal factors through the anomaly analysis layer, and marking the abnormal levels; performing a preset corresponding abnormal processing strategy on the abnormal factors based on the abnormal level marking result through the anomaly processing layer.
[0009] By adopting the technical solutions, the multi-layer collaborative architecture of the feature extraction layer, the anomaly detection layer, the anomaly analysis layer and the anomaly processing layer is configured in the first intelligent agent, fine analysis and robust processing of the task instruction are realized, specifically, the entity features, the query constraint features and the sorting features in the task instruction are extracted by the feature extraction layer, a structured data foundation is laid for subsequent processing, abnormal syntax, abnormal vocabulary and abnormal logic and other abnormal factors in the task instruction are comprehensively identified by the anomaly detection layer, so that non-standard input is effectively coped with, the correlation analysis of the key features and the abnormal factors is performed by the anomaly analysis layer, and the abnormal level marking is performed, the abnormal influence evaluation is realized, finally, the preset anomaly processing strategy is executed based on the abnormal level marking result by the anomaly processing layer, the targeted processing of the abnormal factors is completed, by the layered processing mechanism, the task instruction with syntax errors, improper words or logical confusion and other problems is effectively processed, the adaptability of the input task analysis is significantly improved, and the accuracy and integrity of the generated retrieval feature set are improved.
[0010] In a preferred example, the application can be further configured to: the step of matching the retrieval strategy identifier with a plurality of corresponding second intelligent agents and performing directional semantic conversion on the original semantic vector by the matched second intelligent agents to generate the query statement set, comprising the steps of: matching the retrieval strategy identifier with a preset intelligent agent performance mapping table, the intelligent agent performance mapping table including the conversion algorithm type, data compatibility and output level preference of the second intelligent agent; parallel scheduling the corresponding second intelligent agent based on the performance matching result, and inputting the original semantic vector to the corresponding processing layer based on the output level preference of the second intelligent agent for layered conversion to generate a plurality of heterogeneous query statements; performing multi-level semantic optimization on the heterogeneous query statements by a preset semantic collaborative strategy to generate the query statement set.
[0011] By adopting the technical solution, the agent performance mapping table is established and accurately matched with the retrieval strategy identifier, the scheduling and efficient utilization of the second agent are realized. Specifically, by matching the retrieval strategy identifier with the agent performance mapping table containing the conversion algorithm type, data compatibility and output level preference, it is ensured that the conversion of each retrieval task can be allocated to the most suitable second agent; based on the performance matching result, multiple second agents are scheduled in parallel, and the original semantic vector is input to the corresponding processing layer for hierarchical conversion according to the output level preference, so that the professional advantages of different second agents are fully utilized; finally, the generated heterogeneous query statements are subjected to multi-level semantic optimization through the preset semantic coordination strategy, the query expressions of different abstraction levels are effectively integrated, and finally a high-quality and diversified query statement set is generated; through the above-mentioned intelligent agent cooperative working mechanism, the accuracy and integrity of the query statement generation are significantly improved, the compatibility of the query statement with the target database is ensured, and the efficiency of the query generation is greatly improved through parallel processing.
[0012] In a preferred example, the application can be further configured to: the processing layer includes a fuzzy concept layer, a relationship analysis layer and an instance matching layer, the step of scheduling the corresponding second agent in parallel based on the performance matching result and inputting the original semantic vector to the corresponding processing layer for hierarchical conversion based on the output level preference of the second agent to generate a plurality of heterogeneous query statements, including steps of: performing adaptive sharding processing on the original semantic vector and extracting concept features, association features and instance features; inputting the concept features, association features and instance features to the corresponding processing layer based on the output level preference; performing semantic generalization processing on the input concept features through the fuzzy concept layer to generate a fuzzy query statement; performing path reasoning on the input association features through the relationship analysis layer to generate a graph query statement; performing term mapping on the input instance features through the instance matching layer to generate a structured query statement.
[0013] By adopting the technical scheme, a multi-level processing architecture including a fuzzy concept layer, a relationship analysis layer and an instance matching layer is constructed, and layered conversion of an original semantic vector is realized. Specifically, by performing adaptive fragmentation processing on the original semantic vector and extracting concept features, correlation features and instance features, structured decomposition of semantic information is realized. Different features are input to corresponding processing layers based on the output level preferences of the second intelligent agent, ensuring accurate matching of features and processing capabilities. The fuzzy concept layer performs semantic generalization processing on the concept features to generate a fuzzy query statement capable of capturing semantic similarity. The relationship analysis layer performs path reasoning on the correlation features to generate a graph query statement capable of expressing complex correlation relationships. The instance matching layer performs term mapping on the instance features to generate a structured query statement supporting accurate matching. The application realizes query requirements supporting different abstraction levels and different expression modes at the same time by constructing the above layered processing mechanism, has the effect of significantly improving the semantic coverage and expression ability of the query statement, and improves the accuracy of the query.
[0014] In a preferred example, the application can be further configured to: the step of generating the query statement set by performing multi-level semantic optimization on the heterogeneous query statements through the preset semantic coordination strategy includes the steps of: identifying the cross-modal semantic relationship between the fuzzy query statement, the graph query statement and the structured query statement, the cross-modal semantic relationship including a semantic equivalence relationship, a semantic complementary relationship and a semantic contradiction relationship; constructing a cross-modal semantic association matrix based on the cross-modal semantic relationship, and performing multi-level semantic optimization on the cross-modal semantic association matrix through a semantic coordination strategy to generate multi-level optimized statements, the multi-level optimized statements including equivalent optimized query statements, enhanced composite query statements and contradiction arbitration query statements; structurally recombining the multi-level optimized statements, and performing a preset corresponding query syntax adaptation strategy on a retrieval database to generate the query statement set.
[0015] By adopting the technical solution, the heterogeneous query statements are integrated and optimized by the preset semantic coordination strategy, and the fusion of the multi-modal query statements is realized. Specifically, the semantic equivalence, complementary and contradictory relationships among the fuzzy query statements, the graph query statements and the structured query statements are identified, and a diversified cross-modal semantic association network is established. Based on the foregoing semantic relationships, a cross-modal semantic association matrix is constructed, and a multi-level optimization processing is performed by using the semantic coordination strategy, to generate multi-level optimized statements including equivalent optimized query statements, enhanced composite query statements and contradictory arbitration query statements. Finally, the structured reorganization of the optimized statements is performed, and a query syntax adaptation strategy is executed, to generate a final unified query statement set. By the foregoing semantic coordination strategy, the application effectively solves the conflict and redundancy problems among the multi-source heterogeneous query statements, significantly improves the semantic consistency and execution efficiency of the query statements, and on the basis of retaining the advantages of different query expression methods, eliminates the possible logical contradictions as much as possible, to finally generate a high-quality and executable query statement set.
[0016] In a preferred example, the metadata features include data distribution feature index structure features and access mode features, the step of filtering a plurality of third intelligent agents based on the metadata features and the retrieval strategy identifier, and performing a query operation based on the query statement set in the matched database partition through the filtered third intelligent agents to obtain a preliminary retrieval set, includes the steps of: Based on the data distribution features, the data size and distribution of the database partition are evaluated, and data processing requirement information is determined; Based on the index structure features, the available index types and coverage of the database partition are analyzed, and index optimization requirement information is determined; Based on the access mode features, the hot data area and access frequency of the database partition are identified, and concurrent processing requirement information and cache management requirement information are determined; Based on the data processing requirement information, the index optimization requirement information, the concurrent processing requirement information and the cache management requirement information, an intelligent agent capability requirement portrait is constructed; Based on the retrieval strategy identifier and the intelligent agent capability requirement portrait, a plurality of third intelligent agents are filtered.
[0017] By adopting the technical solution, the metadata characteristics of the database partition are mined and utilized to realize screening of the third intelligent agent for retrieval. Specifically, the data distribution characteristics are evaluated to determine the data processing requirement information of the database partition, the index structure characteristics are analyzed to determine the index optimization requirement information of the available index type and coverage, and the access mode characteristics are identified to determine the concurrent processing and cache management requirement information of the hot data area and access frequency. The intelligent agent capability requirement portrait is constructed based on the data processing requirement information, the index optimization requirement information, the concurrent processing requirement information, and the cache management requirement information, and the most suitable third intelligent agent is screened out in combination with the retrieval strategy identifier. Through the above requirement portrait construction and matching steps, the third intelligent agent with the most processing advantage is dynamically selected to execute the query operation according to the specific characteristics and real-time state of each database partition, the pertinence and efficiency of query execution are significantly improved, and the professional processing capability of different intelligent agents is fully utilized while the high adaptability of the query operation to the characteristics of the database partition is achieved.
[0018] In a preferred example, the fourth intelligent agent includes a shard 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 the preset verification rule set by the fourth intelligent agent, and generating an optimized retrieval result includes the steps of: The preliminary retrieval set is multi-dimensionally sharded by the shard scheduling layer to obtain semantic association shards, source association shards, and quality level shards. The preset corresponding shard verification strategy is executed by the verification execution layer based on the multi-dimensional shard results.
[0019] By adopting the above technical solution, the double-layer architecture of the shard scheduling layer and the verification execution layer in the fourth intelligent agent is constructed to realize intelligent verification and optimization of the preliminary retrieval set. Specifically, the preliminary retrieval set is multi-dimensionally sharded by the shard scheduling layer to generate semantic association shards, source association shards, and quality level shards, and the complex retrieval result set is divided into subsets with common characteristics. The verification execution layer executes targeted verification strategies based on the characteristics of different shards, such as verifying semantic consistency for semantic association shards, verifying data source reliability for source association shards, and implementing differentiated verification intensity for quality level shards. The shard verification mechanism significantly improves the pertinence and efficiency of the verification process of the generated preliminary retrieval set, greatly improves the verification efficiency under the premise of ensuring a certain verification quality, and provides a guarantee for generating high-quality optimized retrieval results.
[0020] The second application purpose of the present application is achieved by the following technical solution: A multi-intelligent agent retrieval enhancement generation system, comprising: an instruction analysis module, configured to, in response to a received task instruction, analyze the task instruction by a first intelligent agent, and generate a retrieval feature set, the retrieval feature set comprising an original semantic vector, a retrieval strategy identifier, and a target partition identifier; a semantic conversion module, configured to, based on the retrieval strategy identifier, match a plurality of corresponding second intelligent agents, and perform directional semantic conversion on the original semantic vector by the matched second intelligent agents, and generate a query statement set; a feature extraction module, configured to, based on the target partition identifier, match a corresponding database partition from a preset retrieval database, and extract metadata features; a screening query module, configured to, based on the metadata features and the retrieval strategy identifier, screen a plurality of third intelligent agents, and perform a query operation based on the query statement set in the matched database partition by the screened third intelligent agents, and obtain a preliminary retrieval set; an optimization verification module, configured to input the preliminary retrieval set and the retrieval feature set into a fourth intelligent agent, and perform verification on the preliminary retrieval set by the fourth intelligent agent based on a preset verification rule set, and generate an optimized retrieval result.
[0021] By adopting the above technical solution, the instruction analysis module is configured to, in response to a received task instruction, analyze the task instruction by a first intelligent agent, and generate a retrieval feature set, the retrieval feature set comprising an original semantic vector, a retrieval strategy identifier, and a target partition identifier; the semantic conversion module is configured to, based on the retrieval strategy identifier, match a plurality of corresponding second intelligent agents, and perform directional semantic conversion on the original semantic vector by the matched second intelligent agents, and generate a query statement set; the feature extraction module is configured to, based on the target partition identifier, match a corresponding database partition from a preset retrieval database, and extract metadata features; the screening query module is configured to, based on the metadata features and the retrieval strategy identifier, screen a plurality of third intelligent agents, and perform a query operation based on the query statement set in the matched database partition by the screened third intelligent agents, and obtain a preliminary retrieval set; and the optimization verification module is configured to input the preliminary retrieval set and the retrieval feature set into a fourth intelligent agent, and perform verification on the preliminary retrieval set by the fourth intelligent agent based on a preset verification rule set, and generate an optimized retrieval result.
[0022] The application also relates to a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above multi-intelligent-agent retrieval enhancement generation method when executing the computer program.
[0023] The application also relates to a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the above multi-intelligent-agent retrieval enhancement generation method when executed by a processor.
[0024] To sum up, the application provides a multi-agent retrieval enhancement generation method and system, which realizes intelligent analysis of task instructions, cross-modal semantic conversion, dynamic database partition scheduling, and retrieval result optimization verification through a multi-agent collaboration mechanism. This 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 intentions, and optimizing the ability of heterogeneous database collaborative retrieval. BRIEF DESCRIPTION OF DRAWINGS
[0025] Figure 1 is a flowchart of an embodiment of a multi-agent retrieval enhancement generation method of the application; Figure 2 is an implementation flowchart of step S10 in an embodiment of the multi-agent retrieval enhancement generation method of the application; Figure 3 is an implementation flowchart of step S20 in an embodiment of the multi-agent retrieval enhancement generation method of the application; Figure 4 is an implementation flowchart of step S22 in an embodiment of the multi-agent retrieval enhancement generation method of the application; Figure 5 is an implementation flowchart of step S23 in an embodiment of the multi-agent retrieval enhancement generation method of the application; Figure 6 is an implementation flowchart of step S40 in an embodiment of the multi-agent retrieval enhancement generation method of the application. DETAILED DESCRIPTION
[0026] The following will be described in detail in combination with the accompanying drawings Figures 1-6 The application will be further described in detail.
[0027] In an embodiment, as shown in Figure 1 The application discloses a multi-agent retrieval enhancement generation method, which specifically includes the following steps: S10: In response to the received task instruction, the first intelligent agent analyzes the task instruction to generate a retrieval feature set, which includes an original semantic vector, a retrieval strategy identifier, and a target partition identifier; In the embodiment, the task instruction is a search requirement expression input by a user, usually in the form of natural language, containing an explicit search intent and potential constraint conditions, for example, "please find the sales data of new energy vehicles of a certain brand in North China in 2023, and require statistics by quarter and exclude test drive vehicles" is a complex task instruction containing time range, brand type, regional range, statistical dimension and exclusion condition. Further, the task instruction can also be a set of multiple related or unrelated search requirement expressions; the first agent is a computing module with task analysis capability, which can be implemented in the form of a natural language understanding model, etc., for decomposing the semantic elements and operation requirements of the user instruction; the search feature set is a structured data processing object output by the first agent, which includes an original semantic vector, a search strategy identifier and a target partition identifier; the original semantic vector is a distributed vector representation obtained by converting the task instruction through a semantic encoding model, etc., each dimension of which captures a specific semantic feature, for capturing deep semantic information of the instruction; the search strategy identifier is encoded data representing different query strategies, which can be implemented in the form of a hash value or vector embedding, for dynamically scheduling adaptive semantic conversion modules; the target partition identifier is a logical division identifier of the database storage structure, which can be implemented in the form of a partition key or metadata tag, for accurately positioning the data storage location.
[0028] Specifically, after receiving the task instruction of the user, the first agent first analyzes the instruction in depth, extracts the core semantic elements of the instruction through natural language understanding technology, etc., and encodes them into an original semantic vector, which can effectively represent the semantic connotation of the instruction; at the same time, the first agent also generates a search strategy identifier according to the task instruction, which is similar to a strategy selector, indicating which search strategy should be used; in addition, the first agent also 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 search database.
[0029] Exemplarily, when the user queries "2023 new energy vehicle sales data", the first agent generates a vector containing automobile field semantics, formulates a statistical query strategy identifier, and locates the new energy vehicle partition of the economic statistics database.
[0030] S20: match a plurality of corresponding second agents based on the search strategy identifier, and perform directional semantic conversion on the original semantic vector through the matched second agents to generate a query statement set; In this embodiment, the second agent is a module cluster for semantic conversion, which can be implemented in different neural network architecture combinations, etc., and is used to generate a multi-modal query statement. Specifically, the second agent receives an original semantic vector as input, generates a specific type of query statement through an internal semantic conversion algorithm, including but not limited to SQL queries, SPARQL queries, Elasticsearch queries, and other query language specifications, wherein the directional semantic conversion is the process of generating a specific type of query statement through an internal semantic conversion algorithm. The query statement set is a set of query commands output by the second agent, which includes query statements of different types or different optimization targets generated for the same retrieval requirement. The query statement set can include: structured query statements for exact matching, vector similarity query statements for semantic retrieval, and graph query statements for association retrieval, etc.
[0031] Specifically, the original semantic vector is input into the matched second agent to perform directional semantic conversion processing, so as to convert the user's natural language requirement into a query language that the database can understand.
[0032] For example, for a fuzzy query such as "find a notebook computer with high cost performance", the second agent can generate a query statement set containing multi-dimensional conditions such as price range and performance parameters.
[0033] S30: Match the corresponding database partition from the pre-set retrieval database based on the target partition identifier, and extract the metadata features; In this embodiment, the database partition is a data subset of the retrieval database divided according to a specific rule, and each partition has an independent data storage structure and access characteristic. The partitioning of the database can be based on multiple dimensions, such as time dimension (e.g., annual partition, monthly partition), business dimension (e.g., product category partition, regional partition), and heat dimension (hot data partition, cold data partition). Each partition has its specific data distribution characteristics and optimization requirements. The metadata features are a set of features that describe the characteristics of the database partition. The metadata features can include data distribution characteristics, index structure characteristics, and access mode characteristics. The data distribution characteristics are used to describe the numerical distribution, category distribution, and spatial distribution characteristics of the data in the partition. The index structure characteristics are used to record the index type, index coverage, and index efficiency data available in the partition. The access mode characteristics are used to count the access frequency, access time regularity, and hot data area of the partition.
[0034] Specifically, after locating a specific database partition according to the target partition identifier in the retrieval database, the metadata characteristics of the database partition are analyzed in depth, which can describe the data size, index structure, access mode and other characteristics of the partition in detail.
[0035] S40: Based on the metadata characteristics and the retrieval strategy identifier, a plurality of third intelligent agents are screened, and the query operation based on the query statement set is performed in the matched database partition through the screened third intelligent agents to obtain a preliminary retrieval set; In this embodiment, the third intelligent agent is a retrieval execution module cluster, which can be implemented in a distributed computing framework and the like, and is used for adapting retrieval operations of different database partitions; the preliminary retrieval set is an initial result set obtained after the third intelligent agent performs the query operation, which is pre-set to contain data records retrieved from each data partition, and the preliminary retrieval set has undergone preliminary relevance screening, but there may be duplicate records, conflicting data or uneven quality, which needs further verification and optimization processing.
[0036] Specifically, based on the metadata characteristics and the retrieval strategy identifier, a plurality of third intelligent agents most suitable for performing the query operation in the matched database partition are screened, and the database partition is associated with the third intelligent agent most suitable for the screening result, and the query operation based on the query statement set is performed in the database partition associated with the third intelligent agent to obtain a preliminary retrieval set containing data records retrieved from each data partition.
[0037] S50: The preliminary retrieval set and the retrieval feature set are input to the fourth intelligent agent, the preliminary retrieval set is verified based on a pre-set verification rule set by the fourth intelligent agent, and an optimized retrieval result is generated.
[0038] In this embodiment, the fourth intelligent agent is a result verification module, which can be implemented in a combination of a rule engine and a machine learning model and the like, and is used for eliminating redundant and contradictory results; the verification rule set is a verification rule set used by the fourth intelligent agent, which contains syntax verification rules, semantic verification rules and logical verification rules and the like, wherein the syntax verification is used to ensure that the result data conforms to the data mode specification, the semantic verification is used to check the consistency of the result and the query intention, and the logical verification is used to detect the logical conflict and contradiction between the results; the optimized retrieval result is the final output result after the fourth intelligent agent processes it, which usually has the characteristics of high quality, high relevance and high reliability, and the optimized retrieval result not only contains the original data record, but also can be attached with multi-dimensional index data such as quality score, confidence index and source tracking information, thereby providing more comprehensive and reliable retrieval services for users.
[0039] Specifically, the preliminary search set and the search feature set are input into the fourth intelligent agent for verification optimization. The fourth intelligent agent performs multi-dimensional verification on the results according to a preset verification rule set, such as checking the semantic consistency of the results, verifying the reliability of the data sources, and evaluating the quality level of the results, and generates the final optimized search results through de-duplication, sorting, and supplementing.
[0040] In an embodiment, the first intelligent agent includes a feature extraction layer, an anomaly detection layer, an anomaly analysis layer, and an anomaly processing layer, as shown in Figure 2 As shown in FIG. 10, step S10 includes steps of: S11: extracting key features in the task instruction through the feature extraction layer, the key features including entity features, query constraint features, and sorting features; S12: identifying abnormal factors in the task instruction through the anomaly detection layer, the abnormal factors including abnormal syntax, abnormal vocabulary, and abnormal logic; S13: performing correlation analysis on the key features and the abnormal factors through the anomaly analysis layer, and marking the abnormal levels; S14: performing a preset corresponding abnormal processing strategy on the abnormal factors based on the abnormal level marking result through the anomaly processing layer.
[0041] In this embodiment, the feature extraction layer is a component for extracting structured key features from the task instruction, which can be implemented in a manner of a named entity recognition module, a conditional constraint parsing module, and a sorting weight calculation module in a natural language processing model, etc., for separating core entities (i.e., entity features), query condition restrictions (i.e., query constraint features), and result sorting requirements (i.e., sorting features) in the task instruction. The anomaly detection layer is a component for identifying potential abnormal elements in the task instruction, which can be implemented in a manner of a syntax tree traversal algorithm, a word vector anomaly detection model, and a logic rule matching engine, etc., for detecting syntax errors, non-common or wrong vocabulary, and logic contradictions. The anomaly analysis layer is a component for evaluating the correlation between the abnormal factors and the key features, which can be implemented by constructing a correlation graph of the features and the abnormal factors using a graph neural network, and performing abnormal influence range analysis through a clustering algorithm, etc., for determining and marking the influence degree of the abnormal factors, i.e., the abnormal level marking. The anomaly processing layer is a component for performing abnormal correction or filtering operations, which can be implemented in a manner of matching abnormal processing strategies in a preset rule base, such as replacing abnormal syntax fragments by a syntax error correction model, replacing abnormal vocabulary by a synonym replacement, and reconstructing abnormal logic by a logic rewriting module, etc.
[0042] Specifically, when the task instruction is input to the first intelligent agent, the feature extraction layer first extracts entity features, query constraint features, and sorting features, such as identifying entities such as time, place, and person in the instruction through an entity recognition model, extracting numerical ranges and attribute restrictions in the query conditions through a constraint analysis module, and analyzing the user's implicit sorting requirements through a sorting model; then the anomaly detection layer scans the instruction text layer by layer, such as detecting syntax structure errors through syntax tree analysis, identifying uncommon words through word vector distance calculation, and verifying whether there are contradictions in the query conditions through a logic reasoning engine; the anomaly analysis layer analyzes the correlation between the detected abnormal factors and the extracted key features and marks the abnormal level, such as marking the abnormal factor as high priority when it is strongly associated with entity features; the anomaly processing layer executes corresponding strategies according to the abnormal level, such as using semantic reconstruction strategies for high-priority abnormalities and filtering strategies for low-priority abnormalities, and finally generates an abnormal-free original semantic vector, a retrieval strategy identifier, and a target partition identifier.
[0043] In an embodiment, as shown in FIG. 20, step S20 includes steps of: Figure 3 S21: performing performance matching on the retrieval strategy identifier and a preset intelligent agent performance mapping table, the intelligent agent performance mapping table including the conversion algorithm type, data compatibility, and output level preference of the second intelligent agent; S22: based on the performance matching result, scheduling the corresponding second intelligent agent in parallel, and based on the output level preference of the second intelligent agent, inputting the original semantic vector to the corresponding processing layer for layered conversion to generate a plurality of heterogeneous query statements; S23: performing multi-level semantic optimization on the heterogeneous query statements through a preset semantic coordination strategy to generate a query statement set.
[0044] In the embodiment, the agent performance mapping table is a database for storing second agent attribute parameters, and can be implemented in a hash table or a relational database, etc., and is used to match the second agent with specific semantic conversion capabilities based on the retrieval strategy identifier; the conversion algorithm type describes the semantic conversion algorithm categories supported by the second agent, such as a rule-based template filling algorithm, a neural network-based sequence generation algorithm, or a knowledge graph-based reasoning algorithm, etc.; the data compatibility describes the input data format and the output query language type that can be processed by the second agent, including whether to support a specific database dialect, whether to be compatible with different vector encoding specifications, etc.; the output level preference is the hierarchical division manner of the second agent for processing semantic vectors and the processing preference of each level, which is used to guide the flow path and processing process of the semantic vectors among different processing layers; the heterogeneous query statement is a set of query expressions with different syntax structures, which can include approximate queries based on vector similarity, exact queries based on keyword matching, path queries based on graph relationship, etc.; the semantic coordination strategy is a set of optimization rules for coordinating heterogeneous query statements, which can include equivalence relationship processing rules, complementary relationship fusion rules, and contradiction relationship arbitration rules, etc., for eliminating redundant information and enhancing semantic coverage; and the multi-level semantic optimization is a hierarchical processing process for heterogeneous query statements, which includes syntax level optimization (unifying query syntax specification), semantic level optimization (eliminating semantic conflicts), and logical level optimization (optimizing query structure), etc., to improve the quality and executability of the query statement through step-by-step refinement.
[0045] Specifically, after identifying the retrieval strategy identifier, the preset agent performance mapping table is activated to perform performance matching with the retrieval strategy identifier, so as to filter the second agent with corresponding conversion capabilities; for example, if the identifier points to a graph retrieval strategy, the second agent supporting relationship analysis is preferentially matched; after the filtering, a plurality of second agents are scheduled in parallel to process the original semantic vector at the same time, wherein each second agent decomposes the semantic vector into different processing layers according to the output level preference to generate a set of query expressions with different syntax structures; the generated query statements are subjected to multi-level semantic optimization through the preset semantic coordination strategy, for example, repeated queries can be merged through equivalence relationship, composite queries can be constructed through complementary relationship, and arbitration can be performed through contradiction relationship, etc., to finally generate a set of syntax-adapted query statements.
[0046] In an embodiment, the processing layer includes a fuzzy concept layer, a relationship analysis layer, and an instance matching layer, as shown in Figure 4 As shown in FIG. 22, step S22 includes the following steps: S221: performing adaptive sharding processing on the original semantic vector, and extracting concept features, association features, and instance features; S222: input the concept features, the association features and the instance features into the corresponding processing layers based on the output level preferences; S223: perform semantic generalization processing on the input concept features through the fuzzy concept layer to generate a fuzzy query statement; S224: perform path reasoning on the input association features through the relationship analysis layer to generate a graph query statement; S225: perform term mapping on the input instance features through the instance matching layer to generate a structured query statement.
[0047] In this embodiment, the fuzzy concept layer is a functional module for processing semantic generalization, which can be implemented by a semantic expansion algorithm based on probability distribution, etc., and the discrete semantic features are converted into query conditions that can cover potential related semantics by expanding the concept boundary; the relationship analysis layer is a functional module for constructing the association path, which can be implemented by a path reasoning algorithm based on the knowledge graph, etc., and the query conditions with logical structure are generated by analyzing the implicit association between entities; the instance matching layer is a functional module for precise term mapping, which can be implemented by a term alignment algorithm based on the structured database, etc., and the semantic features are converted into query conditions conforming to the database structure by matching the preset term mapping table; the adaptive sharding processing is an operation of dynamically segmenting the semantic vector, which can be implemented by a feature segmentation algorithm based on attention weight, etc., and the concept cluster, relationship mode and instance set in the vector are automatically identified to realize effective separation of the features; the concept feature is a feature component in the original semantic vector representing abstract concept and category information, which usually corresponds to the core theme and domain concept in the query, wherein the concept feature has a high level of abstraction and strong scalability, and is the basis for generating a semantic expansion query; the association feature is a feature component in the original semantic vector representing the relationship between entities, which reflects the semantic association and interaction mode between different concepts, wherein the association feature contains multi-dimensional information such as relationship type, relationship strength and relationship direction, and is the basis for constructing a complex query condition; the instance feature is a feature component in the original semantic vector representing specific instances and values, which corresponds to specific objects and constraint conditions in the query, wherein the instance feature usually has a clear value range and accurate matching requirement, and is a key element for generating an accurate query; the semantic generalization processing is the concept expansion and abstraction process adopted by the fuzzy concept layer, which expands the specific concept feature into a related concept set through technologies such as knowledge graph and semantic network, and generates a query condition with stronger generalization ability; the path reasoning is the association discovery and relationship chain construction process adopted by the relationship analysis layer, which discovers the direct and indirect associations between entities and constructs a query path expressing complex relationships through graph traversal and relationship reasoning algorithm; the term mapping is the specific value matching and standardization process adopted by the instance matching layer, which converts the abstract instance feature into specific values and standard terms in the database through the term dictionary and value domain mapping table, and ensures the accuracy and executability of the query condition; the fuzzy query statement is a query statement with semantic expansion capability generated by the fuzzy concept layer, which adopts loose matching conditions such as similarity matching and concept inclusion, and can recall results that are semantically related but different in expression; the graph query statement is a query statement expressing complex relationships generated by the relationship analysis layer, which adopts graph query technologies such as path query and relationship matching, and can discover and retrieve data with specific association patterns.Structured query statements are exact match query statements generated by the instance matching layer. They use precise conditions such as equal value matching and range query to accurately retrieve data records that meet specific value range requirements.
[0048] Specifically, when the original semantic vector is input into the second intelligent agent, the complex semantics is first decomposed into three independent subsets: concept features, association features, and instance features through adaptive segmentation processing. For example, concept features may include abstract concepts in the query intent, association features may include logical relationships between entities, and instance features may include specific term identifiers; based on the output level preferences preset by the second intelligent agent, concept features are directed to the fuzzy concept layer for semantic generalization processing, such as expanding "medical equipment" to a set of synonyms such as "diagnostic instruments, treatment devices", and generating fuzzy query statements that can cover potential related concepts; association features are directed to the relationship parsing layer for path reasoning, such as generating a graph query statement containing multi-hop relationships through the association path of "R&D institution-patent-product" in the knowledge graph; instance features are directed to the instance matching layer for term mapping, such as mapping "CT machine" to the standard term "computed tomography equipment" in the database, and generating precise query statements that conform to the structured query grammar.
[0049] In one embodiment, if Figure 5 As shown, step S23 includes the steps of: S231: Identifying 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; S232: Constructing a cross-modal semantic association matrix based on the cross-modal semantic relationship, and performing multi-level semantic optimization on the cross-modal semantic association matrix using a semantic collaboration strategy to generate a multi-level optimization statement, wherein the multi-level optimization statement includes an equivalent optimization query statement, an enhanced compound query statement, and a contradiction arbitration query statement; S233: Structurally reorganize the multi-level optimized statements, and execute the query syntax adaptation strategy corresponding to the preset search database to generate a query statement set.
[0050] In this embodiment, the cross-modal semantic relationship is the logical association between different modal query statements, which can be implemented by calculating semantic similarity combined with logical reasoning model, etc., and is used to identify the interaction relationship between different query statements at the semantic level; the semantic equivalence relationship refers to the relationship that different query statements express the same semantic content, such as the fuzzy query “electric vehicle with long endurance” and the structured query “electric vehicle with endurance greater than 500km” have certain semantic equivalence; the semantic complementary relationship refers to the relationship that the query statements have semantic complementation and enhancement, such as the graph query “battery technology and endurance relationship” and the structured query “battery capacity greater than 80kWh” form a complement; the semantic contradiction relationship refers to the relationship that the query statements have semantic conflict or exclusion, such as the fuzzy query “luxury car with affordable price” has contradictory concepts; the cross-modal semantic association matrix is a mathematical structure representing the semantic association strength between different query statements, which can be constructed by tensor decomposition or graph neural network, and is used to quantify the weight distribution of semantic relationship; the semantic coordination strategy is an optimization mechanism for coordinating different semantic relationships, which is a set of optimization rules for coordinating heterogeneous query statements; the multi-level optimized query statement is a set of query statements after coordination optimization, which is used to improve the compatibility and execution efficiency of the query statement, including equivalence optimized query statement, enhanced composite query statement and contradiction arbitration query statement; wherein, the equivalence optimized query statement is generated by removing and optimizing the semantic equivalent statements, which eliminates duplicate queries while retaining the most representative query form; the enhanced composite query statement is generated by semantic complementary fusion, which deeply integrates the query statements with complementary relationship to form a composite query expression with multi-dimensional advantages; the contradiction arbitration query statement is generated by solving semantic contradiction, which uses a dynamic arbitration mechanism based on evidence strength to intelligently arbitrate and select the query conditions with semantic conflict to form an optimized query form; the structured reorganization is a logical reconstruction process of the optimized query statement, including logical structure reorganization (optimizing the organization order of query conditions to improve execution efficiency), syntax structure reorganization (adjusting the query syntax form to adapt to different database engines) and execution plan reorganization (optimizing the execution strategy of query to reduce resource consumption) etc.; the query syntax adaptation strategy is a set of strategies for converting the optimized query statement into a syntax structure recognizable by the target database, which is used to ensure the compatibility of the query statement with the target database.
[0051] Further, the query syntax adaptation strategy can include dialect conversion strategy (converting the query into the SQL dialect of a specific database), function adaptation strategy (adjusting the query function and operator to match the supported functions of the database), and performance tuning strategy (adding query hints and optimization parameters to improve execution efficiency).
[0052] Specifically, in the process of generating the query statement set, firstly, cross-modal semantic relationship recognition is performed on the fuzzy query statement, the graph query statement and the structured query statement, for example, by comparing semantic embedding vectors to determine whether there is an equivalent, complementary or contradictory relationship between the statements; then a cross-modal semantic association matrix is constructed to quantify the association strength of different statements, for example, the weight distribution of different statements in a specific semantic dimension is calculated by using an attention mechanism; based on the cross-modal semantic association matrix, a semantic coordination strategy is applied to perform multi-level optimization, for example, statement merging for equivalent relationships, logical enhancement for complementary relationships, arbitration screening for contradictory relationships, etc., to generate equivalent optimized query statements, enhanced composite query statements and contradictory arbitration query statements; finally, the multi-level optimized statements are converted into query instructions conforming to the syntax specifications of the target database through structured reorganization, for example, adjusting the query conditions, arranging the order according to the database index type, or adding sharding restriction conditions according to the data storage mode.
[0053] In an embodiment, the metadata features include data distribution features, index structure features and access pattern features, as shown in Figure 6 As shown, step S40 includes steps of: S41: based on the data distribution features, evaluating the data size and distribution of the database partition to determine the data processing requirement information; S42: based on the index structure features, analyzing the available index types and coverage of the database partition to determine the index optimization requirement information; S43: based on the access pattern features, identifying the hotspot data area and access frequency of the database partition to determine the concurrent processing requirement information and the cache management requirement information; S44: based on the data processing requirement information, the index optimization requirement information, the concurrent processing requirement information and the cache management requirement information, constructing the agent capability requirement portrait; S45: based on the search strategy identifier and the agent capability requirement portrait, screening a plurality of third agents.
[0054] In the embodiment, the data distribution feature is metadata describing the statistical distribution characteristics of the data in the partition, including data size (such as the number of records, the size of the storage space), numerical distribution (such as the mean, variance, quantile of numerical fields), category distribution (such as the uniformity of the value distribution of enumeration type fields), and spatial distribution (such as the distribution density of geographic data) and other statistical indicators. The data distribution feature can be quantitatively evaluated by a statistical analysis module in terms of data magnitude and dispersion, and reflects the overall distribution of the data, providing a basis for evaluating query processing complexity. The index structure feature is metadata describing the configuration of the partition index, including available index types (such as B-tree index, hash index, bitmap index, full-text index, etc.), index coverage range (number of fields involved and coverage rate), index quality indicators (index selectivity, index depth, etc.), and index maintenance state, etc. The index structure feature determines the index resources available for queries. The access pattern feature is metadata reflecting the historical access patterns of the record partition, including hot data areas (frequently accessed data ranges), access time distribution (access frequency patterns in different time periods), access type proportion (proportion of query, update, delete, etc.), and concurrent access features. The access pattern feature reflects the actual usage patterns of the partition. The data processing requirement information is the processing capacity requirement based on the data distribution feature analysis, including the required memory capacity, computing processing capacity, parallel processing degree, and special processing function requirement, which ensures that the agent has the ability to process the data size and analysis requirements of the partition. The index optimization requirement information is the index utilization requirement based on the index structure feature analysis, including the required index type, index optimization capability level, and index maintenance requirement, which ensures that the agent can fully utilize the existing index resources. The concurrent processing requirement information is the concurrent performance requirement based on the access pattern feature analysis, including the required concurrent connection number, transaction processing capacity, and lock management mechanism requirement, which ensures that the agent can meet the concurrent access requirements of the partition. The cache management requirement information is the cache optimization requirement based on the access pattern feature analysis, including the cache capacity requirement, cache replacement strategy requirement, and data prefetching strategy requirement, which ensures that the agent can effectively utilize the cache to improve performance. The agent capability requirement profile is a comprehensive capability model composed of data processing requirements, index optimization requirements, concurrent processing requirements, and cache management requirements. The requirement and the performance tag of the agent can be matched by using a multi-dimensional vector space mapping algorithm, etc., for precise screening of third agents with corresponding processing capabilities.
[0055] Specifically, when the database partition is determined, firstly, the data scale and distribution of the database partition are evaluated based on the data distribution characteristics to determine the data processing requirement information, for example, triggering the distributed computing requirement when the data volume exceeds the preset threshold; then, the available index types and coverage of the database partition are analyzed based on the index structure characteristics to determine the index optimization requirement information; at the same time, the hot data area and access frequency of the database partition are identified based on the access mode characteristics to determine the concurrent processing requirement information and the cache management requirement information; the data processing requirement information, the index optimization requirement information, the concurrent processing requirement information and the cache management requirement information are integrated into the agent capability requirement portrait, and a plurality of third agents are screened based on the search strategy identifier and the agent capability requirement portrait, for example, taking the distributed processing capability, the index optimization capability and the high-concurrency scheduling capability as the screening conditions, combining the priority rules specified in the search strategy identifier, and dynamically selecting the third agents with the corresponding capabilities from the agent resource pool, and the selected third agents execute the query task according to their expertise.
[0056] In an embodiment, the fourth intelligent agent includes a sharding scheduling layer and a verification execution layer, and step S50 includes steps of: S51: performing multi-dimensional sharding on the preliminary search set through the sharding scheduling layer to obtain semantic association sharding, source association sharding and quality level sharding; S52: performing a preset corresponding sharding verification strategy based on the multi-dimensional sharding result through the verification execution layer.
[0057] In the embodiment, the slice scheduling layer is a processing module for multi-dimensional slicing of the preliminary search results. Specifically, a dynamic slicing algorithm can be used in combination with semantic correlation, data source characteristics and quality evaluation indicators for slicing division. Its role is to reorganize the heterogeneous search results according to the correlation dimensions to adapt to the subsequent verification process. The verification execution layer is a logical execution unit for implementing slice verification strategies. Specifically, the rule engine can be used to load verification rules matching the slice type, such as performing redundancy elimination rules on semantic correlation slices, and performing credibility verification rules on source correlation slices. Its role is to implement differentiated verification operations for different slice characteristics. Multi-dimensional slicing is a slice set formed based on semantic correlation, data source attributes and quality evaluation results. Specifically, it can be achieved by semantic similarity calculation, source label matching and quality score threshold division. Its role is to decouple the complex search result set into subsets with internal consistency to improve verification efficiency. Semantic correlation slices are subsets divided according to the semantic relevance of the results, containing search results with consistent semantic themes and concept-related. The results within the semantic correlation slices have high semantic cohesion, which facilitates consistency verification and semantic deduplication processing. Source correlation slices are subsets divided according to the data source characteristics of the results, containing results from the same data partition or with the same source characteristics, which facilitates source reliability verification and data consistency check. Quality level slices are subsets divided according to the preliminary quality evaluation results, which are divided into different levels according to the quality score. It facilitates the implementation of differentiated verification strength and optimizes the allocation of verification resources. Slice verification strategies are a set of verification logic corresponding to slice types, which can include semantic consistency verification, data source credibility verification and quality level screening, etc. Its role is to eliminate conflicts and noise data in search results through a hierarchical verification mechanism.
[0058] Specifically, when the preliminary search set is input to the fourth intelligent agent, the slice scheduling layer first clusters search results with similar themes to form semantic correlation slices according to semantic correlation, such as grouping documents related to the same entity or event into the same slice. At the same time, source correlation slices are generated based on metadata information of the data source, such as distinguishing slices from academic databases, news websites or user-generated content. Further, the quality evaluation model is used to score the confidence of the search results, which are divided into high, medium and low quality level slices according to the preset threshold. The verification execution layer then calls the corresponding verification rules for different slice types: semantic conflict detection and redundancy merging are performed on semantic correlation slices, such as detecting contradictory statements through entity relationship graphs; authority verification is performed on source correlation slices, such as filtering data from low credibility sources; threshold filtering is performed on quality level slices, such as retaining only the top N results in high-quality slices; finally, the fourth intelligent agent reorganizes the verified slices and outputs further optimized search results.
[0059] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0060] In an embodiment, a multi-agent retrieval enhancement generation system is provided, which corresponds to the multi-agent retrieval enhancement generation system in the above embodiment. The multi-agent retrieval enhancement generation system comprises: An instruction analysis module is configured to analyze the task instruction through the first agent in response to the received task instruction, and generate a retrieval feature set, wherein the retrieval feature set comprises an original semantic vector, a retrieval strategy identifier, and a target partition identifier; A semantic conversion module is configured to match a plurality of corresponding second agents based on the retrieval strategy identifier, and perform directional semantic conversion on the original semantic vector through the matched second agents to generate a query statement set; A feature extraction module is configured to match a corresponding database partition from a preset retrieval database based on the target partition identifier, and extract metadata features; A screening query module is configured to screen a plurality of third agents based on the metadata features and the retrieval strategy identifier, and perform a query operation based on the query statement set in the matched database partition through the screened third agents to obtain a preliminary retrieval set; An optimization verification module is configured to input the preliminary retrieval set and the retrieval feature set into a fourth agent, and verify the preliminary retrieval set based on a preset verification rule set through the fourth agent, and generate an optimized retrieval result.
[0061] For specific limitations of the multi-agent retrieval enhancement generation system, please refer to the limitations of the multi-agent retrieval enhancement generation method in the above, which will not be repeated here. Each module in the above multi-agent retrieval enhancement generation system can be realized by software, hardware and their combination. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0062] In an embodiment, a computer device is provided, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement a multi-agent retrieval enhancement generation method.
[0063] In an embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement a multi-agent retrieval enhancement generation method.
[0064] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A multi-agent retrieval enhancement generation method, characterized in that: Including steps: In response to the received task instruction, the first agent parses the task instruction to generate a retrieval feature set, the retrieval feature set including an original semantic vector, a retrieval strategy identifier, and a target partition identifier; Matching a number of corresponding second agents based on the retrieval strategy identifier, and performing a directional semantic transformation on the original semantic vector through the matched second agents to generate a query statement set; Matching a corresponding database partition from a preset search database based on the target partition identifier and extracting metadata features; Selecting a plurality of third agents based on the metadata features and the search strategy identifier, and executing a query operation based on the query statement set in a matching database partition by the selected third agents to obtain a preliminary search set; The preliminary search set and the search feature set are input into the fourth intelligent agent, and the preliminary search set is verified by the fourth intelligent agent based on a preset verification rule set, and an optimized search result is generated.
2. A multi-agent search enhancement generation method according to claim 1, characterized in that: The first agent includes a feature extraction layer, an anomaly detection layer, an anomaly analysis layer, and an anomaly handling layer. In response to a received task instruction, the first agent parses the task instruction 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. The steps include: Extract key features from the task instructions through a feature extraction layer, wherein the key features include entity features, query constraint features, and sorting features; Identify abnormal factors of task instructions through the abnormal detection layer, wherein the abnormal factors include abnormal syntax, abnormal vocabulary and abnormal logic; The anomaly analysis layer performs correlation analysis on key features and anomaly factors, and marks the anomaly level; The exception handling layer executes the preset corresponding exception handling strategy for the exception factor based on the exception level marking result.
3. The multi-agent search enhancement generation method according to claim 1, characterized in that: The step of matching a plurality of corresponding second agents based on the retrieval strategy identifier and performing directional semantic conversion on the original semantic vector through the matched second agents to generate a query statement set includes the following steps: Matching the search strategy identifier with a preset agent performance mapping table, wherein the agent performance mapping table includes a 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 the original semantic vector is input into the corresponding processing layer for hierarchical conversion based on the output level preference of the second agent to generate several heterogeneous query statements; Through the preset semantic collaboration strategy, multi-level semantic optimization is performed on heterogeneous query statements to generate a query statement set.
4. A multi-agent search enhancement generation method according to claim 3, characterized in that: The processing layer includes a fuzzy concept layer, a relationship analysis layer, and an instance matching layer. The steps of scheduling the corresponding second agent in parallel based on the performance matching result, inputting the original semantic vector into the corresponding processing layer for hierarchical conversion based on the output level preference of the second agent, and generating a plurality of heterogeneous query statements include the following steps: Adaptively segment the original semantic vector and extract concept features, association features, and instance features; Input concept features, association features, and instance features into the corresponding processing layer based on the output level preference; The fuzzy concept layer performs semantic generalization processing on the input concept features to generate fuzzy query statements; The relationship parsing layer performs path reasoning on the input association features to generate graph query statements; The instance matching layer performs term mapping on the input instance features to generate structured query statements.
5. A multi-agent search 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 between 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; A cross-modal semantic association matrix is constructed based on cross-modal semantic relationships, and a multi-level semantic optimization is performed on the cross-modal semantic association matrix through a semantic collaboration strategy to generate multi-level optimization statements, wherein the multi-level optimization statements include equivalent optimization query statements, enhanced compound query statements, and contradiction arbitration query statements; The multi-level optimized statements are restructured and the query syntax adaptation strategy corresponding to the preset retrieval database is executed to generate a query statement set.
6. A multi-agent search enhancement generation method according to claim 1, characterized in that: The metadata features include data distribution features, index structure features, and access mode features. The step of selecting a plurality of third agents based on the metadata features and the retrieval strategy identifier, and executing a query operation based on a query statement set in a matching database partition by the selected third agents to obtain a preliminary retrieval set includes the following steps: Evaluate the data size and distribution of database partitions based on data distribution characteristics to determine data processing requirements; Analyze the available index types and coverage of database partitions based on index structure characteristics to determine index optimization requirements; Identify hot data areas and access frequencies of database partitions based on access pattern characteristics, and determine concurrent processing requirements and cache management requirements. Build an agent capability requirement profile based on data processing requirement information, index optimization requirement information, concurrent processing requirement information, and cache management requirement information; Several third agents are selected based on the retrieval strategy identifier and the agent capability requirement profile.
7. A multi-agent search enhancement generation method according to claim 1, characterized in that: The fourth agent includes a sharding scheduling layer and a verification execution layer. The step of inputting the preliminary search set and the search feature set into the fourth agent, verifying the preliminary search set based on a preset verification rule set by the fourth agent, and generating an optimized search result includes the following steps: The preliminary search set is sharded in multiple dimensions through the shard scheduling layer to obtain semantic association shards, source association shards, and quality level shards. The verification execution layer executes the preset corresponding sharding verification strategy based on the multi-dimensional sharding results.
8. A multi-agent retrieval enhancement generation system, characterized in that: include: an instruction parsing module, configured to parse the received task instruction by the first agent in response to the received task instruction, and generate a retrieval feature set, wherein the retrieval feature set includes an original semantic vector, a retrieval strategy identifier, and a target partition identifier; A semantic conversion module is used to match a plurality of corresponding second agents based on the search strategy identifier, and perform a directional semantic conversion on the original semantic vector through the matched second agents to generate a query statement set; A feature extraction module is used to match the corresponding database partition from a preset search database based on the target partition identifier and extract metadata features; A screening query module is used to screen a plurality of third agents based on metadata features and a search strategy identifier, and execute a query operation based on a query statement set in a matching database partition through the screened third agents to obtain a preliminary search set; The optimization verification module is used to input the preliminary search set and the search feature set into the fourth intelligent agent, verify the preliminary search set based on the preset verification rule set by the fourth intelligent agent, and generate an optimized search result.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements the steps of a 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 a processor, the steps of a multi-agent retrieval enhancement generation method as described in any one of claims 1 to 7 are implemented.
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
Cited By
Data analysis method and device, storage medium and electronic equipment
CN121051140A
A data analysis method, device, storage medium and electronic equipment
CN121051140B
Intelligent question and answer method, system and device and computer readable storage medium
CN121413740A
Engineering drawing process splitting method and device, product and medium
CN122019575A