A method for generating an autonomous search-enhanced intelligent agent based on a large language model

CN122903588APending Publication Date: 2026-10-13KAIYUAN CLOUD (BEIJING) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611382090.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]为此,本发明提供一种基于大语言模型的自主检索增强智能体的生成方法,用以克服现有技术中由于依据输入文本判断是否检索,未结合任务的来源、时效及环节承接关系生成对应检索策略,且缺少检索策略的验证与反馈修正,导致不同任务下的检索适应性和生成可控性不足

Benefits of technology

[0039]与现有技术相比,本发明的有益效果在于,本发明通过对任务文本进行语言结构解析,确定任务结构形态及对应的检索需求要素,并根据所述检索需求要素依次判定检索必要性、来源约束、时效约束与串联约束,形成与任务实际信息需求相对应的检索需求;进一步依据所述检索需求生成包括知识来源对象、检索触发条件、检索执行模式与验证基准的检索策略规格,并将所述检索策略规格注入大语言模型构成的智能体实例,使不同任务能够根据自身的信息获取需求形成对应的检索行为;同时在部署前根据验证基准对智能体实例进行验证,并依据未通过验证维度调整对应的检索策略规格重新生成智能体实例,从而形成检索策略生成、实例验证及策略修正的闭环,提高检索增强智能体的检索执行有效性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903588A_ABST
    Figure CN122903588A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence, and more particularly to a generation method of autonomous search enhanced intelligent agent based on a large language model, comprising: constructing an intelligent agent based on a large language model, and obtaining a task text; performing language structure analysis on the task text to determine a task structure form and corresponding search demand elements; determining the establishment state of search necessity, source constraint, timeliness constraint and series constraint in sequence according to the search demand elements to determine the search demand; generating a search strategy specification according to the search demand, and injecting the search strategy specification into an intelligent agent instance; verifying the generation result of the intelligent agent instance according to the verification benchmark, determining the intelligent agent instance as a to-be-deployed intelligent agent instance when the verification is passed, and adjusting the search strategy specification and regenerating the intelligent agent instance according to the unpassed verification dimension when the verification is unpassed. The present application improves the generation quality of the intelligent agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method for generating autonomous retrieval augmented agents based on a large language model. Background Technology

[0002] In existing technologies, retrieval augmentation agents based on large language models typically employ fixed or manually configured retrieval strategies. This makes it difficult to adaptively determine retrieval behavior based on differences in external knowledge requirements, knowledge sources, information timeliness, and the relationships between multiple stages of a task. This can easily lead to problems such as invalid retrievals, deviations in retrieval sources, mismatches in timeliness information, and information fragmentation between different task stages. Furthermore, existing agent generation processes often lack verification and feedback correction mechanisms corresponding to the task's retrieval requirements. When retrieval results do not meet task requirements, it is difficult to locate the corresponding retrieval strategy and make targeted adjustments, thus affecting the reliability of the generated results from the retrieval augmentation agent.

[0003] Chinese Patent Publication No. CN119903174A discloses a search enhancement generation method and related apparatus based on intelligent agents. The method includes: an intelligent agent set determining whether search enhancement processing is needed based on a first text; if search enhancement processing is needed, retrieving multiple text blocks from a knowledge base based on the first text; generating a second text corresponding to the first text based on the first text and the multiple text blocks; providing the second text to a large language model; and the large language model outputting a third text corresponding to the first text based on the text provided by the intelligent agent set.

[0004] Therefore, the aforementioned method for generating enhanced search agents suffers from insufficient adaptability and controllability in search results under different tasks. This is because the method relies on the input text to determine whether to search, without considering the source, timeliness, and sequential relationship of the task to generate a corresponding search strategy. Furthermore, the method lacks verification and feedback correction of the search strategy. Summary of the Invention

[0005] To address this, the present invention provides a method for generating an autonomous retrieval augmentation agent based on a large language model. This method overcomes the shortcomings of existing technologies, which rely on input text to determine whether to conduct a retrieval, fail to consider the source, timeliness, and sequential relationships of the task to generate corresponding retrieval strategies, and lack verification and feedback correction of retrieval strategies. Consequently, these technologies suffer from insufficient retrieval adaptability and generation controllability under different tasks.

[0006] To achieve the above objectives, this invention provides a method for generating autonomous retrieval augmentation agents based on a large language model, comprising:

[0007] An intelligent agent is constructed based on a large language model, and task text is obtained. The language structure of the task text is parsed to determine the task structure and corresponding retrieval requirements.

[0008] Based on the search requirement elements, the validity status of search necessity, source constraint, timeliness constraint and series constraint is determined in sequence to determine the search requirement;

[0009] Based on the search requirements, a search strategy specification is generated, and the search strategy specification is injected into the agent instance, wherein,

[0010] The retrieval strategy specification includes at least the knowledge source object, retrieval triggering conditions, retrieval execution mode, and verification benchmark;

[0011] The generation result of the agent instance is verified according to the verification benchmark. If the verification passes, the agent instance is determined to be an agent instance to be deployed. If the verification fails, the retrieval strategy specification is adjusted according to the verification dimension that failed and the agent instance is regenerated.

[0012] Furthermore, the task text is subjected to language structure parsing, including:

[0013] Identify the task predicates, connecting components, entities, temporal expressions, and source referencing structures in the task text, and determine the target object corresponding to each task predicate.

[0014] Furthermore, the task structure and corresponding retrieval requirements are determined, including:

[0015] Based on the relationship between the task predicates and target objects connected by the connecting components, determine whether the task text includes several task steps;

[0016] When a process involves several task steps, a sequence of steps is formed, and the retrieval requirements for each step are determined.

[0017] When not including several task steps, the task text is used as a single step to determine the corresponding retrieval requirement elements.

[0018] Furthermore, the determination of the necessity of retrieval includes:

[0019] Based on the correspondence between the task objectives of each stage and the existing information in the task text, it is determined whether the corresponding task has an external knowledge acquisition requirement, so as to determine whether the necessity of the retrieval is valid.

[0020] Furthermore, the determination of the validity of the source constraint includes:

[0021] Determine whether the source constraint is valid based on the source referral structure and its referral object;

[0022] When the source constraint is met, the corresponding knowledge source object is determined based on the referencing object;

[0023] When the source constraint is not met, candidate knowledge source objects are determined from the knowledge sources accessible to the agent instance.

[0024] Furthermore, the determination of the validity period constraint includes:

[0025] The validity of the time constraint is determined based on the limiting relationship between the time expression and the information to be retrieved;

[0026] When the time constraint is met, the corresponding time limit condition is determined according to the time expression.

[0027] Furthermore, determining the validity of the serial constraint includes:

[0028] The validity of the serial constraint is determined based on the reference relationship between the output objects of subsequent steps and the preceding steps in the process sequence.

[0029] When the serial constraint is met, the object produced by the preceding step is used for retrieval in the subsequent step;

[0030] When the series constraint is not met, each step performs the search according to the corresponding search requirements.

[0031] Furthermore, when the necessity of the search is established, a search is initiated based on the search requirement elements corresponding to the current stage;

[0032] Based on the supplementary status of newly added search results during the continuous search process, determine whether to continue the search.

[0033] Furthermore, the verification benchmark includes a result verification benchmark and a constraint verification benchmark determined based on the validity status of the source constraint, time constraint and series constraint;

[0034] The verification status of the agent instance is determined based on the generated result verification benchmark and the corresponding constraint verification benchmark.

[0035] Furthermore, the regenerated agent includes:

[0036] The instance compares the generated result of the agent instance with the labeled baseline corresponding to the verification benchmark for consistency.

[0037] When there are dimensions that fail verification, the corresponding retrieval strategy adjustment object is determined according to the dimensions that fail verification, and the agent instance is regenerated based on the adjusted retrieval strategy specification.

[0038] Whether to retain the adjusted retrieval strategy specification is determined based on the changes in the verification status of agent instances before and after the adjustment.

[0039] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention analyzes the language structure of the task text to determine the task structure and corresponding retrieval requirement elements, and then sequentially determines the retrieval necessity, source constraints, timeliness constraints, and sequential constraints based on the retrieval requirement elements to form retrieval requirements corresponding to the actual information needs of the task; furthermore, it generates retrieval strategy specifications including knowledge source objects, retrieval triggering conditions, retrieval execution modes, and verification benchmarks based on the retrieval requirements, and injects the retrieval strategy specifications into an agent instance composed of a large language model, enabling different tasks to form corresponding retrieval behaviors according to their own information acquisition needs; at the same time, before deployment, the agent instance is verified according to the verification benchmarks, and the corresponding retrieval strategy specifications are adjusted and the agent instance is regenerated based on the dimensions that fail verification, thereby forming a closed loop of retrieval strategy generation, instance verification, and strategy correction, improving the retrieval execution effectiveness of the retrieval enhancement agent.

[0040] Furthermore, the method of the present invention identifies task predicates, connecting components, entities, time expressions, and source referencing structures in the task text, and determines the task structure based on the relationship between the task predicates connected by the connecting components and the target objects. When the task includes several task stages, a stage sequence is formed, and the retrieval requirement elements for each stage are determined. Since different task texts differ in terms of task structure, information objects, and knowledge source requirements, it is difficult to accurately determine the actual retrieval information needed for each stage using only a unified task processing method. By parsing the language structure of the task text and forming corresponding retrieval requirement elements, the subsequent retrieval requirement determination can be based on the specific task structure, thereby improving the accuracy of retrieval requirement determination.

[0041] Furthermore, the method of the present invention determines the necessity of retrieval, source constraints, time constraints, and sequential constraints in sequence based on the correspondence between the task objectives and existing information in each task stage, the source referral relationship, the time constraint relationship, and the output connection relationship between the preceding and following stages. Since different tasks differ in terms of whether they need to acquire external knowledge, the scope of knowledge sources, the timeliness of information, and the dependency relationship between task stages, adopting a uniform retrieval strategy can easily lead to invalid retrieval, deviation of knowledge sources, mismatch of timeliness information, or fragmentation of information between preceding and following stages. By performing hierarchical judgment on the above-mentioned retrieval needs, the knowledge source, time constraint, and stage connection method can correspond to the actual needs of the task, thereby reducing unnecessary retrieval processes and improving the correspondence between retrieval results and task requirements.

[0042] Furthermore, the method of the present invention generates retrieval strategy specifications according to retrieval requirements and injects them into agent instances. The agent instances are then verified based on the generated results verification benchmark and the constraint verification benchmarks corresponding to source constraints, timeliness constraints, and concatenation constraints. When a verification dimension fails, the corresponding retrieval strategy adjustment object is determined based on the failed verification dimension, and the agent instance is regenerated according to the adjusted retrieval strategy specifications. The corresponding adjustment result is retained when the verification status improves after adjustment, and adjustment is stopped when the verification status no longer improves. Since the causes of different retrieval anomalies and the required retrieval strategies differ, targeted correction of agent instances through the correspondence between verification dimensions and retrieval strategy adjustment objects can avoid repeated adjustments to all retrieval strategies, thereby improving the controllability of the retrieval enhancement agent generation and verification process. Attached Figure Description

[0043] Figure 1 This is an overall flowchart of the method for generating autonomous retrieval augmented agents based on a large language model according to an embodiment of the present invention;

[0044] Figure 2 This is a logical flowchart illustrating the process by which the autonomous retrieval augmentation agent based on a large language model determines the task structure and retrieval requirement elements in an embodiment of the present invention.

[0045] Figure 3 This is a flowchart illustrating the cascading discrimination process of the autonomous retrieval augmentation agent based on a large language model, as described in an embodiment of the present invention.

[0046] Figure 4 This is a flowchart illustrating the verification and retrieval strategy adjustment process of the autonomous retrieval enhancement agent based on a large language model, as described in an embodiment of the present invention. Detailed Implementation

[0047] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0048] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0049] Please see Figure 1 The diagram shown is an overall flowchart of the method for generating autonomous retrieval augmented agents based on a large language model according to an embodiment of the present invention. The method described in this embodiment includes:

[0050] Step S1: Construct an intelligent agent based on a large language model, obtain task text, perform language structure parsing on the task text, and determine the task structure and corresponding retrieval requirements.

[0051] Step S2: Based on the search requirement elements, determine the validity status of search necessity, source constraint, timeliness constraint and series constraint in sequence to determine the search requirement;

[0052] Step S3: Generate a retrieval strategy specification based on the retrieval requirements, and inject the retrieval strategy specification into the agent instance, wherein...

[0053] The retrieval strategy specification includes at least the knowledge source object, retrieval triggering conditions, retrieval execution mode, and verification benchmark;

[0054] Step S4: Verify the generation result of the agent instance according to the verification benchmark. If the verification passes, determine the agent instance as an agent instance to be deployed. If the verification fails, adjust the retrieval strategy specification according to the failed verification dimension and regenerate the agent instance.

[0055] In this embodiment, the method first extracts task information related to the retrieval behavior from the language structure of the task text itself. Based on whether the task requires external knowledge, whether the knowledge source is limited, whether there are time requirements, and whether there is a succession relationship between different task stages, a retrieval requirement is formed. Then, the retrieval requirement is converted into a retrieval strategy specification that can control the retrieval behavior of the agent. Before the agent is deployed, the agent instance is further verified according to the verification benchmark corresponding to the retrieval requirement. If the verification fails, the corresponding retrieval strategy is corrected, thereby forming a closed loop of task parsing, retrieval strategy generation, agent instance generation, and verification correction.

[0056] Specifically, the task text is a natural language task description to be processed by the agent instance.

[0057] Specifically, the search requirement elements are structured information that can characterize the task's need for knowledge retrieval behavior, determined from the task text through language structure analysis. These include at least one of the following: task objectives, entities, time references, source referencing relationships, and the connection relationships between task stages.

[0058] Please see Figure 2 As shown, it is a flowchart of the process of determining the task structure and retrieval requirements in an embodiment of the present invention.

[0059] In this embodiment, language structure parsing is performed on the task text, including task predicate recognition, syntactic dependency parsing, named entity recognition, temporal expression recognition, and source referencing structure recognition.

[0060] Specifically, a task predicate is a predicate component used to characterize the operation required by the task text;

[0061] The target object is the entity, attribute, relationship, state, or other task processing object that the corresponding task predicate is applied to.

[0062] Specifically, the task text is identified by syntactic dependency parsing, and the language units connected by the connected components are determined.

[0063] When a connecting component connects two or more task clauses that each have a task predicate and a target object, the task text is determined to include several task steps, and a step sequence is formed according to the task clauses.

[0064] When a connecting component connects only a number of entities, attributes, source objects, or modifiers, segmentation is not performed based on that connecting component.

[0065] When there is no connecting component to link different task clauses, the task text as a whole is treated as a single task segment.

[0066] It is understandable that the connecting component itself cannot directly indicate that the task text consists of multiple task steps. Therefore, by combining whether there are task predicates and target objects on both sides of the connecting component to determine the task steps, we can avoid incorrectly segmenting parallel entities or parallel attributes into different task steps.

[0067] After determining the task stages, the entity set, time expression, and source referral structure for each stage are determined.

[0068] Specifically, the entity set can be obtained through named entity recognition, including organizations, people, places, products, technical objects, and other entities that can be used as task processing objects or retrieval objects.

[0069] Specifically, time expressions include absolute time references and relative time references. An absolute time reference is a time expression that can directly determine a calendar point in time or a time interval;

[0070] The relative time reference is an expression that requires determining the specific calendar time based on the task reception time.

[0071] Specifically, the source referencing structure is a language structure in the task text used to limit the source of knowledge for solving the task.

[0072] In this embodiment, a knowledge source directory can be established. This directory records the knowledge sources that the agent instance can access, along with their corresponding source identifiers, access interfaces, and access permissions. After identifying the referencing object, the actual accessible knowledge sources can be determined based on the correspondence between the referencing object and the knowledge source directory.

[0073] It should be noted that the above-mentioned language structure parsing can be accomplished by existing natural language processing models, text parsing functions in large language models, or other text processing components that can output the corresponding language structure. The improvement focus of this invention is not on specific named entity recognition models or syntactic parsing models, but on using the above-mentioned parsing results to further form the retrieval requirements corresponding to the task.

[0074] Please see Figure 3 As shown, it is a flowchart of the retrieval requirement cascading discrimination process in an embodiment of the present invention.

[0075] In this embodiment, the necessity of retrieval, source constraints, timeliness constraints, and sequential constraints are determined in sequence according to the elements of retrieval requirements.

[0076] Based on the correspondence between the target results required by the current task stage and the existing information in the task text, determine whether the current task requires external knowledge acquisition.

[0077] Specifically, when the task text itself already contains the information required to complete the current task, and the task objective only requires rewriting, summarizing, organizing, or formatting the existing information, it can be determined that the current task does not require external knowledge acquisition.

[0078] When the task objective requires obtaining facts, attributes, states, relationships, or corresponding evidence not provided in the task text, it can be determined that the current task has an external knowledge acquisition requirement.

[0079] The necessity of retrieval is determined when at least one task stage requires external knowledge acquisition, or when the task text clearly contains a source referencing structure.

[0080] When the task text lacks a source referencing structure and there is no external knowledge acquisition requirement in any task stage, the necessity of retrieval is deemed invalid.

[0081] When the necessity of retrieval is not met, the agent instance can be made to disable the external retrieval function and complete the task directly based on the task text and the agent's existing context.

[0082] Understandably, the existence of an entity cannot be used as the sole basis for determining whether to conduct a search. Instead, the necessity of a search can be determined by whether the task objective requires information beyond the task text, thus avoiding invalid searches.

[0083] When the necessity of retrieval is met, source constraints are determined based on the existence of a source referral structure.

[0084] When a source referral structure exists, the source constraint is determined to be valid, and the source of the target knowledge is determined based on the referrer in the source referral structure.

[0085] When the source referral structure does not exist, the source constraint is determined to be invalid, and candidate knowledge sources can be determined from the knowledge sources that the current agent instance has access to.

[0086] Specifically, the candidate knowledge sources in this embodiment are not all knowledge in an unlimited range, but rather searchable knowledge sources for which the current agent instance has already been configured with access permissions in the actual operating environment.

[0087] Determine the time constraint based on whether the time expression specifies a time limit for the formation of the information to be retrieved.

[0088] When a time expression specifies the occurrence time, publication time, generation time, validity period, or expiration time of the information to be retrieved, the timeliness constraint is determined to be valid.

[0089] When the time expression is only used as background for task description and does not limit the information to be retrieved, or when there is no corresponding time expression, the time constraint is deemed invalid.

[0090] When the time constraint is met, the corresponding time limit condition is formed based on the time expression.

[0091] For absolute time references, they can be directly converted to the corresponding calendar points or time ranges;

[0092] For relative time references, the time of task reception can be used as the time resolution benchmark, and it can be converted into the corresponding calendar point of time or time range.

[0093] It is understandable that whether a time constraint holds depends on whether the time expression actually restricts the information to be retrieved, rather than solely on whether the time expression is absolute or relative time.

[0094] The serial constraints are determined based on whether subsequent steps in the process sequence use the output object of the preceding step.

[0095] Specifically, the output objects of the preceding stages can be entities, entity attributes, entity relationships, analysis results, or structured conclusions formed by the preceding task stages.

[0096] When a subsequent step uses an object produced by a previous step through direct repetition, pronoun reference, object reference, or semantic continuation, the continuation constraint is deemed to be valid.

[0097] When there is no output succession relationship between different task stages, or when the task text only includes a single task stage, the chain constraint is deemed invalid.

[0098] When the sequential constraint is met, the output object generated in the preceding step is used as the context information or retrieval condition for the subsequent step.

[0099] When the sequential constraint is not met, each task stage is executed independently according to its corresponding retrieval requirements.

[0100] It should be noted that the concatenation constraint is used to determine whether there is contextual connection between different task stages, and is not the same as the number of retrieval rounds within a single stage.

[0101] Even if there are no sequential constraints on the task, the current task stage can still perform one or more rounds of retrieval based on whether the search results are sufficient.

[0102] In this embodiment, a corresponding retrieval strategy specification is generated based on the fulfillment status of retrieval necessity, source constraints, timeliness constraints, and serial constraints.

[0103] Specifically, the retrieval strategy specification includes at least the knowledge source object, retrieval triggering conditions, retrieval execution mode, and verification benchmark, and may further include time limit conditions and retrieval stopping conditions.

[0104] Search necessity is used to determine whether to enable searching and whether to initiate the first round of searching;

[0105] Source constraints are used to determine the scope of knowledge sources corresponding to the retrieval;

[0106] Time constraints are used to determine the time-limited conditions corresponding to the retrieved evidence;

[0107] Serial constraints are used to determine whether output transfer occurs between task stages.

[0108] When the necessity of retrieval is met, the content to be retrieved can be formed based on the task objectives corresponding to the current stage.

[0109] Specifically, the content to be retrieved may include the target entity to be identified, the target entity attributes, the target state, the target relationship, or supporting evidence required to complete the task.

[0110] When source constraints exist, the corresponding knowledge source is added to the search restrictions.

[0111] When time constraints exist, the corresponding time condition will be added to the search restrictions.

[0112] When a series constraint exists, the output object of the previous stage is added to the retrieval context of the current stage.

[0113] In this embodiment, after the agent instance initiates the first round of retrieval, it determines whether to continue the retrieval based on the supplementary information provided by the retrieval results for the current content to be retrieved.

[0114] Specifically, a set of elements to be retrieved and a set of elements supported by evidence can be established.

[0115] After each round of retrieval, it is determined whether the newly added retrieval fragments provide corresponding evidence for previously unsupported elements to be retrieved, and the set of elements that have been supported by evidence is updated accordingly.

[0116] When new search results can supplement previously unsupported search content, the next round of search can be formed based on the unsupported content.

[0117] If the current round of retrieval does not add any new supported content and does not form any new evidentiary relationships that can continue to point to the remaining content to be retrieved, the current stage of retrieval can be stopped.

[0118] Therefore, the search stop status is determined by the information supplementation status during the search process, rather than requiring a fixed number of search rounds.

[0119] Specifically, the resulting retrieval strategy specifications are written into the retrieval control configuration corresponding to the agent instance, enabling the agent instance to perform knowledge source selection, retrieval initiation, time limit, task acceptance, and retrieval cessation according to the retrieval strategy specifications during the runtime phase.

[0120] In one possible implementation, the retrieval strategy specification can be converted into structured configuration data, which records the knowledge source identifier, retrieval activation status, time limit information, stage acceptance status, and retrieval termination conditions, and establishes a correspondence between the corresponding structured configuration and the retrieval interface and context management interface of the agent instance.

[0121] It should be noted that the structured configuration format is only one specific implementation method and is not intended to limit the retrieval strategy specifications to adopt a specific data structure.

[0122] Please see Figure 4 As shown, it is a flowchart of the intelligent agent instance verification and retrieval strategy adjustment process in an embodiment of the present invention.

[0123] In this embodiment, the corresponding verification benchmark is determined according to the retrieval requirements.

[0124] The verification benchmark includes at least the generation result verification benchmark, and can also add corresponding constraint verification benchmarks according to the establishment status of source constraints, time constraints and series constraints.

[0125] Specifically, the generated result verification benchmark is used to determine whether the generated result of the agent instance is consistent with the reference result corresponding to the benchmark task, and whether the evidence cited in the generated result can support the corresponding result.

[0126] When the source constraint is met, a source consistency verification benchmark is added to determine whether the evidence used by the agent to generate the result comes from the knowledge source required by the task.

[0127] When the time limit constraint is met, a time limit consistency verification benchmark is added to determine whether the time status corresponding to the evidence used meets the task time requirements.

[0128] When the serial constraint is met, a consistency verification benchmark is added to determine whether subsequent steps actually use the output objects of the preceding steps.

[0129] Specifically, the verification benchmark is used to represent the technical dimensions that need to be verified, and the benchmark set is the set of task samples used to perform the corresponding verification.

[0130] The benchmark samples in the benchmark set may include the benchmark task text, the source requirements, time requirements or link succession relationships corresponding to the task, as well as the corresponding annotation baselines and reference evidence.

[0131] Specifically, the baseline is a reference result determined in advance based on the benchmark task and reference evidence, and may include at least one of the target entity, the corresponding attributes, state, relationship or task conclusion.

[0132] In this embodiment, the generation results obtained by the intelligent agent instance in processing the corresponding benchmark task are compared with the labeled baseline for consistency.

[0133] For task results that can be represented in a structured way, the target entities, attributes, relationships, states, or conclusion objects in the generated results can be extracted and compared with the corresponding content in the labeled baseline.

[0134] At the same time, it is determined whether the evidence cited in the generated results can support the corresponding results.

[0135] When both the generated result verification and the constraint verification corresponding to the current task pass, the current agent instance is determined to meet the deployment requirements.

[0136] When there are dimensions that fail verification, the corresponding retrieval strategy adjustment targets are determined based on the dimensions that fail verification.

[0137] Specifically, when the source consistency verification fails, the knowledge source object can be adjusted or the search scope can be restricted;

[0138] If the timeliness consistency verification fails, the time range corresponding to the task can be redefined, and evidence can be re-filtered or retrieved based on the time range.

[0139] When the consistency verification fails, the actual output object of the previous step can be added back to the context of the subsequent step, and the output object can be used to form new subsequent search conditions.

[0140] When the generated result fails verification, the content to be retrieved can be redefined based on the target object or target relationship that is not supported by sufficient evidence.

[0141] The agent instance is regenerated based on the adjusted retrieval strategy specification and validated again.

[0142] In this embodiment, the improvement of the verification result can be determined based on the status of the failed verification dimensions before and after the adjustment.

[0143] Specifically, when the adjusted agent instance eliminates at least one previously unvalidated dimension and does not generate any new unvalidated dimensions, it can be determined that the validation status has been improved and the adjusted retrieval strategy specification is retained.

[0144] If the original failed validation dimensions are not eliminated after adjustment, or if new failed validation dimensions are generated, it can be determined that the validation status has not improved. The adjustment result should be discontinued, and the retrieval strategy specification retained before the adjustment should be restored.

[0145] It is understandable that source verification, timeliness verification, and sequential verification correspond to knowledge source, time limit, and contextual continuation strategy, respectively. Therefore, when a certain verification dimension fails, the retrieval strategy that actually caused the verification status can be modified in a targeted manner without having to reset the entire retrieval behavior.

[0146] This embodiment analyzes the objective language structure of the task text, forms retrieval requirements based on the actual information needs of the task, including retrieval necessity, source, time, and link connection, and then automatically forms an intelligent agent retrieval strategy based on the retrieval requirements. The corresponding retrieval strategy is then corrected using the verification status feedback corresponding to the retrieval requirements, thus realizing the closed-loop generation of the autonomous retrieval enhanced intelligent agent from task analysis, retrieval strategy generation to instance verification.

[0147] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A method for generating an autonomous retrieval augmented agent based on a large language model, characterized in that, include: An intelligent agent is constructed based on a large language model, and task text is obtained. The language structure of the task text is parsed to determine the task structure and corresponding retrieval requirements. Based on the search requirement elements, the validity status of search necessity, source constraint, timeliness constraint and series constraint is determined in sequence to determine the search requirement; Based on the search requirements, a search strategy specification is generated, and the search strategy specification is injected into the agent instance, wherein, The retrieval strategy specification includes at least the knowledge source object, retrieval triggering conditions, retrieval execution mode, and verification benchmark; The generation result of the agent instance is verified according to the verification benchmark. If the verification passes, the agent instance is determined to be an agent instance to be deployed. If the verification fails, the retrieval strategy specification is adjusted according to the verification dimension that failed and the agent instance is regenerated.

2. The method for generating an autonomous retrieval augmented agent based on a large language model according to claim 1, characterized in that, The language structure parsing of the task text includes: Identify the task predicates, connecting components, entities, temporal expressions, and source referencing structures in the task text, and determine the target object corresponding to each task predicate.

3. The method for generating an autonomous retrieval augmented agent based on a large language model according to claim 2, characterized in that, Determine the task structure and corresponding retrieval requirements, including: Based on the relationship between the task predicates and target objects connected by the connecting components, determine whether the task text includes several task steps; When a process involves several task steps, a sequence of steps is formed, and the retrieval requirements for each step are determined. When not including several task steps, the task text is used as a single step to determine the corresponding retrieval requirement elements.

4. The method for generating an autonomous retrieval augmented agent based on a large language model according to claim 3, characterized in that, The determination of the necessity of retrieval includes: Based on the correspondence between the task objectives of each stage and the existing information in the task text, it is determined whether the corresponding task has an external knowledge acquisition requirement, so as to determine whether the necessity of the retrieval is valid.

5. The method for generating an autonomous retrieval augmented agent based on a large language model according to claim 4, characterized in that, The determination of the validity of the source constraint includes: Determine whether the source constraint is valid based on the source referral structure and its referral object; When the source constraint is met, the corresponding knowledge source object is determined based on the referencing object; When the source constraint is not met, candidate knowledge source objects are determined from the knowledge sources accessible to the agent instance.

6. The method for generating an autonomous retrieval augmented agent based on a large language model according to claim 5, characterized in that, The determination of the validity of the time limit constraint includes: The validity of the time constraint is determined based on the limiting relationship between the time expression and the information to be retrieved; When the time constraint is met, the corresponding time limit condition is determined according to the time expression.

7. The method for generating an autonomous retrieval augmented agent based on a large language model according to claim 6, characterized in that, The determination of the validity of the serial constraint includes: The validity of the serial constraint is determined based on the reference relationship between the output objects of subsequent steps and the preceding steps in the process sequence. When the serial constraint is met, the object produced by the preceding step is used for retrieval in the subsequent step; When the series constraint is not met, each step performs the search according to the corresponding search requirements.

8. The method for generating an autonomous retrieval augmented agent based on a large language model according to claim 7, characterized in that, When the necessity of the search is met, a search is initiated based on the search requirement elements corresponding to the current stage. Based on the supplementary status of newly added search results during the continuous search process, determine whether to continue the search.

9. The method for generating an autonomous retrieval augmented agent based on a large language model according to claim 8, characterized in that, The verification benchmark includes the generation result verification benchmark and the constraint verification benchmark determined according to the validity status of the source constraint, time constraint and series constraint; The verification status of the agent instance is determined based on the generated result verification benchmark and the corresponding constraint verification benchmark.

10. The method for generating an autonomous retrieval augmented agent based on a large language model according to claim 9, characterized in that, The regeneration of the intelligent agent includes: The instance compares the generated result of the agent instance with the labeled baseline corresponding to the verification benchmark for consistency. When there are dimensions that fail verification, the corresponding retrieval strategy adjustment object is determined according to the dimensions that fail verification, and the agent instance is regenerated based on the adjusted retrieval strategy specification. Whether to retain the adjusted retrieval strategy specification is determined based on the changes in the verification status of agent instances before and after the adjustment.

Citation Information

Patent Citations

  • Retrieval enhancement generation method based on intelligent agent and related device

    CN119903174A