Inference process determination method and device based on large language model, equipment and medium
By collaborating with the master control agent and the intent orchestration agent, and combining a multi-dimensional information database, the accuracy problem of reasoning systems in existing technologies is solved, achieving accurate reasoning results and processing flow, and improving the accuracy of reasoning conclusions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ULTRAPOWER SOFTWARE
- Filing Date
- 2024-07-26
- Publication Date
- 2026-05-15
AI Technical Summary
Existing reasoning systems based on large language models cannot output accurate reasoning results or execute accurate processing procedures, resulting in inaccurate reasoning conclusions.
Through the collaborative cooperation of the master control agent and the intent orchestration agent, intent recognition, process reasoning, process orchestration and process verification are performed. Combined with a multi-dimensional information database, the process is processed and accurate reasoning conclusions are output.
It achieves accurate intent recognition and process processing of natural language, improving the accuracy of reasoning conclusions and processing flow.
Smart Images

Figure CN118861296B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of technology, and in particular to a method, apparatus, device, and medium for determining reasoning flow based on a large language model. Background Technology
[0002] The technology of building application systems based on large-scale language models refers to using pre-trained large-scale language models as the core component of artificial intelligence systems, in conjunction with intelligent agents, to perform reasoning on natural language and thus output reasoning conclusions.
[0003] Currently, the technology of building application systems based on LLM large language models has been widely used in the industry. However, in related technologies, it is impossible to obtain accurate reasoning results and execute accurate processing procedures, thus failing to output accurate reasoning conclusions. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method, apparatus, device and medium for determining the reasoning process based on a large language model, so as to obtain accurate reasoning results and execute accurate processing flow, thereby outputting accurate reasoning conclusions.
[0005] In a first aspect, embodiments of the present invention provide a method for determining a reasoning flow based on a large language model, applicable to a large language model. The large language model is deployed with a pre-built intelligent agent autonomous system, which includes a master intelligent agent and an intent orchestration intelligent agent. The method includes: acquiring natural language to be processed; inputting the natural language to be processed into a pre-trained large language model; the master intelligent agent performing intent recognition and flow reasoning on the natural language to be processed to obtain a reasoning result; the intent orchestration intelligent agent performing flow orchestration and flow verification based on the reasoning result to obtain a processing flow; and the large language model performing flow processing and intent reasoning based on the processing flow to obtain and output a reasoning conclusion.
[0006] In a preferred embodiment of the present invention, the intent orchestration agent performs process orchestration and process verification based on the inference results to obtain a processing flow, including: the intent orchestration agent determines the business type and process type of the task to be processed based on the inference results; the intent orchestration agent performs process orchestration based on the business type and process type, combined with a pre-set multi-dimensional information database, to obtain an initial processing flow; the multi-dimensional information database includes at least one of the following: knowledge graph associated entity relationship attribute information, rule base associated information, historical database associated information, code base associated information, and plugin library associated information; the inference results are verified based on the initial processing flow to obtain the processing flow.
[0007] In a preferred embodiment of the present invention, the above-mentioned process verification of the inference result based on the initial processing flow to obtain the processing flow includes: the intention orchestration agent verifying the validity of the initial processing flow; if the processing flow is invalid, the intention orchestration agent generates invalid information and obtains the processing flow based on the invalid information and the inference result; if the initial processing flow is valid, the intention orchestration agent uses the initial processing flow as the processing flow.
[0008] In a preferred embodiment of the present invention, the above-mentioned processing flow based on invalid information and reasoning results includes: the intention orchestration agent correcting the reasoning results based on invalid information to obtain corrected reasoning results; and the intention orchestration agent performing process orchestration and process verification based on the corrected reasoning results to obtain the processing flow.
[0009] In a preferred embodiment of the present invention, after the intent orchestration agent performs process orchestration and process verification based on the reasoning results and obtains the processing flow, the method further includes: if the intent orchestration agent encounters an error during the process orchestration, or if the generated processing flow has an error, an error report is generated and fed back to the master control agent; the master control agent performs process reasoning again based on the error report, historical cases, reasoning templates, and prompt word set to obtain a corrected reasoning result, which is then used by the intent orchestration agent to perform process orchestration again based on the corrected reasoning result.
[0010] In a preferred embodiment of the present invention, the large language model includes sub-task agents; the processing flow includes: the correspondence between sub-task agents and inference tasks; the large language model performs process processing and intent inference based on the processing flow to obtain and output inference conclusions, including: task allocation based on the processing flow to determine the inference task corresponding to the sub-task agent; the sub-task agent processes the corresponding inference task to obtain the processing result.
[0011] In a preferred embodiment of the present invention, after task allocation based on the processing flow and determining the reasoning task corresponding to the sub-task agent, the method further includes: if there is a reasoning task that the sub-task agent cannot solve, the sub-task agent processes the unsolvable reasoning sub-task based on a pre-set external information database to obtain a processing result; the master control agent obtains and outputs a reasoning conclusion based on the processing result.
[0012] Secondly, embodiments of the present invention also provide a reasoning process determination device based on a large language model, comprising: an application to a large language model, wherein the large language model is deployed with a pre-built intelligent agent autonomous system, the intelligent agent autonomous system including a master control agent and an intent orchestration agent; the device comprising: a natural language acquisition module for acquiring the natural language to be processed, inputting the natural language to be processed into the pre-trained large language model, wherein the master control agent performs intent recognition and process reasoning on the natural language to be processed to obtain a reasoning result; a process orchestration and verification module for the intent orchestration agent to perform process orchestration and process verification based on the reasoning result to obtain a processing flow; and a reasoning conclusion output module for the large language model to perform process processing and intent reasoning based on the processing flow to obtain and output a reasoning conclusion.
[0013] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the reasoning flow determination method based on a large language model described in the first aspect.
[0014] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the reasoning flow determination method based on a large language model described in the first aspect.
[0015] The embodiments of the present invention bring the following beneficial effects:
[0016] This invention provides a method, apparatus, device, and medium for determining inference flow based on a large language model. The large language model is deployed with a pre-built autonomous intelligent agent system, which includes a master intelligent agent and an intent orchestration intelligent agent. By acquiring the natural language to be processed and inputting it into the pre-trained large language model, the master intelligent agent performs intent recognition and flow reasoning on the natural language to be processed, obtaining a reasoning result. The intent orchestration intelligent agent performs flow orchestration and flow verification based on the reasoning result, obtaining a processing flow. The large language model performs flow processing and intent reasoning based on the processing flow, obtaining and outputting a reasoning conclusion. In this method, through the collaborative cooperation of the master intelligent agent and the intent orchestration intelligent agent in the autonomous intelligent agent system, intent recognition, flow reasoning, flow orchestration, flow verification, and flow processing of the natural language to be processed are achieved. This results in accurate reasoning results and executes precise processing flows, thereby outputting accurate reasoning conclusions and improving the accuracy of the reasoning conclusions.
[0017] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0018] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a method for determining the reasoning process based on a large language model, provided as an embodiment of the present invention;
[0021] Figure 2 A logic diagram for intention reasoning in an intelligent agent autonomous system provided in an embodiment of the present invention;
[0022] Figure 3 A logic diagram for intention reasoning in another intelligent agent autonomous system provided in an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of a reasoning process determination device based on a large language model provided in an embodiment of the present invention;
[0024] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] All other embodiments obtained by a person skilled in the art without creative effort are within the scope of protection of this invention.
[0027] The technology of building application systems based on large-scale language models refers to using pre-trained large-scale language models as the core component of artificial intelligence systems, in conjunction with intelligent agents, to perform reasoning on natural language and thus output reasoning conclusions.
[0028] Currently, the technology of building application systems based on LLM large language models has been widely used in the industry. However, in related technologies, it is impossible to obtain accurate reasoning results and execute accurate processing procedures, thus failing to output accurate reasoning conclusions.
[0029] Specifically, in a computing network operation and maintenance solution based on the LLM large model, this is used in the cloud fault root cause analysis (RCA) task. By fine-tuning the GPT model to generate text from event summaries to root causes and mitigation measures (treatment actions), data can be collected in the production environment without needing to collect data. However, the following issues exist:
[0030] (1) The above technical solutions rely heavily on the computationally expensive fine-tuning of LLM to adapt to cloud system tasks in actual system applications, and do not make full use of the generalization and reasoning capabilities of LLM.
[0031] (2) The above technical solutions cannot be synchronously perceived and comprehensively considered in the reasoning when the new computing network environment changes.
[0032] (3) The above technical solutions are all based on Microsoft's internal GPT series and solutions, and do not address the data privacy issues related to using LLM with cloud system data. Specifically, the potential security risks of transferring data from the cloud production environment to external APIs (such as ChatGPT) may pose problems for many ICT companies. In addition, none of the above solutions fully utilize the autonomous capabilities of LLM for information gathering, decision-making, and environmental interaction.
[0033] Based on this, the present invention provides a method, apparatus, device and medium for determining reasoning flow based on a large language model. Through the collaborative cooperation of the master control agent and the intent orchestration agent in the intelligent agent autonomous system, it realizes intent recognition, flow reasoning, flow orchestration, flow verification and flow processing of the natural language to be processed. It can obtain accurate reasoning results and execute accurate processing flow, thereby outputting accurate reasoning conclusions and improving the accuracy of reasoning conclusions.
[0034] To facilitate understanding of this embodiment, a detailed description of the reasoning process determination method based on a large language model disclosed in this embodiment of the invention will be provided first.
[0035] Example 1
[0036] This invention provides a method for determining inference flow based on a large language model. The method is applied to a large language model that has a pre-built autonomous agent system deployed on it. The autonomous agent system includes a controlling agent and an intent orchestration agent. Figure 1 This is a flowchart illustrating a method for determining the reasoning process based on a large language model, provided as an embodiment of the present invention. Figure 1 As shown, the method for determining the reasoning process based on a large language model may include the following steps:
[0037] Step S101: Obtain the natural language to be processed. Input the natural language to be processed into a pre-trained large-scale language model. The main control agent performs intent recognition and process reasoning on the natural language to be processed to obtain the reasoning result.
[0038] The natural language to be processed can be natural language actively input by the user according to their own intentions and needs, that is, the natural language to be processed can contain the user's intentions and needs.
[0039] Specifically, the master control agent performs intent recognition and process reasoning on the natural language to be processed, and obtains the reasoning result. This may include: the master control agent performs intent recognition and process reasoning on the natural language to be processed based on historical cases in a large language model, pre-set reasoning templates, and pre-generated prompt word sets, and obtains the reasoning result.
[0040] The reasoning results may include: the associated actions corresponding to the task intent, the processing tools associated with the task intent, the key processing points and precautions corresponding to the task intent.
[0041] Specifically, intent reasoning is performed by considering the associated actions, processing tools, key processing points, and precautions corresponding to the task intent. This enables the intent orchestration agent to orchestrate the task flow, improving the accuracy of flow orchestration and, consequently, the accuracy of intent reasoning.
[0042] Among them, the master intelligent agent bears a more significant responsibility for computing power. Therefore, the master intelligent agent is a large-scale intelligent agent with a greater demand for computing resources and data storage. The master intelligent agent has higher processing capabilities, enabling it to process information, make decisions, and execute actions faster. It can cope with more complex environments and tasks, improving the overall performance and response speed of the system.
[0043] The master control agent, based on its own performance and functions, uses a large language model to perform intent recognition and process reasoning on the natural language to be processed, and obtains the reasoning results.
[0044] The reasoning results may include the user's intent in the natural language representation to be processed, the associated actions corresponding to the intent, the processing tools associated with the intent, the key processing points and precautions corresponding to the intent.
[0045] In step S102, the intent orchestration agent performs process orchestration and process verification based on the inference results to obtain the processing flow.
[0046] Among them, the intention orchestration agent does not need to bear too much computing power responsibility, but only needs to complete its assigned tasks. Therefore, the intention orchestration agent can be a small to medium-sized agent, reducing the burden on the server and storage space.
[0047] Among them, the intent orchestration agent can obtain the initial processing flow by orchestrating the associated actions and processing tools in the reasoning results. After verifying the reasoning results based on the initial processing flow, the final processing flow is obtained.
[0048] Step S103: The large language model performs process processing and intent reasoning based on the processing flow, and obtains and outputs the reasoning conclusion.
[0049] The large-scale language model performs process processing and intent reasoning based on the processing flow, and obtains and outputs reasoning conclusions, which may include: obtaining processing results by processing the process flow; obtaining reasoning conclusions by performing intent reasoning based on the processing results; and outputting reasoning conclusions by the large-scale language model.
[0050] The controlling agent performs intent reasoning based on its own performance and functional reference processing results to arrive at a reasoning conclusion. The processing result can be, for example, the problem analysis result corresponding to the natural language to be processed. The reasoning conclusion is the problem-solving measure derived based on this problem analysis result.
[0051] Optionally, a large language model may include at least one sub-task agent; the processing flow obtained in step S102 may include the correspondence between sub-task agents and inference tasks. The large language model performs process processing and intent inference based on the processing flow, obtaining and outputting inference conclusions, which may include: task allocation based on the processing flow to determine the inference task corresponding to the sub-task agent; the sub-task agent processing the corresponding inference task to obtain processing results; and the master agent obtaining and outputting inference conclusions based on the processing results.
[0052] The subtask agents can include: data processing agents, problem analysis agents, policy generation agents, and execution processing agents, etc.
[0053] Specifically, tasks can be allocated based on the correspondence between sub-task agents and inference tasks included in the processing flow, thereby determining the inference task corresponding to the sub-task agent.
[0054] Among them, the sub-task agent processes the reasoning task through its own performance and functions, and obtains the corresponding processing results.
[0055] The method further includes, after assigning tasks based on the processing flow and determining the reasoning tasks corresponding to the sub-task agents, if there are reasoning tasks that the sub-task agents cannot solve, then the sub-task agents process the unsolvable reasoning sub-tasks based on a pre-set external information database to obtain the processing results.
[0056] The external information base can include: real-time perception data, rule base, template base, knowledge graph, database, code base, and plugin base, etc. The subtask agent can directly search through the external information base to solve the corresponding reasoning task.
[0057] Furthermore, the sub-task agent can learn independently through an external information database, thereby solving the corresponding reasoning task.
[0058] Specifically, the autonomous intelligent agent system also includes: an observation head, whereby the master intelligent agent performs intent reasoning based on the processing results, and the reasoning conclusion may include: the observation head performing feature extraction processing on the processing results to obtain result features.
[0059] The observation head receives the processing results and determines whether the data format of the processing results is recognizable and understandable by the main control agent based on the environmental information required by the main control agent. If it is determined that the main control agent cannot recognize and understand the data, the processing results can be normalized and then feature extracted to obtain the result features. These result features are the processing results that the main control agent can recognize and understand.
[0060] The reasoning process determination method based on a large language model provided in this invention achieves intent recognition, process reasoning, process orchestration, process verification, and process processing of the natural language to be processed through the collaborative cooperation of the master control agent and the intent orchestration agent in the intelligent agent autonomous system. It can obtain accurate reasoning results and execute accurate processing processes, thereby outputting accurate reasoning conclusions and improving the accuracy of reasoning conclusions.
[0061] Example 2
[0062] This invention also provides another method for determining the inference flow based on a large language model. This method is implemented based on the method described in the above embodiments. The method focuses on the specific implementation of the intent orchestration agent performing flow orchestration and verification based on the inference results to obtain the processing flow. The intent orchestration agent performing flow orchestration and verification based on the inference results to obtain the processing flow may include the following steps:
[0063] Step S201: The intent orchestration agent determines the business type and process type of the task to be processed based on the reasoning results.
[0064] Among them, the business type can be, for example, the operation and maintenance optimization business type, and the process type can be, for example, the computing power responsible for balancing the process type.
[0065] In step S202, the intent orchestration agent orchestrates the process based on the business type and process type, combined with a pre-set multi-dimensional information database, to obtain the initial processing flow.
[0066] The multi-dimensional information base can include: knowledge graph associated entity relationship attribute information, rule base associated information, template base associated information, observation data associated information, historical database associated information, code base associated information, and plugin base associated information.
[0067] Among them, the intent reasoning agent can perform process orchestration based on its own performance and functions, combined with a multi-dimensional information database according to business type and process type, to obtain the initial processing flow.
[0068] Step S203: Based on the initial processing flow, the reasoning results are verified to obtain the processing flow.
[0069] Specifically, the process of verifying the inference result based on the initial processing flow to obtain the processing flow may include: the intent orchestration agent verifying the validity of the initial processing flow; if the processing flow is invalid, the intent orchestration agent generates invalid information and obtains the processing flow based on the invalid information and the inference result; if the initial processing flow is valid, the intent orchestration agent uses the initial processing flow as the processing flow.
[0070] When errors occur due to invalid processing flow, the intent orchestration agent supplements the erroneous part of the flow based on invalid information and reasoning results, thereby improving the accuracy and completeness of intent reasoning.
[0071] The process based on invalid information and reasoning results includes: the intent orchestration agent corrects the reasoning results based on invalid information to obtain corrected reasoning results; the intent orchestration agent performs process orchestration and process verification based on the corrected reasoning results to obtain the processing flow.
[0072] Step S204: If the intended orchestration agent encounters an error during the process of orchestrating the process, or if the generated processing flow has an error, an error report is generated and fed back to the master control agent.
[0073] In step S205, the main control agent performs process reasoning again based on the error report to obtain the corrected reasoning result.
[0074] Step S206: The intention orchestration agent re-orchestrates the process based on the corrected inference results to obtain the processing flow.
[0075] For ease of understanding, Figure 2 This is a logic diagram illustrating intent reasoning in an autonomous intelligent agent system provided in an embodiment of the present invention. (See diagram below.) Figure 2 As shown, the master control agent uses inference templates, prompt word sets, and historical cases to perform intent recognition and process inference to obtain inference results from the natural language to be processed. The intent orchestration agent uses the inference results to orchestrate and verify the process to obtain the processing flow. Regarding process verification, the intent orchestration agent determines the business type and process type, and combines a multi-dimensional information database to orchestrate the process to obtain an initial processing flow. If the initial processing flow is valid, it is used as the target processing flow. If the initial processing flow is invalid, the intent orchestration agent corrects the inference results using invalid information and performs intent orchestration again. Based on the processing flow, task allocation determines the inference tasks corresponding to the sub-task agents. If a sub-task agent can solve its corresponding inference task, it processes the inference task to obtain a processing result. If a sub-task agent cannot solve its corresponding inference task, it processes the unsolvable inference sub-task using an external information database to obtain a processing result.
[0076] The observation head receives the processing results and determines whether the data format of the processing results is a format that the main control agent can recognize and understand based on the environmental information required by the main control agent. If it is determined that the main control agent cannot recognize and understand the data, the head processes the processing results to obtain the result features and sends them to the main control agent for the main control agent to perform intent reasoning.
[0077] The inference process determination method based on a large language model provided in this invention involves an intent orchestration agent determining the business type and process type of the task to be processed based on the inference results. The intent orchestration agent then orchestrates the process based on the business type and process type, combined with a pre-set multi-dimensional information database, to obtain an initial processing flow. Finally, the inference results are validated based on this initial processing flow to obtain the final processing flow. This method improves the accuracy of the processing flow through process orchestration and inference, resulting in a more accurate executed processing flow and improved accuracy of the inference conclusions.
[0078] Example 3
[0079] For ease of understanding, Figure 3 A logic diagram for intent reasoning in another intelligent agent autonomous system provided in an embodiment of the present invention. For example... Figure 3 As shown, the master control agent performs intent recognition, process reasoning, and process decomposition on the natural language to be processed, obtaining the reasoning result and the decomposed process; the task creation agent creates tasks based on the decomposed process, obtaining the decomposed tasks. If the task creation agent encounters an error during the task creation process, it reports the error to the master control agent.
[0080] The intent orchestration agent obtains the processing flow by orchestrating and validating the process based on the inference results and decomposed tasks. Regarding process validation, the intent orchestration agent determines the business type and process type, and orchestrates the process using a multi-dimensional information database to obtain an initial processing flow. It then determines whether the initial processing flow is valid. If valid, the initial processing flow is adopted as the processing flow; if invalid, the intent orchestration agent corrects the inference results using invalid information and re-orchestrate the process.
[0081] The system determines if the initial processing flow is erroneous. If so, the intent orchestration agent generates an error report and sends it back to the master agent. If the flow is error-free, the task scheduling and execution agent can call the corresponding specialized agent to handle the flow. The specialized agent then allocates tasks based on the flow, determining the inference tasks corresponding to the sub-task agents. If the sub-task agent can solve the corresponding inference task, it processes the task to obtain a result. If the sub-task agent cannot solve the task, it uses an external database to process the unsolvable inference sub-task and obtain a result. The observation and perception system checks the correctness of the processing results. If the result is correct, the observation head receives the result, processes it to obtain result features, and sends them to the master agent for intent inference.
[0082] The reasoning process determination method based on a large language model provided in this invention realizes intent recognition, process reasoning, process decomposition, process orchestration, and process processing of natural language to be processed through the division of labor and cooperation of multiple intelligent agents. This improves the accuracy and rationality of intent reasoning in the autonomous system of intelligent agents, solves the illusion problem that occurs in the reasoning process, and improves the accuracy of reasoning conclusions.
[0083] Example 4
[0084] Corresponding to the above method embodiments, this invention provides a reasoning flow determination device based on a large language model, applied to a large language model. The large language model is deployed with a pre-built intelligent agent autonomous system, which includes a master intelligent agent and an intent orchestration intelligent agent. Figure 4 This is a schematic diagram of a reasoning flow determination device based on a large language model, provided as an embodiment of the present invention. Figure 4 As shown, the reasoning process determination device based on a large language model may include:
[0085] The natural language acquisition module 401 is used to acquire the natural language to be processed, input the natural language to be processed into a pre-trained large-scale language model, and the main control agent performs intent recognition and process reasoning on the natural language to be processed to obtain the reasoning result.
[0086] The process orchestration and verification module 402 is used by the intent orchestration agent to perform process orchestration and verification based on the reasoning results, and obtain the processing flow.
[0087] The reasoning conclusion output module 403 is used for large language models to perform process processing and intent reasoning based on the processing flow, and to obtain and output reasoning conclusions.
[0088] The reasoning process determination device based on a large language model provided in this invention can achieve intent recognition, process reasoning, process orchestration, process verification, and process processing of natural language to be processed through the collaborative cooperation of the master control agent and the intent orchestration agent in the intelligent agent autonomous system. It can obtain accurate reasoning results and execute accurate processing processes, thereby outputting accurate reasoning conclusions and improving the accuracy of reasoning conclusions.
[0089] In some embodiments, the process orchestration and verification module is further configured to: ...
[0090] In some embodiments, the process orchestration and verification module is further configured to verify the validity of the initial processing flow by the intent orchestration agent; if the processing flow is invalid, the intent orchestration agent generates invalid information and obtains the processing flow based on the invalid information and the reasoning result; if the initial processing flow is valid, the intent orchestration agent uses the initial processing flow as the processing flow.
[0091] In some embodiments, the process orchestration and verification module is further configured to: 1) modify the inference result based on invalid information to obtain a modified inference result; 2) perform process orchestration and process verification based on the modified inference result to obtain a processing flow.
[0092] In some embodiments, the process orchestration and verification module is further configured to generate an error report and send the error report back to the master control agent if the intention orchestration agent encounters an error during the process orchestration or if the generated processing flow is incorrect; the master control agent performs process reasoning again based on the error report, historical cases, reasoning templates and prompt word sets to obtain a corrected reasoning result, which is then used by the intention orchestration agent to perform process orchestration again based on the corrected reasoning result.
[0093] In some embodiments, a large language model includes at least one sub-task agent, and the processing flow includes: a correspondence between the sub-task agent and the inference task; an inference conclusion output module, which is also used to allocate tasks based on the processing flow and determine the inference task corresponding to the sub-task agent; and the sub-task agent processes the corresponding inference task to obtain the processing result.
[0094] In some embodiments, the reasoning conclusion output module is further configured to, if there is a reasoning task that the subtask agent cannot solve, process the unsolvable reasoning subtask based on a pre-set external information database to obtain a processing result.
[0095] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0096] Example 5
[0097] This invention also provides an electronic device for running the above-described method for determining the reasoning flow based on a large language model; see also Figure 5 The diagram shows the structure of an electronic device, which includes a memory 500 and a processor 501. The memory 500 is used to store one or more computer instructions, which are executed by the processor 501 to implement the above-mentioned method for determining the reasoning flow based on a large language model.
[0098] Furthermore, Figure 5 The electronic device shown also includes a bus 502 and a communication interface 503. The processor 501, the communication interface 503 and the memory 500 are connected via the bus 502.
[0099] The memory 500 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 503 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 502 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0100] Processor 501 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 501 or by instructions in software form. Processor 501 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 500, and processor 501 reads information from memory 500 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0101] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the aforementioned method for determining the reasoning flow based on a large language model. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0102] The computer program product for determining the reasoning flow based on a large language model provided in this embodiment of the invention includes a computer-readable storage medium storing non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0103] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0104] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0106] In addition, the functional units in the various embodiments of the present invention 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.
[0107] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0108] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for determining the reasoning process based on a large language model, characterized in that, The method is applied to a large-scale language model, wherein the large-scale language model is deployed with a pre-built intelligent agent autonomous system, the intelligent agent autonomous system including a master agent, an intent orchestration agent, and a task creation agent; the method includes: The natural language to be processed is acquired and input into a pre-trained large-scale language model. The main control agent performs intent recognition and process reasoning on the natural language to be processed to obtain the reasoning result and decomposed process. The task creation agent creates tasks based on the decomposition process to obtain decomposed tasks. The intent orchestration agent performs process orchestration and process verification based on the inference results and the decomposed tasks to obtain the processing flow. The large language model performs process processing and intent reasoning based on the processing flow, and obtains and outputs reasoning conclusions. The reasoning results include: the associated actions corresponding to the task intent, the processing tools associated with the task intent, the key processing points and precautions corresponding to the task intent; The intent orchestration agent performs process orchestration and process verification based on the inference results to obtain a processing flow, including: The intent orchestration agent determines the business type and process type of the task to be processed based on the inference results; The intent orchestration agent orchestrates the process based on the business type and the process type, combined with a pre-set multi-dimensional information database, to obtain an initial processing flow; the multi-dimensional information database includes at least one of the following: knowledge graph associated entity relationship attribute information, rule base associated information, historical database associated information, code base associated information, and plugin library associated information. Based on the initial processing flow, the inference result is verified to obtain the processing flow; The process of verifying the inference result based on the initial processing flow to obtain the processing flow includes: The intent orchestration agent verifies the validity of the initial processing flow. If the processing flow is invalid, the intent orchestration agent generates invalid information and obtains the processing flow based on the invalid information and the reasoning result; The controlling intelligent agent performs intent recognition and process reasoning on the natural language to be processed, and obtains the reasoning results, including: The master control agent performs intent recognition and process reasoning on the natural language to be processed based on historical cases in a large language model, pre-set reasoning templates, and pre-generated prompt word sets, and obtains the reasoning results.
2. The method according to claim 1, characterized in that, The process of verifying the inference result based on the initial processing flow to obtain the processing flow includes: The intent orchestration agent verifies the validity of the initial processing flow. If the initial processing flow is valid, the intent orchestration agent will use the initial processing flow as the processing flow.
3. The method according to claim 2, characterized in that, The processing flow based on the invalid information and the reasoning result includes: The intent orchestration agent corrects the inference result based on the invalid information to obtain a corrected inference result; The intent orchestration agent performs process orchestration and process verification based on the corrected inference results to obtain the processing flow.
4. The method according to claim 1, characterized in that... The intent orchestration agent performs process orchestration and verification based on the inference result, and after obtaining the processing flow, it further includes: If the intent orchestration agent encounters an error during the process orchestration, or if the generated processing flow is incorrect, an error report is generated and fed back to the master control agent. The master control agent performs process reasoning again based on the error report to obtain a corrected reasoning result, which is then used by the intent orchestration agent to perform process orchestration again based on the corrected reasoning result.
5. The method according to claim 1, characterized in that, The large language model includes at least one sub-task agent; The processing flow includes: the correspondence between sub-task agents and inference tasks; the large-scale language model performs process processing and intent inference based on the processing flow, and obtains and outputs inference conclusions, including: The task allocation is performed based on the processing flow to determine the inference task corresponding to the sub-task agent; The subtask agent processes the corresponding inference task and obtains the processing result. The controlling agent obtains and outputs reasoning conclusions based on the processing results.
6. The method according to claim 5, characterized in that, After assigning tasks based on the processing flow and determining the inference task corresponding to the sub-task agent, the method further includes: If there is a reasoning task that the subtask agent cannot solve, the subtask agent processes the unsolvable reasoning subtask based on a pre-set external information database to obtain a processing result.
7. A device for determining reasoning flow based on a large language model, characterized in that, Applied to large language models, for implementing the reasoning flow determination method based on a large language model as described in any one of claims 1 to 6, wherein the large language model is deployed with a pre-built intelligent agent autonomous system, the intelligent agent autonomous system including a master intelligent agent, an intent orchestration intelligent agent, and a task creation intelligent agent; the apparatus includes: The natural language acquisition module is used to acquire the natural language to be processed, input the natural language to be processed into a pre-trained large-scale language model, and the main control agent performs intent recognition and process reasoning on the natural language to be processed to obtain reasoning results and decomposed processes. The process orchestration and verification module is used by the intent orchestration agent to perform process orchestration and verification based on the inference result and the decomposed task to obtain the processing flow; the decomposed task is obtained by the task creation agent based on the decomposed flow to create the task. The reasoning conclusion output module is used by the large language model to perform process processing and intent reasoning based on the processing flow, and to obtain and output the reasoning conclusion. The reasoning results include: the associated actions corresponding to the task intent, the processing tools associated with the task intent, the key processing points and precautions corresponding to the task intent.
8. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the reasoning flow determination method based on a large language model as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the reasoning flow determination method based on a large language model as described in any one of claims 1 to 6.