A multi-objective question answering enhancement method based on large language model agent

By building a multi-objective task question and answer model, the problem that LLMAgent cannot handle multiple complex tasks is solved, and the support for multi-objective tasks is achieved, and the authenticity and logic of the output information are improved.

CN118152515BActive Publication Date: 2025-02-11BEIJING ZHONGKE RUITU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410279346.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-12
Publication Date
2025-02-11
Estimated Expiration
2044-03-12

AI Technical Summary

Technical Problem

The existing agents based on large language models (LLMAgents) only support the execution of a single target, cannot handle multiple complex tasks, and the generated information has problems of authenticity and logic.

Method used

By building a multi-objective task question and answer model, using a large language model agent to process multiple pending targets, decompose task content, obtain task results, and save the results to a local history library to enhance the logic and accuracy of the model.

Benefits of technology

LLMAgent supports multi-objective complex tasks, improves the authenticity, effectiveness and logic of output information, and enhances the correlation and question-and-answer accuracy between multi-objective content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118152515B_ABST
    Figure CN118152515B_ABST
Patent Text Reader

Abstract

The present application relates to a multi-objective task question-answering enhancement method based on a large language model intelligent agent, including: constructing a multi-objective task question-answering model based on a large language model intelligent agent; inputting the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents; inputting multiple task contents into the task result acquisition unit of the multi-objective task question-answering model to obtain multiple task results; inputting multiple task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed; saving the target to be processed, task content, task result and target result to the local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library. The present application supports multi-objective complex tasks, inputs historical context and document knowledge as the prior knowledge base of the current question and answer, and enhances the logic between multi-objective contents and the accuracy of question and answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of large language models, and in particular to a multi-objective task question-answering enhancement method based on a large language model intelligent agent. Background Art

[0002] The Large Language Model (LLM) can not only understand many human questions and instructions, and smoothly conduct multiple rounds of dialogue, but also demonstrates the ability to solve a variety of general problems in more and more fields. However, in order for the large language model to give an accurate answer, you also need to input a sufficiently accurate prompt. The intelligent agent based on the large language model (LLMAgent) uses the large language model as the core brain of the intelligent agent, decomposes complex tasks by pre-defining prompts and encapsulating them, and makes autonomous decisions in each sub-step, so that problems can be solved without user participation. However, the current LLMAgent only supports the execution of a single goal, cannot handle multiple complex tasks, and there are problems with the authenticity and logic of the generated information.

[0003] Therefore, how to make LLMAgent support the execution of multi-objective complex tasks and effectively improve the authenticity, effectiveness and logic of the output answers to questions is a technical problem that needs to be solved. Summary of the invention

[0004] The present application intends to provide a multi-objective task question-answering enhancement method, device, electronic device and storage medium based on a large language model intelligent agent. The technical problem to be solved is achieved through the following technical solution.

[0005] In a first aspect of this embodiment, a multi-objective task question answering enhancement method based on a large language model agent is proposed, comprising:

[0006] Get multiple pending targets;

[0007] Based on the large language model agent, a multi-objective task question-answering model is constructed; the number of target processing branches of the multi-objective task question-answering model corresponds to the number of the targets to be processed;

[0008] Inputting the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents of the target to be processed;

[0009] Inputting a plurality of task contents into the task result acquisition unit of the multi-objective task question-answering model to obtain corresponding multiple task results;

[0010] Inputting a plurality of the task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed;

[0011] The target to be processed, the task content, the task result and the target result are saved in a local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library.

[0012] Furthermore, the multi-objective task question answering model also includes a local knowledge base.

[0013] Furthermore, inputting the target to be processed into the task decomposition unit of the multi-target task question-answering model also includes inputting relevant historical data of the local history library and relevant knowledge data of the local knowledge library into the task decomposition unit.

[0014] Furthermore, multiple task contents of the target to be processed are obtained, including:

[0015] According to the target to be processed, respectively obtaining the relevant historical data and the relevant knowledge data;

[0016] According to the relevant historical data, the relevant knowledge data and the target to be processed, based on the predefined target task decomposition template, determine the target task decomposition prompt; wherein the target task decomposition prompt includes role description, background description, constraint definition and reference case;

[0017] According to the target task decomposition Prompt, multiple task contents of the target to be processed are obtained.

[0018] Furthermore, obtaining the relevant historical data according to the target to be processed includes: using a correlation search algorithm to query and obtain the relevant historical data sorted from high to low in terms of correlation with the target to be processed; the correlation search algorithm includes a K-nearest neighbor algorithm.

[0019] Furthermore, inputting a plurality of the task contents into the task result acquisition unit of the multi-objective task question-answering model also includes inputting the relevant knowledge data into the task result acquisition unit.

[0020] Further, inputting a plurality of the task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed includes:

[0021] Determine the target result prompt based on the predefined target result template;

[0022] According to the target result Prompt, a plurality of the task results are summarized to generate the target result corresponding to the target to be processed.

[0023] In a second aspect of this embodiment, a multi-objective task question answering enhancement device based on a large language model agent is proposed, comprising:

[0024] A target acquisition module to be processed is configured to acquire a plurality of targets to be processed;

[0025] A multi-objective task question-answering model construction module is configured to construct a multi-objective task question-answering model based on a large language model agent; the number of target processing branches of the multi-objective task question-answering model corresponds to the number of targets to be processed;

[0026] A multi-task decomposition module is configured to input the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents of the target to be processed;

[0027] A multi-task result acquisition module is configured to input a plurality of the task contents into a task result acquisition unit of the multi-objective task question-answering model to obtain corresponding multiple task results;

[0028] A target result acquisition module is configured to input a plurality of the task results into the target result unit of the multi-target task question-answering model to obtain a target result corresponding to the target to be processed;

[0029] A local history library module is configured to save the to-be-processed target, the task content, the task result and the target result to the local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library.

[0030] In a third aspect of this embodiment, an electronic device is proposed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the multi-objective task question-answering enhancement method based on a large language model agent as described in the first aspect are implemented.

[0031] In a fourth aspect of this embodiment, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the multi-objective task question-answering enhancement method based on a large language model agent as described in the first aspect are implemented.

[0032] The embodiments of the present application include the following advantages:

[0033] The multi-objective task question-answering enhancement method based on a large language model agent provided in the embodiment of the present application first constructs a multi-objective task question-answering model based on a large language model agent; inputs the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents; inputs multiple task contents into the task result acquisition unit of the multi-objective task question-answering model to obtain multiple task results; inputs multiple task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed; saves the target to be processed, task content, task result and target result to the local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library. The present application supports multi-objective complex tasks, inputs historical context and document knowledge as the prior knowledge base of the current question and answer, and enhances the logic between multi-objective contents and the accuracy of question and answer. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is one of the flow charts of the multi-objective task question answering enhancement method based on a large language model agent in an embodiment of the present application;

[0035] Figure 2 This is the second flow chart of the multi-objective task question answering enhancement method based on a large language model agent in an embodiment of the present application;

[0036] Figure 3 This is the third flow chart of the multi-objective task question answering enhancement method based on a large language model agent in an embodiment of the present application;

[0037] Figure 4 2 is a schematic diagram of the structure of a multi-objective task question-answering enhancement device based on a large language model agent according to an embodiment of the present application;

[0038] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0040] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0041] As described in the background technology, with the successful launch of OpenAI's large language model ChatGPT[1], large language models (LLMs) can not only understand many human questions and instructions, and smoothly conduct multiple rounds of dialogue, but also show the ability to solve a variety of general problems in more and more fields. Although large language models have sufficient intelligence, in order for them to give accurate answers, they still need to input sufficiently accurate prompts. A person who knows the prompt and an ordinary person will get very different answers when asking questions using the same large model. Therefore, an intelligent agent based on a large language model (LLMAgent) has emerged. The language model is used as the core brain of the intelligent agent. By encapsulating the prompt, complex tasks are decomposed, and autonomous decisions are made in each sub-step, so that problems can be solved without user participation. However, currently LLMAgent only supports the execution of a single goal and cannot handle multiple complex tasks. In addition, due to the "illusion problem" of the large model itself, that is, the authenticity and logic of the generated information, the results generated by LLMAgent also have these problems. Therefore, how to make LLMAgent support the execution of multi-target complex tasks and effectively improve the authenticity, effectiveness and logic of Agent output information is one of the primary problems faced by LLMAgent. Existing technical solutions usually adopt two methods to achieve complex target task processing: (1) Using multiple rounds of dialogue to call the large model multiple times to enable users to learn multiple input information of the same target and understand the contextual semantic logic; however, this method is inefficient and the large model returns confusion due to too much input content. At the same time, understanding complex tasks requires multiple rounds of interaction to obtain satisfactory results. (2) Using the large model intelligent agent in an integrated and autonomous manner to split, execute and summarize multiple tasks for a single target; however, this method cannot execute multiple complex targets and cannot update new knowledge or data through multiple rounds of question and answer.

[0042] Therefore, the embodiments of the present application provide new ideas and methods for improving LLMAgent's ability to handle complex tasks and enhancing the authenticity, effectiveness and logic of output information, so that LLMAgent can support the execution of multi-target complex tasks and enhance the effectiveness and logic of LLMAgent's output information.

[0043] Embodiment 1:

[0044] like Figure 1 As shown, it is a flowchart of a multi-objective task question answering enhancement method based on a large language model agent in an embodiment of the present application, and the method includes:

[0045] S101: Acquire multiple targets to be processed.

[0046] S102: Based on the large language model agent, a multi-objective task question-answering model is constructed; the number of target processing branches of the multi-objective task question-answering model corresponds to the number of the targets to be processed.

[0047] S103: Input the target to be processed into the task decomposition unit of the multi-target task question-answering model to obtain multiple task contents of the target to be processed.

[0048] S104: Input multiple task contents into the task result acquisition unit of the multi-objective task question-answering model to obtain corresponding multiple task results.

[0049] S105: Input a plurality of the task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed.

[0050] S106: Save the target to be processed, the task content, the task result and the target result to the local history library of the multi-objective task question and answer model, so as to enhance the target result of the multi-objective task question and answer model based on the local history library.

[0051] In some embodiments, the multi-objective task question answering model also includes a local knowledge base.

[0052] In some embodiments, inputting the target to be processed into the task decomposition unit of the multi-target task question-answering model also includes inputting relevant historical data of the local history library and relevant knowledge data of the local knowledge library into the task decomposition unit.

[0053] In some embodiments, multiple task contents of the target to be processed are obtained, such as Figure 2 As shown, including:

[0054] S211: According to the target to be processed, respectively obtain the relevant historical data and the relevant knowledge data.

[0055] S212: Determine a target task decomposition prompt based on the relevant historical data, the relevant knowledge data and the target to be processed and based on a predefined target task decomposition template; wherein the target task decomposition prompt includes a role description, a background description, a constraint definition and a reference case.

[0056] Specifically, use relevant documents, historical conversations, and goals to form a specific decomposition task prompt, and use the assembled prompt. In one implementation, the prompt can be in markdown format, which is mainly divided into four parts. The first part sets the role, which is mainly used to set the AI ​​role to better handle professional field tasks; the second part is the background description, which mainly adds relevant document fragments to tell the big model the context information of the decomposition task; the third part is the restriction constraint, which mainly constrains the number of output tasks, the output format, etc.; the fourth part is the reference case, which will give some reference cases. Finally, use the assembled prompt as the system message, assemble the historical conversation into the form of Assistant and User, call the big model to decompose the target, and the decomposition mechanism will provide logic in the case to query the target content, query other information of the target, and summarize the above content to complete the target task. For example: the target is "Introduction to the NBA Rockets", and the provided cases are: ["Query the information of the Rockets", "Query the historical record of the Rockets", "Write the introduction of the Rockets"]. The decomposed target is used as a subtask, and the subtask is processed through a specific process. The specific process here is that there is a sequence. When decomposing tasks, there is a sequence between tasks. After the previous tasks are completed, the final task can be completed.

[0057] S213: Obtain multiple task contents of the target to be processed according to the target task decomposition Prompt.

[0058] In some embodiments, obtaining the relevant historical data based on the target to be processed includes: using a correlation search algorithm to query and obtain the relevant historical data sorted from high to low in terms of correlation with the target to be processed; the correlation search algorithm includes a K-nearest neighbor algorithm.

[0059] In some embodiments, inputting a plurality of the task contents into the task result acquisition unit of the multi-objective task question-answering model also includes inputting the relevant knowledge data into the task result acquisition unit.

[0060] In some embodiments, multiple task results are input into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed, such as Figure 3 As shown, including:

[0061] S311: Determine the target result Prompt based on the predefined target result template.

[0062] S312: According to the target result Prompt, a plurality of the task results are aggregated to generate the target result corresponding to the target to be processed.

[0063] Specifically, in multi-target scenarios, the task name and task execution results of each target are vectorized and stored in the local history library. This part of the content is only effective in this conversation. After the user enters a new target, the above similarity search algorithm, such as the K-nearest neighbor algorithm, will query the tasks and task results with high relevance and hand them over to the big model for understanding. This will enhance the relevance in multi-target scenarios.

[0064] The following is an example of making a travel plan to Sanya to illustrate the effect of the technical solution of this embodiment. The large language model agent before the improvement supports a single goal. For example, to make a travel plan to Sanya, the conventional practice is to follow [What are the fun places in Sanya? ], [What are the suitable indoor attractions in Sanya? ], [What are the transportation to Sanya? ], these three questions need to set three goals to complete. Finally, the user summarizes the information himself. The improved model based on the large language model agent can support multiple goals in one topic. For example, it only needs to complete the three questions [What are the fun places in Sanya? ], [What are the suitable indoor attractions in Sanya? ], and [What are the transportation to Sanya? ] in one topic. At the same time, the agent can finally refer to the results of the above three questions to complete a complete travel plan. The model before the improvement does not have a top-down association between goals and goals. For example, in a topic, to complete the travel plan from Beijing to Sanya through dialogue, we will ask: What are the flights from Beijing to Sanya? What are the fun places in Sanya? What is the weather in Sanya? What is the most economical way to travel? If there is no contextual understanding of several questions, there will be problems such as inaccurate task decomposition and missing key information. The improved model uses the historical database to establish associations between goals. For example, after using historical data, continue to use the above four questions, the output results will be related, and the accuracy of problem understanding will be greatly improved.

[0065] The multi-objective task question-answering enhancement method based on a large language model agent provided in the embodiment of the present application first constructs a multi-objective task question-answering model based on a large language model agent; inputs the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents; inputs multiple task contents into the task result acquisition unit of the multi-objective task question-answering model to obtain multiple task results; inputs multiple task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed; saves the target to be processed, task content, task result and target result to the local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library. The present application supports multi-objective complex tasks, inputs historical context and document knowledge as the prior knowledge base of the current question and answer, and enhances the logic between multi-objective contents and the accuracy of question and answer.

[0066] Embodiment 2:

[0067] Figure 4 Schematic diagram of a multi-objective task question answering enhancement device based on a large language model agent provided in an embodiment of the present application. Figure 4 As shown, the multi-objective task question answering enhancement device based on a large language model intelligent agent includes:

[0068] The target acquisition module 401 is configured to acquire a plurality of targets to be processed;

[0069] A multi-objective task question-answering model construction module 402 is configured to construct a multi-objective task question-answering model based on a large language model agent; the number of target processing branches of the multi-objective task question-answering model corresponds to the number of targets to be processed;

[0070] The multi-task decomposition module 403 is configured to input the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents of the target to be processed;

[0071] The multi-task result acquisition module 404 is configured to input a plurality of the task contents into the task result acquisition unit of the multi-objective task question-answering model to obtain corresponding multi-task results;

[0072] The target result acquisition module 405 is configured to input a plurality of the task results into the target result unit of the multi-target task question-answering model to obtain the target result corresponding to the target to be processed;

[0073] The local history library module 406 is configured to save the to-be-processed target, the task content, the task result and the target result to the local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library.

[0074] It should be understood that the multi-objective task question answering enhancement device based on a large language model agent in the embodiment of this specification can also execute Figures 1 to 3 A method for executing a multi-objective task question answering enhancement device based on a large language model intelligent agent in a large language model intelligent agent, and realizing a multi-objective task question answering enhancement device based on a large language model intelligent agent in Figures 1 to 3 The functions of the example shown will not be described in detail here.

[0075] At the same time, the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0076] Embodiment three:

[0077] Figure 5 Schematic diagram of an electronic device 5 provided in an embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0078] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 The electronic device 5 is merely an example and does not limit the electronic device 5 , and may include more or less components than those shown in the figure, or different components.

[0079] The memory 502 may be an internal storage unit of the electronic device 5, for example, a hard disk or memory of the electronic device 5. The memory 502 may also be an external storage device of the electronic device 5, for example, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 5. The memory 502 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device.

[0080] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 501 reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a shared resource access control device at the logical level. The processor executes the program stored in the memory, and is specifically used to perform the following operations:

[0081] Get multiple pending targets;

[0082] Based on the large language model agent, a multi-objective task question-answering model is constructed; the number of target processing branches of the multi-objective task question-answering model corresponds to the number of the targets to be processed;

[0083] Inputting the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents of the target to be processed;

[0084] Inputting a plurality of task contents into the task result acquisition unit of the multi-objective task question-answering model to obtain corresponding multiple task results;

[0085] Inputting a plurality of the task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed;

[0086] The target to be processed, the task content, the task result and the target result are saved in a local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library.

[0087] The above is as in this manual Figures 1 to 3 The multi-objective task question-answering enhancement method based on a large language model agent disclosed in the illustrated embodiment can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of this specification. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of this specification can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0088] Of course, in addition to software implementation, the electronic device of the embodiments of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0089] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0090] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0091] Embodiment 4:

[0092] The embodiment of the present specification also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figures 1 to 3 The multi-objective task question answering enhancement method based on a large language model agent of the illustrated embodiment is specifically used to perform the following method:

[0093] Get multiple pending targets;

[0094] Based on the large language model agent, a multi-objective task question-answering model is constructed; the number of target processing branches of the multi-objective task question-answering model corresponds to the number of the targets to be processed;

[0095] Inputting the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents of the target to be processed;

[0096] Inputting a plurality of task contents into the task result acquisition unit of the multi-objective task question-answering model to obtain corresponding multiple task results;

[0097] Inputting a plurality of the task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed;

[0098] The target to be processed, the task content, the task result and the target result are saved in a local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library.

[0099] In short, the above is only a preferred embodiment of this specification, and is not intended to limit the protection scope of this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the protection scope of this specification.

[0100] It should be noted that the above detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the present application belongs.

[0101] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0102] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.

[0103] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0104] For ease of description, spatially relative terms, such as "above", "above", "on the upper surface of", "above", etc., may be used herein to describe the spatial positional relationship between a device or feature and other devices or features as shown in the figure. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figure. For example, if the device in the accompanying drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" may include both "above" and "below". The device may also be positioned in other different ways, such as rotated 90 degrees or in other orientations, and the spatially relative descriptions used herein are interpreted accordingly.

[0105] In the above detailed description, reference is made to the accompanying drawings, which form a part of this document. In the accompanying drawings, similar symbols typically identify similar components unless the context indicates otherwise. The illustrated embodiments described in the detailed description, drawings, and claims are not meant to be limiting. Other embodiments may be used, and other changes may be made, without departing from the spirit or scope of the subject matter presented herein.

[0106] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A multi-objective task question answering enhancement method based on a large language model agent, characterized in that: include: Get multiple pending targets; Build a multi-objective question-answering model based on a large language model agent; The number of target processing branches of the multi-target task question-answering model corresponds to the number of targets to be processed; Inputting the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents of the target to be processed; Inputting a plurality of task contents into the task result acquisition unit of the multi-objective task question-answering model to obtain corresponding multiple task results; Inputting a plurality of the task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed; Saving the to-be-processed target, the task content, the task result and the target result to a local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library; Wherein, the multi-objective task question answering model also includes a local knowledge base; Wherein, inputting the to-be-processed target into the task decomposition unit of the multi-target task question-answering model further comprises inputting relevant historical data of the local history base and relevant knowledge data of the local knowledge base into the task decomposition unit; Among them, obtaining multiple task contents of the target to be processed includes: According to the target to be processed, respectively obtaining the relevant historical data and the relevant knowledge data; According to the relevant historical data, the relevant knowledge data and the target to be processed, based on the predefined target task decomposition template, determine the target task decomposition prompt; wherein the target task decomposition prompt includes role description, background description, constraint definition and reference case; According to the target task decomposition prompt, multiple task contents of the target to be processed are obtained; Among them, inputting a plurality of the task results into the target result unit of the multi-objective task question-answering model to obtain the target result corresponding to the target to be processed includes: Determine the target result prompt based on the predefined target result template; According to the target result Prompt, a plurality of the task results are summarized to generate the target result corresponding to the target to be processed.

2. The multi-objective task question answering enhancement method based on a large language model agent according to claim 1 is characterized in that: According to the target to be processed, the relevant historical data is obtained, including: using a correlation search algorithm to query and obtain the relevant historical data sorted from high to low in terms of correlation with the target to be processed; the correlation search algorithm includes a K-nearest neighbor algorithm.

3. The multi-objective task question answering enhancement method based on a large language model agent according to claim 1 is characterized in that: Inputting a plurality of the task contents into the task result acquisition unit of the multi-objective task question-answering model also includes inputting the relevant knowledge data into the task result acquisition unit.

4. A multi-objective task question answering enhancement device based on a large language model agent, characterized in that: include: A target acquisition module to be processed is configured to acquire a plurality of targets to be processed; A multi-objective task question-answering model construction module is configured to construct a multi-objective task question-answering model based on a large language model agent; the number of target processing branches of the multi-objective task question-answering model corresponds to the number of targets to be processed; A multi-task decomposition module is configured to input the target to be processed into the task decomposition unit of the multi-objective task question-answering model to obtain multiple task contents of the target to be processed; A multi-task result acquisition module is configured to input a plurality of the task contents into a task result acquisition unit of the multi-objective task question-answering model to obtain corresponding multiple task results; A target result acquisition module is configured to input a plurality of the task results into the target result unit of the multi-target task question-answering model to obtain a target result corresponding to the target to be processed; A local history library module, configured to save the to-be-processed target, the task content, the task result and the target result to the local history library of the multi-objective task question-answering model, so as to enhance the target result of the multi-objective task question-answering model based on the local history library; Wherein, the multi-objective task question answering model also includes a local knowledge base; Wherein, inputting the to-be-processed target into the task decomposition unit of the multi-target task question-answering model further comprises inputting relevant historical data of the local history base and relevant knowledge data of the local knowledge base into the task decomposition unit; Among them, the multi-task decomposition module is specifically used for: According to the target to be processed, respectively obtaining the relevant historical data and the relevant knowledge data; According to the relevant historical data, the relevant knowledge data and the target to be processed, based on the predefined target task decomposition template, determine the target task decomposition prompt; wherein the target task decomposition prompt includes role description, background description, constraint definition and reference case; According to the target task decomposition prompt, multiple task contents of the target to be processed are obtained; Among them, the target result acquisition module is specifically used for: Determine the target result prompt based on the predefined target result template; According to the target result Prompt, a plurality of the task results are summarized to generate the target result corresponding to the target to be processed.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When executing the computer program, the processor implements the steps of the multi-objective task question answering enhancement method based on a large language model agent as described in any one of claims 1 to 3.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the multi-objective task question answering enhancement method based on a large language model agent as described in any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Knowledge question-answering method and device, equipment and storage medium

    CN116737908A

  • Intelligent question and answer method and device and related equipment

    CN117216222A