RPA agent based on large model retrieval and enhanced generation and its interaction method
Through the RPA agent generated based on large model retrieval enhancement, situational learning and state transfer rules are used to solve the problems of large training data requirements and low operating efficiency in the existing technology, achieving the effects of small data requirements and high operating efficiency, reducing Calculate cost and workload.
Patent Information
- Application Number
- CN202410734613.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-07
AI Technical Summary
Existing RPA agents suffer from the problems of large demand for training data, low operating efficiency and high cost, especially the huge data annotation workload and low operating efficiency caused by over-reliance on large models.
Use RPA agents based on large model retrieval enhancement, including search enhancement generation module, planner, process engine module and map knowledge module. Through scenario learning and state transfer rules, data requirements are reduced and operating efficiency is improved, and large language models are used for A small amount of data drives the generation of results, avoiding combinatorial explosion problems and catastrophic forgetting.
It achieves small data requirements and high operating efficiency. Only a small amount of data is needed to generate results, avoiding multiple model calls, reducing computing costs and workload, and improving data utilization and process orchestration efficiency.
Smart Images

Figure CN118313411B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of RPA technology, and specifically relates to an RPA agent generated based on large model retrieval enhancement and an interaction method thereof. Background Art
[0002] RPA is the use of software robots to automatically execute regular business processes and transaction operations. It achieves automation by configuring software to capture and replicate the actions required for manual operation of this process.
[0003] LUI (Language User Interface) is a new type of human-computer interaction method that implements command operations through natural language dialogue with computers.
[0004] LLM is the abbreviation of Large Language Model. It is an artificial intelligence model trained based on massive natural language data, which can understand and generate human language and has broad application prospects.
[0005] In the fields of computer science and artificial intelligence, an agent usually refers to an autonomous software entity or agent that can perceive the environment, run continuously, make decisions and take actions autonomously according to design goals.
[0006] However, the prior art related to the above content still has the following problems:
[0007] 1. Large demand for dedicated training data
[0008] The existing Chinese patents CN116560819A, CN117314378A and CN117634867A all involve training data in a special format. In actual implementation, it is necessary to first label the expected results of each piece of data, and then the model obtains the reasoning ability of the corresponding scenario through supervised learning. This means that the training of neural networks often requires a large amount of data, which will put higher requirements on the implementation workload.
[0009] It should be pointed out that the model proposed in the patent content of Chinese Patent Publication No. CN117634867A needs to consider the combination of intent and web page status as input, which will produce a combinatorial explosion problem and easily lead to massive data being unable to support the training needs of the model.
[0010] 2. Low operating efficiency / high cost
[0011] Large models (LLMs) are expensive to use, so multiple calls need to be avoided.
[0012] The Agent (intelligent body) shown in the patent with Chinese patent publication number CN117634867A needs to reflect on whether the step execution is successful and plan new steps after each step. In this way, the number of times the LLM needs to be called to execute a process arrangement using this technology is proportional to the number of process steps. The process cost increases linearly and there is no scale effect (manufacturing spreads costs by expanding production scale).
[0013] Therefore, it is very important to design an RPA agent based on large model retrieval and enhanced generation and its interaction method with small data requirements and high operating efficiency. Summary of the invention
[0014] The present invention aims to overcome the problem in the prior art that the existing Agent (intelligent agent) is overly dependent on the large model (LLM), resulting in low operating efficiency and a huge workload for training data annotation, which makes it difficult to deploy. An RPA agent based on large model retrieval enhancement generation and an interaction method thereof with low data demand and high operating efficiency is provided.
[0015] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions:
[0016] The RPA agents generated based on large model retrieval enhancement include:
[0017] The search enhancement generation module is used to infer the conditions that the target state needs to meet based on the user's intention;
[0018] A planner is used to find a process to achieve the target condition under known target conditions and given constraints;
[0019] The process engine module is used to organize RPA processes that can be executed step by step;
[0020] The map knowledge module is used to provide the transfer rules of the software interface state, that is, to express the new state reached after any state undergoes any operation steps;
[0021] The conditional knowledge module is used to record the mapping examples from user intentions to conditions to be met.
[0022] Preferably, the user intention refers to a descriptive instruction including a software state that the user wants to achieve.
[0023] Preferably, the search enhancement generation module includes a retriever and a reader / writer; the retriever is used to retrieve the most matching text fragment from the knowledge base according to the current question / input; the reader / writer is used to receive the text fragment returned by the retriever and generate a final answer in combination with the current question / input.
[0024] Preferably, the retriever adopts a neural retriever based on a double-tower model.
[0025] Preferably, the reader / writer adopts a large language model that has been pre-trained for continued writing.
[0026] Preferably, the large language model has a scenario learning capability, and is used to infer the conditions to be satisfied corresponding to the same user intention based on sample prompts.
[0027] The present invention also provides an interactive method for an RPA agent based on large model retrieval enhancement generation, comprising the following steps:
[0028] S1, user expresses intention;
[0029] S2, find the same items as the user's intention in the conditional knowledge module, and use the situational learning ability of the large language model in the search enhancement generation module to obtain the conditions that need to be met;
[0030] S3, the map knowledge module serves as the state transition prior knowledge and provides the planner with the constraints required to solve the step planning problem;
[0031] S4, the planner plans the steps to be completed in sequence according to the conditions to be met in step S2, the constraints required in step S3, and the initial state of the user interface;
[0032] S5, arranges the sequence of operation steps in causal order and outputs the corresponding process results.
[0033] Compared with the prior art, the present invention has the following advantages: (1) The present invention has a small data requirement: in terms of conditional knowledge, the in-contex learning technology of a large model is utilized, so that the present invention only needs a few examples to guide the LLM (general model) to generate the desired results, eliminating the need to collect a large amount of data for special model training; similarly, in terms of map knowledge, the symbolic modeling of interface state transitions avoids the training of neural networks and its catastrophic forgetting problems, making data utilization more efficient; at the same time, the data structure extracted by the present invention also avoids the combinatorial explosion problem, constrains the data space to a reasonable range, and does not need to add the ever-changing user intentions to the state transfer process; (2) The present invention has high operating efficiency: process orchestration only needs to call the model once, while the existing solution calls it multiple times. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a principle block diagram of the RPA agent generated based on large model retrieval enhancement in the present invention. DETAILED DESCRIPTION
[0035] In order to more clearly illustrate the embodiments of the present invention, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings and other implementation methods can be obtained based on these accompanying drawings without creative work.
[0036] The present invention provides an RPA agent based on large model retrieval enhancement generation, including:
[0037] The search enhancement generation module is used to infer the conditions that the target state needs to meet based on the user's intention;
[0038] A planner is used to find the process (sequence of operation steps) to achieve the target condition under known target conditions and given constraints;
[0039] The process engine module is used to organize RPA processes that can be executed step by step;
[0040] The map knowledge module is used to provide the transfer rules of the software interface state, that is, to express the new state reached by any state after any operation steps; similar to the direction data between any locations in the GPS map;
[0041] The conditional knowledge module is used to record the mapping examples from user intention to the conditions to be met. The feature expresses the one-to-one correspondence between user intention and specific conditions, providing reference information for the large model (LLM).
[0042] like Figure 1 As shown in the figure, the user intention is inferred by the large model (LLM) using search-enhanced generation (RAG) to infer the various conditions that need to be met for the target state, and then the process engine organizes the RPA process that can be executed step by step. Among them, the conditional knowledge as the knowledge base (Knowledge Base) provides reference knowledge for the generation (RAG) of the large model (LLM), and the map knowledge as the state transition prior knowledge (Prior Knowledge) provides the planner with the constraints required to solve the step planning problem.
[0043] Among them, the LLM, the large model has the ability of in-context learning, and can infer the conditions to be met corresponding to similar user intentions using prompts from a small number of samples.
[0044] Interface status refers to the status of the software interface being operated;
[0045] An operation step refers to an operation by the user (or the user's agent) that can change the state of the interface;
[0046] A process refers to a sequence of several operating steps;
[0047] User intent refers to a descriptive instruction that implies the software state that the user wants to achieve.
[0048] The RPA agent of the present invention needs to reach the target state through a series of operations according to the current interface state to meet the user's intention.
[0049] In the present invention, RAG is an LLM (Large Language Model) architecture, and its full name is Retrieval-Augmented Generation.
[0050] The core idea of RAG technology is to combine the LLM model with the external knowledge base to make up for the lack of LLM's own knowledge, thereby improving the performance of LLM in specific fields.
[0051] The RAG architecture consists of two main parts:
[0052] 1. Retriever
[0053] Based on the current question / input, the most relevant text snippets are retrieved from the knowledge base.
[0054] Commonly used search engines include traditional methods such as TF-IDF and BM25, as well as neural search engines based on the dual-tower model.
[0055] 2. Reader / Generator
[0056] Receive the text fragment returned by the retriever, combine it with the current question / input, and generate the final answer.
[0057] A large language model that has undergone continuation pretraining is usually used.
[0058] The advantage of RAG technology is that it can utilize the existing massive knowledge base, avoiding the need to integrate all knowledge when training the LLM model from scratch, which can significantly reduce the computational cost. It also avoids the need to retrain the model as a whole when knowledge is updated.
[0059] In addition, the present invention also provides an interaction method of an RPA agent based on large model retrieval enhancement generation, comprising the following steps:
[0060] 1. The user expresses his / her intention;
[0061] 2. Find the items that are the same as the user's intention in the conditional knowledge module, and use the contextual learning ability of the large language model in the search enhancement generation module to obtain the conditions that need to be met;
[0062] 3. The map knowledge module, as a priori knowledge of state transition, provides the planner with the constraints required to solve the step planning problem;
[0063] 4. The planner plans the steps to be completed in sequence according to the conditions that need to be met in step 2, the constraints required in step 3, and the initial state of the user interface;
[0064] 5. Arrange the sequence of operation steps in causal order and output the corresponding process results.
[0065] Based on the technical solution of the present invention, the following case scenario is used to illustrate the implementation process of the present invention in practical application. The specific application implementation plan is as follows:
[0066] 1. The user expresses the intention to add friend A in DingTalk;
[0067] 2. Conditional knowledge: To add DingTalk friend B, at least the following conditions must be met:
[0068] a. Enter text B into the specified (search box);
[0069] b. Click the (Send) button;
[0070] 3. Large model RAG: Items similar to the user’s intention are found in the above knowledge base, and the situational learning ability of the large model is used to obtain the conditions that need to be met:
[0071] a. Enter text A into the specified (search box);
[0072] b. Click the (Send) button;
[0073] 4. Map knowledge, the specific software interface state transition rules are shown in Table 1 below:
[0074] Table 1 Software interface status transition rules
[0075]
[0076] 5. Planner: Plan the steps to be completed in sequence according to the conditions in the conditional knowledge and the initial state of the user interface (taking the "None" state as an example):
[0077] a. Enter text A into the specified (search box);
[0078] (1) Start DingTalk;
[0079] (2) Click the (+) element;
[0080] (3) Click the (add friend) element;
[0081] b. (Send) button;
[0082] (4) Click (confirm) the element;
[0083] (5) Click (avatar);
[0084] (6) Click (add friend);
[0085] 6. Output process: The sequence of operations arranged in causal order is the process. The output process is shown in Table 2 below:
[0086] Table 2 Output stream program list
[0087]
[0088] The innovative features of the present invention are as follows:
[0089] 1. The present invention proposes a method for splitting the world model
[0090] The agent needs to interact with the environment. In the present invention, the agent can predict the action route in advance by interacting with the simulated environment (world model), thereby achieving the purpose of RPA process orchestration. Among them, the world model is divided into two parts in the present invention:
[0091] (1) Model for predicting conditions to be met from user intent (conditional knowledge)
[0092] Its characteristic is that it can map user intentions to a series of conditions to be met;
[0093] (2) Model of software interface transfer with user operation (map knowledge)
[0094] Its characteristic is the ability to predict the next state based on the current state of the software and the actions that the agent will take.
[0095] 2. User Intent Understanding Based on RAG and LLM
[0096] Its characteristic is to first retrieve similar data, and then use the reasoning ability of the large model to obtain the conditions that need to be met for specific user intentions.
[0097] 3. Treat RPA process orchestration as a planning problem on a topology map
[0098] The RPA process orchestration problem is similar to the path planning problem on the topology map. This invention uses this to efficiently handle the RPA process orchestration problem. Specifically, it is manifested as follows:
[0099] The software status corresponds to the nodes on the topology graph;
[0100] The agent’s operations on the software correspond to the directed edges between the nodes in the topology graph;
[0101] The RPA process corresponds to a path consisting of specific directed edges on the topology graph.
[0102] The above description is only a detailed description of the preferred embodiments and principles of the present invention. For ordinary technicians in this field, according to the ideas provided by the present invention, there will be changes in the specific implementation methods, and these changes should also be regarded as the protection scope of the present invention.
Claims
1. An RPA agent system based on large model retrieval and enhanced generation, characterized by: include: The search enhancement generation module is used to infer the conditions that the target state needs to meet based on the user's intention; A planner is used to find a process to achieve the target condition under known target conditions and given constraints; The process engine module is used to organize RPA processes that can be executed step by step; The map knowledge module is used to provide the transfer rules of the software interface state, that is, to express the new state reached after any state undergoes any operation steps; The conditional knowledge module is used to record the mapping examples from user intentions to conditions to be met; Among them, the map knowledge module, as a priori knowledge of state transition, provides the planner with the constraints required to solve the step planning problem; The conditional knowledge module acts as a knowledge base to provide reference knowledge for the generation of the large model. Specifically, the conditional knowledge module finds entries that are the same as the user's intention, and uses search to enhance the situational learning ability of the large language model in the generation module to obtain the conditions that need to be met.
2. The RPA agent system based on large model retrieval and enhanced generation according to claim 1 is characterized in that: The user intent refers to a descriptive instruction including the software state that the user wants to achieve.
3. The RPA agent system based on large model retrieval and enhanced generation according to claim 1 is characterized in that: The search enhancement generation module includes a retriever and a reader / writer; the retriever is used to retrieve the most matching text fragment from the knowledge base according to the current question / input; the reader / writer is used to receive the text fragment returned by the retriever and generate a final answer in combination with the current question / input.
4. The RPA agent system based on large model retrieval and enhanced generation according to claim 3 is characterized in that: The retriever adopts a neural retriever based on a double-tower model.
5. The RPA agent system based on large model retrieval and enhanced generation according to claim 3 is characterized in that: The reader / writer uses a large language model that has been pre-trained for continued writing.
6. The RPA agent system based on large model retrieval and enhanced generation according to claim 5 is characterized in that: The large language model has a scenario learning capability and is used to infer the conditions to be satisfied corresponding to the same user intention based on sample prompts.
7. An interactive method of an RPA agent system based on large model retrieval and enhanced generation, adopting the RPA agent system based on large model retrieval and enhanced generation as described in any one of claims 1 to 6, characterized in that: The interaction method of the RPA agent system based on large model retrieval enhanced generation includes the following steps: S1, user expresses intention; S2, find the same items as the user's intention in the conditional knowledge module, and use the situational learning ability of the large language model in the search enhancement generation module to obtain the conditions that need to be met; S3, the map knowledge module serves as the state transition prior knowledge and provides the planner with the constraints required to solve the step planning problem; S4, the planner plans the steps to be completed in sequence according to the conditions to be met in step S2, the constraints required in step S3, and the initial state of the user interface; S5, arranges the sequence of operation steps in causal order and outputs the corresponding process results.
