System and method for completing complex tasks using sequential retrieval enhancement generation
By enhancing multi-agent collaborative work in the sequential retrieval enhancement generation system, the problems of unpredictability and resource intensity of LLM agents in complex tasks are solved, and efficient and reliable task execution and output are achieved.
Patent Information
- Application Number
- CN202510997005.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-22
- Filing Date
- 2025-07-18
- Publication Date
- 2026-01-20
AI Technical Summary
Existing agents based on large language models (LLM) lack determinism when performing complex tasks, are complex and resource-intensive to debug, and result in unpredictability and high computational costs.
A sequential retrieval-enhanced generation system is adopted, in which four specialized agents (high-level planning, detailed planning, action, and writing agents) take on tasks in sequence, gradually refining and executing complex tasks. This includes the high-level planning agent generating broad plans, the detailed planning agent selecting tools and parameters, the action agent executing steps, and the writing agent synthesizing responses.
It improves the determinism and reliability of task execution, reduces computing resources and time costs, and ensures the consistency and accuracy of output.
Smart Images

Figure CN121365155A_ABST
Abstract
Description
Cross Reference to Related Applications
[0001] This specification is based on and claims priority to U.S. Provisional Application No. 63 / 672,832, filed July 18, 2024, the disclosure of which is incorporated herein by reference in its entirety. BACKGROUND
[0002] Current large language model (LLM)-based agents perform well for certain tasks, but have deficiencies. Most current artificial intelligence frameworks lack determinism in their output and, as a result, behave unpredictably on complex multi-step tasks. Additionally, debugging LLM agents is very complex. In complex systems where many agents interact with each other, tracking decision paths is a tedious task. Further, continuous replanning is resource intensive and, as a result, incurs high computational and time-wasting costs. It is challenging to make agents run reliably and performant within production environments.
[0003] From this, alternative LLM-based systems and methods for performing complex tasks can be desirable. SUMMARY
[0004] In one embodiment, a method of automating a task includes receiving, by a high-level planning agent, a query related to a task, the high-level planning agent having a high-level planning training model, wherein the high-level planning agent is operable to automatically generate a high-level planning agent prompt requesting a plurality of steps to complete the task and one or more sources of information related to the task of the query, and the high-level planning training model outputs a high-level plan including the plurality of steps and information needed to complete the plurality of steps. The method further includes receiving, by a detailed planning agent, the query and the high-level plan, the detailed planning agent having one or more detailed planning agent training models, wherein the detailed planning agent is operable to automatically generate a detailed planning agent prompt including the plurality of steps, a plurality of tools, and one or more parameters for each of the plurality of tools. The detailed planning agent outputs a detailed plan including the plurality of steps and, for each step, one or more tools and one or more parameters for each of the one or more tools. The method further includes receiving, by an action agent, the query and the detailed plan, the action agent having an action agent training model, wherein the action agent is operable to automatically generate an action agent prompt including a function call for each of the one or more tools in the plurality of steps and one or more parameters for each of the one or more tools in the plurality of steps. The action agent produces an execution output including information resulting from the function call for each of the one or more tools in the plurality of steps. The method further includes receiving, by a writing agent, the query and the execution output, wherein the writing agent outputs a description of a result of completion of the task represented by the query.
[0005] In another embodiment, a computing device for automating a task includes one or more processors and a non-transitory computer-readable medium. The non-transitory computer-readable medium stores instructions that, when executed by the one or more processors, cause the one or more processors to receive, by a high-level planning agent, a user query related to a task, the high-level planning agent having a high-level planning training model, wherein the high-level planning agent is operable to automatically generate a high-level planning agent prompt requesting a plurality of steps for completing the task and one or more information sources related to the task of the query. The high-level planning agent training model outputs a high-level plan including the plurality of steps and information needed to complete the plurality of steps. The instructions further cause the one or more processors to receive, by a detailed planning agent, the query and the high-level plan, the detailed planning agent having one or more detailed planning agent training models, wherein the detailed planning agent is operable to automatically generate a detailed planning agent prompt including the plurality of steps, a plurality of tools, and one or more parameters for each of the plurality of tools. The detailed planning agent outputs a detailed plan including the plurality of steps and, for each step, one or more tools and one or more parameters for each of the one or more tools. The instructions further cause the one or more processors to receive, by an action agent, the query and the detailed plan. The action agent includes an action agent training model, wherein the action agent is operable to automatically generate an action agent prompt including a function call for each of the one or more tools in the plurality of steps and one or more parameters for each of the one or more tools in the plurality of steps. The action agent produces an execution output including information resulting from the function call for the one or more tools in the plurality of steps. The instructions further cause the one or more processors to receive, by a writing agent, the query and the execution output, wherein the writing agent outputs a description of a result of completion of the task represented by the query.
[0006] These and additional features provided by the embodiments described herein will be more fully understood in view of the following detailed description, taken with the drawings, in which: BRIEF DESCRIPTION OF DRAWINGS
[0007] To easily identify the discussion of any particular element or act, the most significant digit or digits in a reference number are often repeated in several places in the specification where the same element or act is discussed.
[0008] Figure 1 FIGURE illustrates an example user interface for completing a complex task, in accordance with one or more embodiments described and illustrated herein.
[0009] Figure 2 FIGURE illustrates a workflow of a sequential retrieval augmentation generation system and method according to one or more embodiments described and illustrated herein.
[0010] Figure 3 FIGURE illustrates a workflow of an example high-level planning agent according to one or more embodiments described and illustrated herein.
[0011] Figure 4 FIGURE illustrates an example high-level planning output according to one or more embodiments described and illustrated herein.
[0012] Figure 5 FIGURE illustrates a workflow of an example detailed planning agent according to one or more embodiments described and illustrated herein.
[0013] Figure 6A and Figure 6B FIGURE illustrates an example detailed planning agent output according to one or more embodiments described and illustrated herein.
[0014] Figure 7 FIGURE illustrates a workflow of an example action agent according to one or more embodiments described and illustrated herein.
[0015] Figure 8 FIGURE illustrates an example execution of an action agent according to one or more embodiments described and illustrated herein.
[0016] Figure 9A and Figure 9B FIGURE illustrates an example input of a writing agent according to one or more embodiments described and illustrated herein.
[0017] Figure 10 FIGURE illustrates an example output of an example sequential retrieval augmentation generation system according to one or more embodiments described and illustrated herein.
[0018] Figure 11 FIGURE illustrates an example computing device for a sequential retrieval augmentation generation method according to one or more embodiments described and illustrated herein. DETAILED DESCRIPTION
[0019] Embodiments of the present disclosure address current deficiencies of current large language model (LLM)-based agents by using sequential retrieval augmentation generation. Multiple agents take on subtasks of a complex task in sequence, requiring minimal intervention. The sequential retrieval augmentation generation system and method described herein makes complex problem solving in artificial intelligence agents more easily achievable by prioritizing a structured, step-by-step approach to adding incremental details to instructions. The logic behind sequential retrieval augmentation generation is to establish the order of tools and their settings at the outset and then augment and fine-tune the tools and settings as the process moves through each stage. In other words, the process begins with an overview of the goals and the broad steps the system needs to take to achieve those goals. Then, details are added step-by-step at each step to ensure the precision each tool needs to reach its goal.
[0020] The architecture of embodiments of the present disclosure is based on four specialized agents, each responsible for a specific function. At the top level is a high-level planning agent that generates a broad, step-by-step plan to guide the process and takes into account any useful information from the dialogue history. Then, a detailed planning agent refines the high-level plan by selecting specific tools and defining parameters. Next, an action agent executes each step in sequence, retrieves results, and stores the results for use in the context of subsequent action steps. Finally, a writing agent combines the responses from each completed step to produce a coherent response in your desired format.
[0021] Various embodiments of systems and methods for completing complex tasks using sequential retrieval augmentation generation are described in detail below.
[0022] Reference is now made to Figure 1 FIGURE 1 illustrates an example user interface 102 in accordance with an embodiment of the present disclosure. The example user interface 102 provides a trip planning tool in which a user can enter a query describing details of a trip he or she wants to take. It should be understood that embodiments are not limited to trip planning, and the user interface 102 can provide a tool that performs any type of function.
[0023] Other examples include a method to conduct competitive analysis on a product and develop an evidence-based strategy approach, create a comprehensive personalized care plan for older patients with diabetes, optimize a portfolio according to specific risk tolerance and real-time market conditions (automatically handle all research and action), and review and analyze contracts, proposals, or historical rulings to support legal disputes without the usual manual search, reading, and decision making.
[0024] Figure 1The user interface 102 of the example includes an input text box for the user to enter a query in the form of a request. Here, the user has entered, “Plan a one-week trip to Paris for two people, including flights, accommodations, and activities.” It will be appreciated that embodiments can also include speech processing capabilities so that the user can speak the query to the system.
[0025] As described in greater detail below, the system, which includes multiple agents that take a step-by-step approach to fulfilling the request, develops a plan, takes action on the plan, and then produces a summary for the user to review. Figure 1 The summary of the example is provided in the output text box 108. The system uses tools available to it to book flights, hotel rooms, and activities. A summary of the booked trip is provided in the output text box 108, which indicates the travel dates, hotel information, activity information, and packing recommendations. The user can ask the system further questions about the trip to obtain additional information as needed.
[0026] The system takes on the complex task of booking a trip, breaks it down into a high-level plan with multiple steps (e.g., book flights, book a hotel, etc.), identifies which tools to use (e.g., flight booking websites, hotel booking websites, etc.), identifies which parameters to send to the tools (e.g., dates, number of people, travel city, etc.), executes the plan by sending the parameters to the various tools, and then generates a report that is provided to the user in the output text box 108.
[0027] Figure 2 FIG. 1 illustrates a high-level view of an example system 104 for providing a sequential retrieval augmentation generation (RAG) to perform a complex task that minimizes noise, increases consistency and reliability, and reduces computational power and time relative to traditional large language model approaches. The example system includes a high-level planning agent 204 that receives a query 202 from a user, a detailed planning agent 206 that receives output from the high-level planning agent 204 and the query 202, an action agent 208 that receives output from the detailed planning agent 206 and the query 202, and a writing agent 210 that receives output from the action agent 208 and the query 202 and produces an output 212 that is delivered to the user.
[0028] Figure 2Each of the four agents shown in FIG. 1 is responsible for a particular function within the sequential RAG framework. As described in more detail below, the high-level planning agent 204 generates a broad, step-by-step plan to guide the process and takes into account any useful information from the dialogue history based on previous interactions with the system 104. The detailed planning agent 206 then refines this high-level plan by selecting specific tools and defining parameters. Next, the action agent sequentially executes each step and stores them for context in subsequent action steps. Finally, the writing agent 210 combines the responses from each completed step to produce a coherent response in the desired format.
[0029] Figure 3 The high-level planning agent 204 is illustrated in more detail. In general, the high-level planning agent 204 creates a broad plan that outlines multiple steps without tool details. The high-level planning agent 204 utilizes a prompt engineering to delineate the boundaries of available APIs, tools, and information sources.
[0030] The high-level planning agent 204 automatically generates a prompt that is provided to the high-level planning agent training model. The high-level planning agent 204 system prompt includes information about the types of data accessible to the system 104, the logical order that the high-level planning agent training model should follow, and any fixed limitations or constraints of the system it is planning for. The prompt also asks whether the system 104 can answer the question and, if so, what information is needed. If the answer is no, the system 104 can then inform the user that it is not possible to answer the question or perform the task requested by the query 202.
[0031] The high-level planning agent training model of the high-level planning agent 204 can be a smaller model, such as LLaMA 8B or GPT-3.5 / 4o-mini.
[0032] The high-level planning agent 204 receives a query 202 from a user. The capabilities 302 of the system are evaluated. The capabilities 302 include sources of information available to the system 104, such as available information sources and tools. In the example of a travel booking website and tourist information, the capabilities 302 can include the travel booking website and the tourist information. The generated prompt asks whether the question can be answered by evaluating the capabilities 302. If yes, the high-level planning output 306 that includes multiple steps without a lot of additional information can be generated by the high-level planning generator 304 of the high-level planning agent training model. As a non-limiting example, the high-level planning output 306 can be a text file, such as a JSON file. Figure 1
[0033] The high-level planning agent 204 abstracts the overall problem solving process, allowing more focused and efficient planning in subsequent stages. Additionally, because the detailed planning agent 206 follows the high-level planning agent 204, it provides a quick way to check the overall logic during debugging, without having to wait for the entire process to complete.
[0034] Figure 4 An example high-level planning output 306 is illustrated for the travel planning example from Figure 1 The query requesting the system 104 to book a trip to Paris has been broken down by the high-level planning agent 204 into multiple steps. The steps are "flight booking", "accommodation booking", "itinerary planning", "transportation arrangement", and "packing list". Note that the high-level planning agent 204 inferred that a packing list would be beneficial, even though it was not specifically requested by the user. Each step also includes a high-level description of what is to be performed by the particular step. For example, for the step "flight booking", the description provided is "find and book a flight to Paris".
[0035] Figure 5 The detailed planning agent 206 is illustrated in more detail. Both the query 202 and the high-level planning output 306 are provided to the detailed planning agent 206. Using the query 202 and the high-level planning output 306 as guidance, the prompts of the detailed planning agent 206 contain comprehensive information about each available tool, including specific usage instructions and available parameters. This structured approach helps the detailed planning agent 206 refine the plan, select tools, and add parameters, while taking into account the output of previous steps to ensure that each subsequent action logically builds on previous steps. It should be understood that the detailed planning agent 206 can be provided by a single prompt or multiple prompts. Figure 5 The arrangement of the blocks of the illustrated detailed planning agent 206 is non-limiting, and the particular arrangement of steps / tasks represented by the blocks is neither mandatory nor implied. Note that Figure 5 All or some of the blocks of the detailed planning agent 206 can be provided by a single prompt or multiple prompts.
[0036] The input handling block 502 receives the high-level planning output 306 and ensures that all relevant details, including the previous output and required parameters, are available before further refining the plan. In this way, the input handling block 502 acts as a pre-processing step to consolidate the user's intent before tool selection. As a non-limiting example using the trip planning example described above, if the user did not specify the location of the trip, the parameter "destination" is missing. In this case, the input handling block 502 would stop the process and generate an output letting the user know that he or she did not specify a destination.
[0037] The prompt policy block 504 determines how the detailed planning agent 206 will construct the detailed plan. The prompt policy block 504 includes structured prompts and explicit tool instructions to generate precise execution plans. The prompt policy block 504 provides information about the tools available to the detailed planning agent training model, requiring the detailed planning agent training model to generate a detailed research plan using the provided tools. The detailed planning agent training model can be a more capable model for managing tool selection and parameter specification complexity. Non-limiting examples of detailed planning agent training models include GPT4o+, o1, Claude 3.5+, and Llama 3+70B. The prompt policy block 504 also includes some guidelines about the research task, such as what is a good plan, and how the output of the detailed planning agent 206 should be formatted. The detailed planning agent 206 also includes information about how to interact with the available tools, API interfaces, and how to write queries for searching.
[0038] The one-off example block 506 of the detailed planning agent 206 prompt provides one or more one-off examples, which can include specific steps, a selection of tools for the specific steps, a selection of parameters for the tools called, and a format for the output. Any number of one-off examples can be included. As a non-limiting example, a one-off example can be a selection of a flight booking tool for a step to book a flight and a selection of associated parameters for the step to book a flight. Including one or more one-off examples can improve the accuracy and reliability of the detailed planning agent 206.
[0039] At the tool selection and parameter specification block 508, for each step of the high-level plan, the prompt requires the detailed planning agent training model to return the best tool for completing that step. For example, for the “flight booking” step of the high-level plan output 306, the detailed planning agent training model would select a flight booking tool, which is one of the many tools provided to the detailed planning agent training model of the detailed planning agent 206. As a non-limiting example, the tool selection and parameter specification block 508 portion of the prompt of the detailed planning agent 206 can state “select the most relevant tool for each step of the plan based on the information you are trying to gather. Please use a separate tool for each entity that is similar to an institution. For example, if you are trying to gather information about a company, you can use a different tool for each company.”
[0040] For each tool selected, the prompted tool selection and parameter specification block 508 requires the detailed planning agent to provide specific parameters for using the tool to complete the task of the step. As a non-limiting example, the tool selection and parameter specification block 508 can state “provide specific parameters that should be passed to each tool based on the example use case provided.” In the travel planning example described above, the selected parameters can include a departure airport, a destination airport, a departure date, and a return date. As such, the detailed planning agent 206 returns these parameters along with the selected flight booking tool for the flight booking step of the high-level plan.
[0041] The detailed planning agent 206 outputs a detailed plan 510 that lists each tool for each step and the associated parameters for each step. Because the detailed plan 510 can include more information than is needed by the action agent 208, a filtering step can be included that filters out unneeded information (such as parameters that are not required) and also formats the detailed plan 510 into a formatted detailed planning agent (DPA) output 512 that includes only relevant information. As a non-limiting example, the detailed plan 510 can include irrelevant information such as, but not limited to, the tail number of the airplane that flies on the route of the selected flight. This irrelevant information can be removed from the detailed plan 510 in the DPA output 512. For example, the DPA output 512 can be a JSON file.
[0042] Figure 6A And Figure 6B An example DPA output 512 is illustrated for the travel planning example. For each step, the tool and associated parameters are specified. The output for a particular step is also specified. For the flight booking step, the tool Flight Search API is specified. Parameters such as “departure”: “London” are also specified. Note that the DPA output 512 lists the steps in order according to the logical order that a human would perform the overall task. The output from a previous step is used by the current step. For example, the hotel booking step would use the flight information from the flight booking step so that the hotel room is not booked for a date and time before the passenger will arrive or for a date and time later than a long time after landing.
[0043] Reference is now made to Figure 7, the query 202 and the DPA output 512 are provided to the action agent 208. The action agent 208 is operable to process the DPA output 512 from the detailed planning agent 206 in a step-wise order. As described in more detail below, the action agent 208 invokes the specified tool using the specified parameters provided by the detailed planning agent 206 and validates / adjusts the parameters based on instructions embedded in the function call. The action agent 208 has a temporal memory, so it is able to reference parameters from previous steps, such as using the country ID from an earlier retry to look up a flight. This approach helps ensure that each step is executed precisely and efficiently, strictly following the detailed plan set by the DPA.
[0044] At block 702, a review of execution is carried out to ensure that the action agent 208 is able to execute the function call of the DPA output 512. If not, the action agent 208 can output a message to the user indicating that the plan cannot be executed. The action agent 208 can also make recommendations for changes to the plan that would help execute the plan.
[0045] At block 704, the function call to the tool of the first step is executed. The function call passes the parameters associated with the step of the DPA output 512. For example, for the flight booking step, the flight search API tool is invoked when passing the parameters of “departure”, “destination”, “date”, and “cabin”. Block 706 is provided for parameter validation to ensure that the provided parameters are correct. The parameter validation at block 706 can be performed by the function / tool itself. In some embodiments, the action agent 208 includes a small large language model (e.g., GPT3.5 or GPT4o-mini) for parameter correction when the function returns an error. For example, the format of the parameters passed to the function can not be correct for the particular function. The small large language model can receive the error from the function and then make a suggestion for a new format for the parameters. As an example, the “destination” parameter can be “Great Britain”, but the function can require the ISO 3166 country code “GB”. In this case, the small large language model of the action agent 208 can receive the error from the function and generate the reformatted destination parameter as “GB” and invoke the function again with the reformatted destination parameter. The small large language model can handle edge cases and thus increase robustness without having a significant detriment to performance enhancement.
[0046] At block 710, the successful function call produces an execution output. The execution output includes the information provided by the function or tool. In the flight booking step, the execution output will include the flight itinerary information.
[0047] At block 712, a decision is made whether there are additional steps to perform. If so, the function for the next step is called at block 704, and the process repeats until all steps of the DPA output 512 are completed. When the functions are successfully called, their outputs are appended to the action agent output 714. Thus, the action agent output at the action agent output 714 includes all information output by each function.
[0048] Figure 8 An example of the flight booking steps performed by the action agent 208 is illustrated. Here, the performance is carried out by calling “FlightSearchAPI.search_flights(FlightSearchAPI. search_flights)” with parameters of departure, destination, date, and cabin. The result will be a booked flight with confirmation information and itinerary information.
[0049] Referring again to Figure 2 , the action agent output 714( Figure 7 ) is provided with the query 202 as input to the writing agent 210. The writing agent 210 includes a writing agent training model that receives the action agent output 714 and synthesizes it into a response for the user. The writing agent 210 utilizes the information from each step provided by the action agent output 714. The cues of the writing agent 210 are such that the output of the writing agent 210 is a desired narrative related to the user’s query 202. The writing agent 210 ensures that the final output is not just a collection of individual answers, but a comprehensive narrative that fully addresses the user’s original query 202 based on the information provided. Depending on the application needs, the writing agent 210 can generate a brief summary, a detailed narrative, or a structured data output, ensuring that the final result is coherent and useful.
[0050] The choice of model for the writing agent training model depends on the number of responses expected per agent and the desired presentation style. For simple tasks, a minimal effective model can be used. For more complex tasks that consider large amounts of data, a larger base model should be selected. For lightweight, low-data tasks (e.g., trip planning), a smaller model similar to GPT-3.5-turbo or GPT-4o mini can be used to improve efficiency. For heavy synthesis, such as analyzing institutional performance in publishing systems such as SciVal operated by Elsevier in Amsterdam, the Netherlands, a more capable model such as GPT-3.5+, Claude 3.5+, Llama 3+70B, or an expert reasoning model such as o1 / o3 can be used.
[0051] Figure 9AFigure illustrates example simplified inputs to the writing agent 210. In addition to Figure 9A The inputs into the writing agent 210 include rich and structured inputs extracted from the execution of the trajectory by the full action agent 208, in addition to what is shown in Figure 9B The output of each step includes at least: 1) function name and full argument dictionary, 2) raw API / tool results, 3) any error messages or correction steps (e.g., argument validation), and 4) metadata such as ID, score, source context, etc. Figure illustrates pseudo code for how the above information is managed within the tool_responses array in functions such as call_tool_functions. The responses are later passed to the writing agent 210 via, for example: final_input_messages = AgentPromptsV2.final_writing_agent_prompt(plan_json, tool_responses, last_user_query_messages).
[0052] Thus, Figure 9A An abstract is shown, and as Figure 9B shown, the actual input includes several layers of structured data for the writing agent 210 to create an accurate and contextually aware output. For example, when booking a hotel, it should align the dates with the user’s flight, and those details come from the step-by-step stored execution context.
[0053] Figure 10 Figure illustrates example writing agent output for the example of a trip to Paris. As Figure 10 shown, the output is in the form of a pleasant narrative that provides the user with all the information related to the trip. It should be understood that the narrative for other applications will differ from Figure 10 the narrative in Figure 10 For example, in a scientific research application, the output of the writing agent can include lists of information, tables, graphs, etc. The output can be more comprehensive and detailed than
[0054] The output can also include links to documents related to the query. In this example, the output can include links or documents such as the flight booking receipt, the hotel receipt, and other supporting documents. The user can also query the system to provide more information about the content provided in the original output. For example, the user can ask the system to provide the address of the hotel or inquire about the check-in time.
[0055] Referring now to Figure 11 , an example computing device 1102 is illustrated. In accordance with the embodiments illustrated and described herein, the example computing device provides a system and / or a non-transitory computer-usable medium having computer-readable program code embodied therein for sequentially completing complex tasks using one or more agents embodied as hardware, software, and / or firmware. It should be understood that Figure 11 The software, hardware, and / or firmware components depicted in
[0056] As also illustrated in Figure 11 , the computing device 1102 (or other computing device) can include one or more processors 1118, input / output hardware 1120, network interface hardware 1120, data storage components 1124 (which can store query data 1126, model data 1128, and any other data 1130 used to perform the functions described herein), and a non-transitory memory component 1104.
[0057] The query data 1126 includes one or more user queries provided to the computing device 1102. The model data 1128 includes any data used for the operation of the training models described herein. It should be understood that the data storage components 1124 can reside locally and / or remotely from the computing device 1102 and can be configured to store one or more data segments for access by the computing device 1102 and / or other components.
[0058] The non-transitory memory component 1104 can be configured as volatile and / or nonvolatile computer-readable media, and as such, can include random access memory (including SRAM, DRAM, and / or other types of random access memory), flash memory, registers, compact discs (CD), digital versatile discs (DVD), and / or other types of storage components. In other embodiments, the memory component 1104 can be defined by transitory memory and / or signals.
[0059] Additionally, the memory component 1104 can be configured to store operating logic 1106 that provides a local operating system for the computing device 1102, HLPA (high-level planning agent) logic 1108 that defines a high-level planning agent that generates high-level plans using high-level planning agent cues and high-level planning agent training models, DPA planning agent logic 1110 that defines a detailed planning agent that generates detailed plans using detailed planning agent cues and detailed planning agent training models, action agent logic 1112 that defines an action agent that executes detailed plans, and writing agent logic 1114 that defines a writing agent that generates written output using writing agent cues and writing agent models (each of which may, by way of example, be embodied as computer-readable program code, firmware, or hardware).
[0060] The local interface 1116 is also included in Figure 11 and can be implemented as a bus or other interface to facilitate communication among components of the computing device 1102.
[0061] The input / output hardware 1120 can include any components to receive input or produce output, such as but not limited to a keyboard, a microphone, a trackpad, a mouse, a touchscreen, an electronic display, and a speaker.
[0062] The one or more processors 1118 can include any processing component configured to receive and execute computer-readable code instructions, such as from the memory component 1104 and / or the data storage component 1124. The network interface hardware 1120 can include any wired or wireless networking hardware, such as a modem, LAN port, wireless fidelity (Wi-Fi) card, WiMax card, mobile communications hardware, and / or other hardware for communicating with other networks and / or devices.
[0063] It should be understood that the components illustrated in Figure 11 are merely exemplary and are not intended to limit the scope of the present disclosure. More specifically, while Figure 11 the components in the computing device 1102 are illustrated as residing within the computing device 1102, this is a non-limiting example. In some embodiments, one or more of the components can reside outside of the computing device 1102.
[0064] It should now be appreciated that embodiments of the present disclosure are directed to systems and methods for accomplishing complex tasks using sequential retrieval augmentation generation. The structured approach to problem solving of the embodiments emphasizes building details and complexity step-by-step, which in turn helps the training models to focus on performing the tasks they focus on faster and more reliably, ultimately with higher quality output.
[0065] It should be noted that the terms "substantially" and "approximately" can be utilized herein to represent an inherent degree of uncertainty that can be attributed to any quantitative comparison, value, measurement, or other representation that can be inherent to any quantitative comparison, value, measurement, or other representation. These terms can also be utilized herein to represent that a quantitative representation itself can not be exactly that which is described or claimed, but that it can be approximately that which is described or claimed. The terms "substantially" and "approximately" can be utilized herein to represent an inherent degree of uncertainty that can be attributed to any quantitative comparison, value, measurement, or other representation that can be inherent to any quantitative comparison, value, measurement, or other representation.
[0066] While specific embodiments have been illustrated and described herein, it will be appreciated that various other modifications and changes can be made without departing from the spirit and scope of the claimed subject matter. Moreover, although various aspects of the claimed subject matter have been described herein, it should be appreciated that not all aspects of the claimed subject matter need be utilized in order to practice the claimed subject matter. Accordingly, the appended claims are intended to encompass all such modifications and changes as fall within the scope of the claimed subject matter.
Claims
1. A method of automatically completing a task, the method comprising: receiving, by a high-level planning agent, a query related to the task, the high-level planning agent comprising a high-level planning training model, wherein: the high-level planning agent is operable to automatically generate a high-level planning agent prompt requesting a plurality of steps to complete the task and one or more information sources related to the task of the query; and the high-level planning training model outputs a high-level plan comprising the plurality of steps and information required to complete the plurality of steps; receiving, by a detailed planning agent, the query and the high-level plan, the detailed planning agent comprising one or more detailed planning agent training models, wherein: the detailed planning agent is operable to automatically generate a detailed planning agent prompt comprising the plurality of steps, a plurality of tools, and one or more parameters for each of the plurality of tools; and the detailed planning agent outputs a detailed plan comprising the plurality of steps and, for each step, one or more of the plurality of tools and one or more parameters for each of the one or more tools; receiving, by an action agent, the query and the detailed plan, the action agent comprising an action agent training model, wherein: the action agent is operable to automatically generate an action agent prompt comprising a function call for each of the one or more tools in the plurality of steps and one or more parameters for each of the one or more tools in the plurality of steps; the action agent produces an execution output comprising information produced by the function call for the one or more tools in the plurality of steps; and receiving, by a writing agent, the query and the execution output, wherein the writing agent outputs a description of a result of completion of the task represented by the query.
2. The method of claim 1, wherein, the high-level planning agent prompt further comprises one or more application programming interfaces and the plurality of tools.
3. The method of claim 1, wherein, the detailed planning agent prompt further comprises one or more one-off examples.
4. The method of claim 1, wherein, the action agent is further operable to validate the one or more parameters.
5. The method of claim 4, wherein, validation of the one or more parameters is based on rules.
6. The method of claim 4, wherein, validation of the one or more parameters is done by a validation training model.
7. The method of claim 1, wherein, the action agent is further operable to filter execution results to generate the execution output.
8. A computing system for automatically completing a task, the system comprising: one or more processors; a non-transitory computer-readable medium storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the following operations: receiving, by a high-level planning agent, a query related to the task, the high-level planning agent comprising a high-level planning training model, wherein: The high-level planning agent is operable to automatically generate a high-level planning agent prompt requesting a plurality of steps to complete the task and one or more information sources related to the task of the query; and The high-level planning agent training model outputs a high-level plan comprising a plurality of steps and information required to complete the plurality of steps; The query and the high-level plan are received by a detailed planning agent, the detailed planning agent comprising one or more detailed planning agent training models, wherein: The detailed planning agent is operable to automatically generate a detailed planning agent prompt comprising the plurality of steps, a plurality of tools, and one or more parameters for each of the plurality of tools; and The detailed planning agent outputs a detailed plan comprising the plurality of steps and, for each step, one or more of the plurality of tools and one or more parameters for each of the one or more tools; The query and the detailed plan are received by an action agent, the action agent comprising an action agent training model, wherein: The action agent is operable to automatically generate an action agent prompt comprising a function call for each of the one or more tools in the plurality of steps and one or more parameters for each of the one or more tools in the plurality of steps; The action agent produces an execution output comprising information produced by the function call for the one or more tools in the plurality of steps; and The query and the execution output are received by a writing agent, wherein the writing agent outputs a description of a result of completion of the task represented by the query.
9. The computing device of claim 8, wherein, The high-level planning agent prompt further comprises one or more application programming interfaces and the plurality of tools.
10. The computing device of claim 8, wherein, The detailed planning agent prompt further comprises one or more one-off examples.
11. The computing device of claim 8, wherein, The action agent is further operable to validate the one or more parameters.
12. The computing device of claim 11, wherein, Validation of the one or more parameters is based on rules.
13. The computing device of claim 11, wherein, Validation of the one or more parameters is done by a validation training model.
14. The computing device of claim 11, wherein, The action agent is further operable to filter execution results to generate the execution output.
15. A system for automatically completing a task, the system comprising: a high-level planning agent comprising a high-level planning agent training model, the high-level planning agent receiving a query related to the task and outputting a high-level plan comprising a plurality of steps and information required to complete the plurality of steps; a detailed planning agent comprising one or more detailed planning agent training models, the detailed planning agent receiving the query and the high-level plan and outputting a detailed plan comprising the plurality of steps and one or more tools for each step and one or more parameters for each of the one or more tools; an action agent comprising an action agent training model, the action agent receiving the query and the detailed plan and executing a function call for each of the one or more tools in the plurality of steps and producing an execution output comprising information produced by the function call for the one or more tools in the plurality of steps; and a writing agent comprising a writing agent training model, the writing agent receiving the query and the execution output and outputting a description of a result of completion of the task represented by the query.
16. The system of claim 15, wherein, the high-level planning agent is operable to automatically generate a high-level planning agent prompt requesting a plurality of steps to complete the task and one or more sources of information related to the task of the query.
17. The system of claim 16, wherein, the high-level planning agent prompt further comprises one or more application programming interfaces and a plurality of tools.
18. The system of claim 15, wherein, the detailed planning agent is operable to automatically generate a detailed planning agent prompt comprising the plurality of steps, a plurality of tools, and one or more parameters for each of the plurality of tools.
19. The system of claim 18, wherein, the detailed planning agent prompt further comprises one or more one-off examples.
20. The system of claim 15, wherein, the action agent is operable to automatically generate an action agent prompt comprising a function call for each of the one or more tools in the plurality of steps and one or more parameters for each of the one or more tools in the plurality of steps.