Self-routing and self-filtering retrieval enhancement generation methods, devices, media, and products

CN120706567BActive Publication Date: 2026-09-01TSINGHUA UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510853983.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2026-09-01
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

[0003]然而,单一数据源往往难以支持大模型学习到足够的领域特定知识,以致大模型难以正确合理地完成给定任务,且传统的检索增强生成方案仅依据向量相似度从数据源中提取数据条目,这种词义匹配的模糊搜索常常会引入与给定任务不相关的数据条目,从而对大模型造成干扰,由此导致大模型的任务完成效果不佳

Benefits of technology

[0017]本申请实施例的第五方面,提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如第一方面所述的自路由与自筛选检索增强生成方法的步骤。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706567B_ABST
    Figure CN120706567B_ABST
Patent Text Reader

Abstract

This application discloses a self-routing and self-filtering retrieval enhancement generation method, device, medium, and product, which can improve the task completion performance of large models. The method utilizes an extended finite state automaton to automatically execute the retrieval enhancement generation scheme. During the execution of the retrieval enhancement generation scheme, the extended finite state automaton is designed to leverage the semantic understanding capabilities of the large model to achieve self-routing and self-filtering, thereby reducing the information loss and interference from invalid information encountered by the large model in subsequent processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a method, device, medium, and product for generating self-routing and self-filtering retrieval enhancements. Background Technology

[0002] Retrieval-Augmented Generation (RAG) technology is primarily used to drive large models to complete given tasks based on domain-specific knowledge, such as performing repetitive manual tasks. Traditional RAG schemes mainly rely on vector similarity to extract data entries from a single data source, then call upon a large model to learn domain-specific knowledge from the extracted data entries to complete the given task.

[0003] However, a single data source is often insufficient to support large models in learning enough domain-specific knowledge, making it difficult for them to complete the given task correctly and reasonably. Furthermore, traditional retrieval enhancement generation schemes extract data entries from the data source based solely on vector similarity. This fuzzy search based on semantic matching often introduces data entries that are irrelevant to the given task, thereby interfering with the large model and resulting in poor task completion performance. Summary of the Invention

[0004] The purpose of this application is to provide a self-routing and self-filtering retrieval enhancement generation method, device, medium, and product that can use multiple data sources during the retrieval enhancement generation process and perform reasonable data entry filtering on the data sources, thereby improving the task completion effect of large models.

[0005] In a first aspect, embodiments of this application provide a self-routing and self-filtering retrieval enhancement generation method, applied to a preset extended finite state automaton, the method comprising:

[0006] The extended finite state automaton enters the initial state and performs initialization operations;

[0007] When the extended finite state automaton detects that it meets the first or second condition, it enters the search state to perform self-routing. It calls the large model to determine whether data search is needed based on the task description of the task to be completed and the currently filtered data entries. If it is determined that data search is needed, it determines the data source to be searched. The first condition includes: the extended finite state automaton completes the initialization operation. The second condition includes: the extended finite state automaton completes the filtering of data entries of the previously searched data source.

[0008] When the extended finite state automaton detects that it meets the third condition, it enters the filtering state to perform self-filtering. It calls the large model to filter the data entries of the data source to be searched by analyzing the semantic relevance between the task description of the task to be completed and each data entry in the data source to be searched. The third condition includes: the extended finite state automaton determines the data source to be searched.

[0009] When the extended finite state automaton detects that it meets the fourth condition, it enters the task-complete state and calls the large model to perform the set operation associated with the retrieval enhancement generation based on the currently filtered data entries in order to complete the task to be completed. The fourth condition includes: the extended finite state automaton determines that data search is not required.

[0010] A second aspect of this application provides a self-routing and self-filtering retrieval enhancement generation apparatus, applied to a preset extended finite state automaton, the apparatus comprising:

[0011] An initialization module is used to control the extended finite state automaton to enter the initial state and perform initialization operations.

[0012] The search module is used to control the extended finite state automaton to enter a search state for self-routing when it is detected that the extended finite state automaton meets a first condition or a second condition. The module calls the large model to determine whether data search is needed based on the task description of the task to be completed and the currently filtered data entries. If it is determined that data search is needed, the module determines the data source to be searched. The first condition includes: the extended finite state automaton completes the initialization operation. The second condition includes: the extended finite state automaton completes the filtering of data entries of the previously searched data source.

[0013] The filtering module is used to control the extended finite state automaton to enter the filtering state for self-filtering when the extended finite state automaton is detected to meet the third condition. The module calls the large model to filter the data entries of the data source to be searched by analyzing the semantic relevance between the task description of the task to be completed and each data entry in the data source to be searched. The third condition includes: the extended finite state automaton determines the data source to be searched.

[0014] The execution module is used to control the extended finite state automaton to enter a task-complete state when it detects that the extended finite state automaton meets the fourth condition, and to call the large model to perform the set operation associated with the retrieval enhancement generation based on the currently filtered data entries in order to complete the task to be completed. The fourth condition includes: the extended finite state automaton determines that data search is not required.

[0015] A third aspect of this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the self-routing and self-filtering retrieval enhancement generation method as described in the first aspect.

[0016] A fourth aspect of this application provides a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the self-routing and self-filtering retrieval enhancement generation method as described in the first aspect.

[0017] A fifth aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the self-routing and self-filtering retrieval enhancement generation method as described in the first aspect.

[0018] As can be seen from the above technical solution, this application designs an extended finite state automaton based on whether the conditions are met as the basis for state transition. This extended finite state automaton is used to automatically execute the retrieval enhancement generation scheme. Furthermore, during the execution of the retrieval enhancement generation scheme, this application designs an extended finite state automaton that utilizes the semantic understanding capability of the large model to achieve self-routing and self-filtering. Self-routing allows the large model to rationally select the data sources needed to complete the task, thus realizing a retrieval enhancement generation scheme that relies on multiple data sources. This allows the large model to obtain sufficient data source assistance while avoiding the introduction of irrelevant data sources that could interfere with it. Self-filtering allows the large model to remove irrelevant data entries, thus avoiding the introduction of irrelevant data entries that could interfere with it. This effectively reduces the information loss and interference from invalid information experienced by the large model in subsequent processing, thereby significantly improving the task completion effect. Attached Figure Description

[0019] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1A flowchart illustrating the implementation of a self-routing and self-filtering retrieval enhancement generation method provided in this application embodiment;

[0021] Figure 2 A schematic diagram of an extended finite state automaton provided for an embodiment of this application;

[0022] Figure 3 A schematic diagram illustrating the implementation process of a self-routing and self-filtering retrieval enhancement generation method provided in an embodiment of this application;

[0023] Figure 4 A schematic diagram of a self-routing and self-filtering retrieval enhancement generation device provided in an embodiment of this application;

[0024] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0026] As enterprises grow and data scales up, the number of complex and tedious tasks in modern enterprise management also increases. However, with the development of large language models, there are better solutions for these tasks, namely, using large language models to complete some repetitive tasks that rely on manual labor. Considering the limitations of large language model training, domain-specific knowledge is often not included in the large model. Therefore, retrieval augmentation and generation techniques are needed to drive the large model to complete the given task based on domain-specific knowledge.

[0027] However, the researchers in this application, through analyzing real-world application scenarios of retrieval augmentation generation, found that completing a task typically requires the assistance of multiple data sources. For example, when penalizing employee misconduct, it is necessary not only to process video footage of the violation and consider the specific rules and regulations breached, but also to consider past violations and refer to penalties for similar past misconduct. Therefore, traditional retrieval augmentation generation schemes using a single data source struggle to support large models in learning sufficient domain-specific knowledge, making it difficult for them to correctly and reasonably complete the given task, resulting in poor task performance.

[0028] Building upon this foundation, the researchers in this application discovered through analysis that if multiple data sources are to be introduced into a retrieval enhancement scheme, the key issue of how to select the appropriate data sources needs to be addressed. Specifically, if all data sources are used, the computational overhead increases significantly, and the introduction of additional invalid data sources may not necessarily improve the performance of the large model in completing the task, and may even interfere with the completion of the large model's task. If too few data sources are used, the knowledge that the large model can rely on to complete the task will decrease, leading to difficulties in the large model completing the task correctly and reasonably, or even causing it to misperform.

[0029] Furthermore, traditional retrieval enhancement generation schemes extract results solely based on vector similarity. This fuzzy search based on semantic matching may still introduce irrelevant data entries, interfering with the completion of large model tasks and further affecting the performance of large models.

[0030] Based on the above analysis, and addressing the issue of poor task completion performance of large models in related technologies, this application provides a self-routing and self-filtering retrieval enhancement generation method, device, medium, and product. Based on a preset extended finite state automaton, the large model can autonomously select the required data source and filter out relevant data entries from the data source, thereby improving the task completion performance of the large model.

[0031] See Figure 1 The diagram shown is an implementation flowchart of a self-routing and self-filtering retrieval enhancement generation method provided in this application embodiment. This method is applied to a preset extended finite state automaton and may include the following steps:

[0032] Step S101: The extended finite state automaton enters the initial state and performs initialization operations.

[0033] In practical implementation, when a specific task needs to be completed, the extended finite state automaton first enters the initial state to perform initialization operations. These initialization operations are mainly used to set the initial values ​​of variables such as the content to be searched, for example, initializing the content to be searched as the user's question.

[0034] It should be noted that a finite state machine is a mathematical computational model representing a finite number of states and the transitions and actions between these states, with the state transition condition being the input character. This application uses the satisfaction of the condition as the basis for state transitions, and accordingly redesigns the finite number of states associated with the finite state machine and the transitions and actions between these states, thereby designing an extended finite state automaton. This automaton enables the automatic execution of retrieval-enhanced generation schemes and allows large models to autonomously select the required data sources and filter relevant data entries from them, thus providing a technical foundation for the introduction of multiple data sources.

[0035] Step S102: When the extended finite state automaton detects that it meets the first condition or the second condition, it enters the search state to perform self-routing. It calls the large model to determine whether data search is needed based on the task description of the task to be completed and the currently filtered data entries. If it is determined that data search is needed, it determines the data source to be searched. The first condition includes: the extended finite state automaton completes the initialization operation. The second condition includes: the extended finite state automaton completes the filtering of data entries of the previously searched data source.

[0036] In practical implementation, when the initialization operation is completed (i.e., the first condition is met) or the data entries are filtered (i.e., the second condition is met), the extended finite state automaton enters the search state to perform self-routing. That is, it calls the large model to determine whether data search is needed based on the task description of the task to be completed and the currently filtered data entries (e.g., whether the number of filtered data entries meets the task requirements such as the number of data entries or modality set in the task description). If it is determined that data search is needed, it selects the data source to search.

[0037] Step S103: When the extended finite state automaton detects that it meets the third condition, it enters the filtering state to perform self-filtering. It calls the large model to filter the data entries of the data source to be searched by analyzing the semantic correlation between the task description of the task to be completed and each data entry in the data source to be searched. The third condition includes: the extended finite state automaton determines the data source to be searched.

[0038] In practical implementation, when the extended finite state automaton completes the search for data sources (i.e., the third condition is met), it enters the filtering state to perform self-filtering. That is, it calls the large model to analyze the semantic relevance between the task description and data entries of the task to be completed, thereby filtering out data entries that are helpful to the task, and returns to the search state when the filtering of data entries is completed.

[0039] It's important to note that the large model can understand the semantics of both the task description (such as the description of task requirements) and each data entry. Therefore, based on the task description, the large model can determine whether a data entry contributes to task completion, and then filter out helpful data entries from the data source, thus achieving self-filtering. For example, if the task description states that the violation is "being late for work," word vector similarity matching would yield two data entries: "being late for work" and "being late for a meeting." However, if the large model is used to filter these data entries, its semantic understanding capabilities can determine that "being late for a meeting" is an invalid entry and remove it, thereby accurately filtering out useful data entries.

[0040] Step S104: When the extended finite state automaton detects that it meets the fourth condition, it enters the task-complete state, calls the large model to perform the set operation associated with the retrieval enhancement generation based on the currently filtered data entries, so as to complete the task to be completed. The fourth condition includes: the extended finite state automaton determines that data search is not required.

[0041] In practical implementation, when the data search is completed (i.e., the fourth condition is met), the extended finite state automaton enters the task-complete state to complete the task to be completed. That is, it calls the large model to learn domain-specific knowledge based on the currently selected data items, and then performs the set operations associated with retrieval enhancement generation, such as the large model answering the user's question, or completing other specific tasks associated with retrieval enhancement generation.

[0042] It should be noted that the purpose of the extended finite state automaton is to call upon a large model (i.e., to utilize the semantic understanding capabilities of the large model, which has no special requirements and can flexibly use methods such as expert collaboration and speculative sampling) to search all the content that needs to be searched, and to filter out useful information from the searched content as the basis for completing downstream tasks. Therefore, the "task-completed state" is a relatively broad concept, which can refer to the large model being able to answer the user's question relatively accurately based on the currently filtered data items, or being able to complete certain specific other tasks (i.e., tasks) well.

[0043] As can be seen from the above technical solution, this application designs an extended finite state automaton based on whether the conditions are met as the basis for state transition. This extended finite state automaton is used to automatically execute the retrieval enhancement generation scheme. Furthermore, during the execution of the retrieval enhancement generation scheme, this application designs an extended finite state automaton that utilizes the semantic understanding capability of the large model to achieve self-routing and self-filtering. Self-routing allows the large model to rationally select the data sources needed to complete the task, thus realizing a retrieval enhancement generation scheme that relies on multiple data sources. This allows the large model to obtain sufficient data source assistance while avoiding the introduction of irrelevant data sources that could interfere with it. Self-filtering allows the large model to remove irrelevant data entries, thus avoiding the introduction of irrelevant data entries that could interfere with it. This effectively reduces the information loss and interference from invalid information experienced by the large model in subsequent processing, thereby significantly improving the task completion effect.

[0044] In an optional embodiment, the invocation of the large model determines whether a data search is needed based on the task description of the task to be completed and the currently filtered data entries, including:

[0045] Each preset data source that has not been filtered by data entries is identified as a candidate data source;

[0046] The large model is invoked to perform semantic analysis on the task description and the currently selected data entries to detect whether there is a target semantic description in the task description and the currently selected data entries that is related to the overall description semantics of at least one candidate data source;

[0047] The large model is invoked to determine whether a data search is needed based on the detection results of whether the target semantic description exists in the task description and the currently filtered data entries.

[0048] In this embodiment, the large model, based on its own semantic understanding capabilities, determines whether a data search is needed based on whether there is a target semantic description related to the overall semantic description of at least one candidate data source among the task description (which contains descriptive information of task requirements) and the currently filtered data entries, so as to achieve comprehensive searching of different data sources.

[0049] Taking the task description as employee violation punishment, and the candidate data sources as employee management regulations manual data source, historical violation record reference data source, employee violation record data source and tender document data source, and the corresponding overall descriptions as employee management regulations manual, historical violation record reference, employee violation record and tender document, the extended finite state automatic machine calls the large model to perform self-routing for the first time, selects the employee management regulations manual data source as the data source to be searched, and then filters out the punishment items related to the violation from it.

[0050] Then, the extended finite state automaton calls the large model to perform self-routing again, performing semantic analysis on the task description and the currently filtered data entries (i.e., penalty entries related to violations) to detect whether there is a target semantic description in the task description and the currently filtered data entries that is related to the overall descriptive semantics of at least one candidate data source. For example, if there is a target semantic description in the task description and / or the currently filtered data entries that is related to the overall descriptive semantics of employee violation records (such as a semantic description of cumulative violations), it can be determined that a data search is needed, and the candidate data source associated with the target semantic description (i.e., the employee violation record data source) is taken as the data source to be searched, so that the employee's past violation records can be filtered out from them through self-filtering. Thus, the self-routing achieves a comprehensive search of all data sources.

[0051] Optionally, the data entries in the preset data source are determined through the following steps:

[0052] The data documents in the preset data source are divided using a parent-child document block division method;

[0053] The parent document blocks that are divided are identified as data entries, and the child document blocks associated with the parent document blocks are vector-embedded and indexed to support the large model in performing semantic analysis on the data entries.

[0054] In this embodiment, each data document in the preset data source is divided into parent-child document blocks. Then, the child document blocks are indexed by vector embedding, and the parent document block is used as the result of the data source search (i.e., the filtered data entries). This allows the search of the parent document block to be realized based on the semantic features of the child document block (which is part of the content of the parent document block), thereby balancing search accuracy and contextual content sufficiency.

[0055] In an optional embodiment, before invoking the large model to filter data entries in the currently searched data source by analyzing the semantic relevance between the task description of the task to be completed and each data entry in the currently searched data source, the method further includes:

[0056] Based on word vector similarity, the task description of the task to be completed is matched with each data entry in the current data source to be searched;

[0057] After the rearrangement model is invoked to rearrange each data entry matched by the task description, the top k data entries are extracted so that the large model can filter the extracted k data entries, where k is a positive integer.

[0058] In practice, from the data source that needs to be searched, each data entry whose word vector similarity with the task description meets the similarity condition (e.g., is higher than the similarity threshold) is selected, and these data entries are used as the data entries matched by the task description.

[0059] Then, a reordering model (such as a Cross-Encoder architecture model) is invoked to reorder the data entries matched by the task description. Specifically, the reordering model analyzes the relevance between the task description and the data entries searched based on word vector similarity to score the relevance. Then, based on the relevance scores from high to low, the data entries are reordered, thereby achieving the reordering of the data entries matched by the task description.

[0060] Subsequently, the top k data entries (the value of which is determined according to actual needs) are extracted from the rearranged data entries, that is, a portion of the data entries with higher relevance scores are selected; when performing self-filtering later, the large model can be called to further filter these data entries.

[0061] In this embodiment, by further introducing a rearrangement model, the semantic evaluation capability of data source search can be improved, thereby enabling more accurate filtering of relevant data entries that are helpful to the task.

[0062] In one alternative embodiment, the initialization operation includes at least one of the following:

[0063] Item A-1: ​​Initialize the large model (such as a multimodal large model) to make it usable;

[0064] Item A-2: Receive the task description of the task to be completed input by the user, or call the large model to generate a task description based on the task type of the task to be completed;

[0065] Item A-3: Initialize the data entry list to be empty. The data entry list is used to store the currently filtered data entries.

[0066] Item A-4: Based on the received data source adjustment instructions from the user, add or delete preset data sources. The preset data sources are used by the large model to determine the data source currently needed for the search. Different preset data sources contain data entries of the same or different modalities.

[0067] Item A-5: Initialize the candidate data source list to record all preset data sources as candidate data sources. The candidate data source list is used to support the large model in determining the data source that needs to be searched.

[0068] In this embodiment, for item A-2, the user can manually input a task description, or input task requirements (to help determine the task type) or directly input the task type. The large model can automatically generate a task description after knowing the task type. For example, for the task type of penalty, the large model can be used to generate a task description or the task description can be manually formatted. The task description can be "someone committed a certain violation at a certain time and place".

[0069] Regarding item A-4, this application, in addition to implementing a retrieval enhancement generation scheme using multiple data sources, also supports users to dynamically add and delete these multiple data sources; and these multiple data sources can not only contain text-related data entries, but also data entries related to other modalities such as communication (e.g., video), perception (e.g., sensors), etc. This can fully utilize the multimodal data processing capabilities of large models, enabling large models to use data entries from multiple data sources (such as data entries from text, video, sensor and other related data sources) for retrieval enhancement generation, thereby helping modern enterprises to manage complex intelligent systems.

[0070] For item A-5, initialize the candidate data source list to record all preset data sources (i.e., all usable data sources) as candidate data sources. This allows the large model to select the data source to be searched from all preset data sources when performing self-routing for the first time, and remove the data source to be searched from the candidate data source list. In subsequent self-routing, the remaining preset data sources (i.e., candidate data sources) that have not been filtered by data entries can be quickly determined based on the candidate data source list, and the data source to be searched can be selected from them. This can effectively avoid duplicate searches and omissions of preset data sources.

[0071] Optionally, the candidate data source list is formed by storing an overall description of a preset data source to record the preset data source as a candidate data source;

[0072] The overall description of the preset data source is determined through the following steps:

[0073] The large model is invoked to generate a complete description of the preset data source;

[0074] Alternatively, it can receive a general description of the preset data source from user input.

[0075] In this embodiment, for each preset data source, a comprehensive description of the preset data source is generated using a large model, or a summary of the preset data source is provided manually, thereby obtaining a comprehensive description of each preset data source (which semantically represents the overall content of the data entries stored in the data source). It is understood that storing the comprehensive descriptions of each preset data source as a candidate data source through a candidate data source list facilitates the subsequent differentiation of different preset data sources by the large model, and allows the large model to quickly select a suitable data source based on the comprehensive descriptions stored in the candidate data source list.

[0076] In an optional embodiment, see Figure 2 The diagram shown is of an extended finite state automaton, and the state set of the extended finite state automaton is shown in the diagram. initial state And the final state In the case of the extended finite state automaton, the state transition function It is expressed as follows:

[0077]

[0078]

[0079]

[0080]

[0081] In this embodiment, the extended finite state automaton, based on the aforementioned state transition function, can automatically call the large model to perform self-routing and self-filtering. This enables it to search all relevant data sources during the retrieval enhancement generation process and accurately filter out useful data entries. Consequently, the large model is not affected by missing or invalid information when processing subsequent tasks, thus enabling it to complete downstream tasks more effectively.

[0082] For example, see Figure 3 The diagram illustrates the implementation process of a self-routing and self-filtering retrieval enhancement generation method. This implementation process mainly includes the following steps:

[0083] Step 1: For N data sources, use the embedding model to build N vector databases and generate an overall description of each data source.

[0084] Step 2: Extend the finite state automaton to enter the initial state and perform initialization operations for the task to be completed (completing the task requires the cooperation of multiple data sources such as text, video, and sensors). For example, generate a task description for it, initialize the large model, the list of data entries, and the list of optional data sources (i.e., the list of candidate data sources).

[0085] Step 3: Extend the finite state automaton to enter the search state, and use the large model to make one judgment: "Given the task description and data entries, can the task be completed?" If yes, proceed to step 7; otherwise, proceed to step 4.

[0086] In this step, the input data for the large model can be represented as "Task description: XXX; Data items: XXX, XXX, XXX; Can this task be completed with these data items: YES / NO".

[0087] The large model then uses semantic analysis of the task description and data entries to determine whether the data is sufficient (i.e. whether the task can be completed well using the currently selected data entries). If the result is "YES", the condition of "data search completed" is met, and the extended finite state automaton enters the task-complete state; if the result is "NO", the extended finite state automaton remains in the search state.

[0088] Optionally, the large model can be a fine-tuned version of the large model for the judgment task to improve its ability to perform the task. Here, fine-tuning refers to retraining the large model using pre-prepared question-and-answer pairs or high-quality question-and-answer pairs used in practice, making it more suitable for the judgment task.

[0089] Step 4: Use the large model to make a single judgment: "Given the task description and a list of available data sources, which data source should be selected for searching?" Record the data source selected by the large model as... .

[0090] In this step, the input data for the large model can be represented as "Task description: XXX; Optional data source list: XXX data source contains XXX, XXX data source contains XXX; Which data source to select for search".

[0091] Alternatively, the large model here can be a fine-tuned version of the large model used for classification tasks to improve the large model's ability to perform classification tasks (i.e., select data sources).

[0092] Step 5: Extend the finite state automaton to enter the filtering state, and process the data source. The search is performed using word vector similarity matching and rearrangement to find words most similar to the task description. One data entry.

[0093] In this step, the extended finite automaton remains in the search state until the "search data source complete" condition is met (i.e., finding the most similar data to the task description). When there are 100 data entries, the process transitions to the filtering state.

[0094] Step 6: Extend the finite state automaton to enter the screening state, and use the large model to... Each data entry is processed The next step is to determine: "Given a task description and a data entry, does this data entry contribute to completing the task?" If it does, keep it; otherwise, discard the entry, and then select the remaining data. Add each data entry to the data entry list, and add the data source. Remove from the list of optional data sources and return to step 3.

[0095] In this step, the large model will perform multiple iterations, with the number of iterations equal to the number of data entries. The input data for each iteration can be represented as "Task description: XXX; Data entry: XXX; Does this data entry contribute to task completion: YES / NO"; If the large model answers YES, the data entry is retained; otherwise, it is deleted; finally, the retained data entries are added to the data entry list.

[0096] Alternatively, the large model here can be a finely tuned version of the large model used for the judgment task, in order to improve the large model's ability to perform the judgment task.

[0097] Step 7: Extend the finite state automaton to enter the task-complete state, and execute the set operation associated with the retrieval enhancement generation to complete the task to be completed.

[0098] Alternatively, the large model can be fine-tuned for the relevant specific task to improve its ability to perform such tasks.

[0099] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.

[0100] This application also provides a self-routing and self-filtering retrieval enhancement generation device, applied to a preset extended finite state automaton, such as... Figure 4 As shown, the device includes:

[0101] An initialization module is used to control the extended finite state automaton to enter the initial state and perform initialization operations.

[0102] The search module is used to control the extended finite state automaton to enter a search state for self-routing when it is detected that the extended finite state automaton meets a first condition or a second condition. The module calls the large model to determine whether data search is needed based on the task description of the task to be completed and the currently filtered data entries. If it is determined that data search is needed, the module determines the data source to be searched. The first condition includes: the extended finite state automaton completes the initialization operation. The second condition includes: the extended finite state automaton completes the filtering of data entries of the previously searched data source.

[0103] The filtering module is used to control the extended finite state automaton to enter the filtering state for self-filtering when the extended finite state automaton is detected to meet the third condition. The module calls the large model to filter the data entries of the data source to be searched by analyzing the semantic relevance between the task description of the task to be completed and each data entry in the data source to be searched. The third condition includes: the extended finite state automaton determines the data source to be searched.

[0104] The execution module is used to control the extended finite state automaton to enter a task-complete state when it detects that the extended finite state automaton meets the fourth condition, and to call the large model to perform the set operation associated with the retrieval enhancement generation based on the currently filtered data entries in order to complete the task to be completed. The fourth condition includes: the extended finite state automaton determines that data search is not required.

[0105] Optionally, the search module is further configured to perform the following steps:

[0106] Each preset data source that has not been filtered by data entries is identified as a candidate data source;

[0107] The large model is invoked to perform semantic analysis on the task description and the currently selected data entries to detect whether there is a target semantic description in the task description and the currently selected data entries that is related to the overall description semantics of at least one candidate data source;

[0108] The large model is invoked to determine whether a data search is needed based on the detection results of whether the target semantic description exists in the task description and the currently filtered data entries.

[0109] Optionally, the device further includes a data source processing module for performing the following steps:

[0110] The data documents in the preset data source are divided using a parent-child document block division method;

[0111] The parent document blocks that are divided are identified as data entries, and the child document blocks associated with the parent document blocks are vector-embedded and indexed to support the large model in performing semantic analysis on the data entries.

[0112] Optionally, the device further includes a data extraction module for performing the following steps:

[0113] Based on word vector similarity, the task description of the task to be completed is matched with each data entry in the current data source to be searched;

[0114] After the rearrangement model is invoked to rearrange each data entry matched by the task description, the top k data entries are extracted so that the large model can filter the extracted k data entries, where k is a positive integer.

[0115] Optionally, the initialization operation includes at least one of the following:

[0116] Initialize the large model to make it usable;

[0117] Receive the task description of the task to be completed from the user input, or call the large model to generate a task description based on the task type of the task to be completed;

[0118] The initial data entry list is empty; this data entry list is used to store the currently filtered data entries.

[0119] Based on the received data source adjustment instructions from the user, add or delete preset data sources. The preset data sources are used by the large model to determine the data source that needs to be searched. Different preset data sources contain data entries of the same or different modalities.

[0120] Initialize a candidate data source list to record all preset data sources as candidate data sources. This candidate data source list is used to support large models in determining the data source that needs to be searched.

[0121] Optionally, the candidate data source list is formed by storing an overall description of a preset data source to record the preset data source as a candidate data source;

[0122] The device further includes a description generation module, used to perform the following steps:

[0123] The large model is invoked to generate a complete description of the preset data source;

[0124] Alternatively, it can receive a general description of the preset data source from user input.

[0125] Optionally, in the state set of the extended finite state automaton initial state And the final state In the case of the extended finite state automaton, the state transition function It is expressed as follows:

[0126]

[0127]

[0128]

[0129]

[0130] As can be seen from the above technical solution, this application designs an extended finite state automaton based on whether the conditions are met as the basis for state transition. This extended finite state automaton is used to automatically execute the retrieval enhancement generation scheme. Furthermore, during the execution of the retrieval enhancement generation scheme, this application designs an extended finite state automaton that utilizes the semantic understanding capability of the large model to achieve self-routing and self-filtering. Self-routing allows the large model to rationally select the data sources needed to complete the task, thus realizing a retrieval enhancement generation scheme that relies on multiple data sources. This allows the large model to obtain sufficient data source assistance while avoiding the introduction of irrelevant data sources that could interfere with it. Self-filtering allows the large model to remove irrelevant data entries, thus avoiding the introduction of irrelevant data entries that could interfere with it. This effectively reduces the information loss and interference from invalid information experienced by the large model in subsequent processing, thereby significantly improving the task completion effect.

[0131] This application also provides an electronic device, see embodiments thereof. Figure 5 , Figure 5 This is a schematic diagram of the electronic device proposed in an embodiment of this application. Figure 5 As shown, the electronic device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus. The memory 110 stores a computer program that can run on the processor 120 to implement the steps in the self-routing and self-filtering retrieval enhancement generation method disclosed in the embodiments of this application.

[0132] This application also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the self-routing and self-filtering retrieval enhancement generation method disclosed in this application.

[0133] This application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the self-routing and self-filtering retrieval enhancement generation method disclosed in this application.

[0134] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0135] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0136] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, systems, devices, storage media, and program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0137] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0139] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0140] The above provides a detailed description of the self-routing and self-filtering retrieval enhancement generation method, device, medium, and product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A self-routing and self-filtering retrieval enhancement generation method, characterized in that, The method, applied to a pre-defined extended finite state automaton, includes: The extended finite state automaton enters the initial state and performs initialization operations; Upon detecting that it meets either the first or second condition, the extended finite state automaton enters a search state for self-routing. It calls the large model to determine whether a data search is needed based on the task description of the task to be completed and the currently filtered data entries. If a data search is determined to be needed, it identifies the data source to be searched. The first condition includes: the extended finite state automaton completes the initialization operation. The second condition includes: the extended finite state automaton completes the filtering of data entries from the previously searched data source. The data source includes text data sources and video data sources. When the extended finite state automaton detects that it meets the third condition, it enters the filtering state to perform self-filtering. It calls the large model to filter the data entries of the data source to be searched by analyzing the semantic relevance between the task description of the task to be completed and each data entry in the data source to be searched. The third condition includes: the extended finite state automaton determines the data source to be searched. When the extended finite state automaton detects that it meets the fourth condition, it enters the task-complete state and calls the large model to perform the set operation associated with the retrieval enhancement generation based on the currently filtered data entries in order to complete the task to be completed. The fourth condition includes: the extended finite state automaton determines that data search is not required.

2. The method according to claim 1, characterized in that, The large model, based on the task description of the task to be completed and the currently filtered data entries, determines whether a data search is needed, including: Each preset data source that has not been filtered by data entries is identified as a candidate data source; The large model is invoked to perform semantic analysis on the task description and the currently selected data entries to detect whether there is a target semantic description in the task description and the currently selected data entries that is related to the overall description semantics of at least one candidate data source; The large model is invoked to determine whether a data search is needed based on the detection results of whether the target semantic description exists in the task description and the currently filtered data entries.

3. The method according to claim 2, characterized in that, The data entries in the preset data source are determined through the following steps: The data documents in the preset data source are divided using a parent-child document block division method; The parent document blocks that are divided are identified as data entries, and the child document blocks associated with the parent document blocks are vector-embedded and indexed to support the large model in performing semantic analysis on the data entries.

4. The method according to claim 1, characterized in that, Before calling the large model to filter data entries in the current data source by analyzing the semantic relevance between the task description of the task to be completed and each data entry in the current data source to be searched, the method further includes: Based on word vector similarity, the task description of the task to be completed is matched with each data entry in the current data source to be searched; After the rearrangement model is invoked to rearrange each data entry matched by the task description, the top k data entries are extracted so that the large model can filter the extracted k data entries, where k is a positive integer.

5. The method according to claim 1, characterized in that, The initialization operation includes at least one of the following: Initialize the large model to make it usable; Receive the task description of the task to be completed from the user input, or call the large model to generate a task description based on the task type of the task to be completed; The initial data entry list is empty; this data entry list is used to store the currently filtered data entries. Based on the received data source adjustment instructions from the user, add or delete preset data sources. The preset data sources are used by the large model to determine the data source that needs to be searched. Different preset data sources contain data entries of the same or different modalities. Initialize a candidate data source list to record all preset data sources as candidate data sources. This candidate data source list is used to support large models in determining the data source that needs to be searched.

6. The method according to claim 5, characterized in that, The candidate data source list is created by storing an overall description of a preset data source, in order to record the preset data source as a candidate data source. The overall description of the preset data source is determined through the following steps: The large model is invoked to generate a complete description of the preset data source; Alternatively, it can receive a general description of the preset data source from user input.

7. The method according to any one of claims 1-6, characterized in that, The state set of the extended finite state automaton initial state And the final state In the case of the extended finite state automaton, the state transition function It is expressed as follows:

8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the self-routing and self-filtering retrieval enhancement generation method as described in any one of claims 1 to 7.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the self-routing and self-filtering retrieval enhancement generation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instruction is executed by the processor, it implements the self-routing and self-filtering retrieval enhancement generation method as described in any one of claims 1 to 7.