Large language model-based information processing method and device
By introducing multimodal information and retrieval answer constraints into a large language model, the agent debate process is optimized, solving the illusion balance problem in multi-agent debate, improving the quality and consistency of response content, and reducing latency.
Patent Information
- Application Number
- PCT/CN2025/078663
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-26
- Filing Date
- 2025-02-22
- Publication Date
- 2025-11-27
AI Technical Summary
Existing large language models suffer from the illusion balance problem in multi-agent debates, resulting in responses that do not conform to the facts and failing to effectively resolve the issue of reaching erroneous consensus conclusions after multiple agents have debated.
By introducing multimodal information and the retrieved answers as constraints, multiple agents debate and establish a connection with the retrieved answers after reaching a consensus. The answers are corrected through self-feedback, optimizing the agent generation process. Similarity measurement and self-supervised knowledge feedback mechanisms are used to update model parameters.
It effectively alleviates the illusion balance problem in the debate process between multiple intelligent agents, improves the quality and consistency of the response content, reduces the debate latency, and enhances the user experience.
Smart Images

Figure CN2025078663_27112025_PF_FP_ABST
Abstract
Description
A large model-based information processing method and device
[0001] The present application claims priority to the Chinese patent application No. 202410210769.X, filed on February 26, 2024, and entitled "A large model-based information processing method and device", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The present application relates to the field of artificial intelligence (AI), and in particular to a large model-based information processing method and device. BACKGROUND
[0003] At present, large language models (referred to as large models) have shown strong end-to-end representation capabilities and excellent performance in many fields, and have attracted widespread attention. Artificial intelligence assistants such as ChatGPT have become indispensable tools in people's daily lives due to their powerful capabilities. However, the current large language model has a problem of answering errors in the process of answering questions, i.e., large model hallucination problem, which will cause the large model to produce replies that do not conform to the facts. As shown in FIG. 1, the large model's reply understands "Lu Xun" and "Zhou Shuren" as two different people, which violates the objective facts. The current technology for solving large model hallucination mainly includes a multi-agent debate method, constructing multiple different agents based on a large language model, simulating the human debate process, and when the replies generated by the agents to the user's question do not reach an agreement, debating until an agreement is reached. The external knowledge base retrieval method is currently limited to solving single-agent hallucination scenarios, and more and more researchers have begun to focus on multi-agent debate problems. However, in the multi-agent debate process, there may be a wrong consensus conclusion reached by multiple agents after debating, i.e., hallucination balance problem, as shown in FIG. 2.
[0004] How to solve the hallucination balance problem in the multi-agent debate process is the focus of current research by those skilled in the art. SUMMARY
[0005] The embodiments of the present application disclose a large model-based information processing method and device, which can alleviate model hallucination balance and improve the quality of model reply content.
[0006] The first aspect provides a large model-based information processing method applied to a first device, the method comprising:
[0007] obtaining a first answer to a first question from one or more second devices;
[0008] obtaining a second answer by debating the first question through a plurality of agents;
[0009] generating reply content of the first question according to the first answer and the second answer.
[0010] It should be understood that the agent is an object constructed by a model, and the agent is an object capable of understanding, planning decisions and performing tasks based on a large model.
[0011] In the method, under the agreement reached by the plurality of agents after sufficient debate, the first answer obtained by retrieval is also introduced as a constraint to determine whether the second answer reached by the plurality of agents is feasible, and the second answer is taken as the reply content of the first question only if it is feasible. In this way, a link is established between the first answer obtained by retrieval and the answer generated by the agent, and the answer of the agent is corrected in the form of self-feedback, which can avoid the illusion balance problem in the debating process of the plurality of agents and improve the quality of the reply content.
[0012] In combination with the first aspect, in a possible implementation manner of the first aspect, the first question includes multi-modal information, and the multi-modal information includes at least two of text, pictures, videos, and sound.
[0013] It can be understood that compared with a conventional single-modal pure text method, the introduction of multi-modal information can correct the understanding and cognition of the model (such as the agent), improve the multi-perspective understanding ability of the plurality of agents in the debating process of the unified instruction or question, and further improve the quality of the generated answer.
[0014] In combination with the first aspect, or any of the possible implementation manners of the first aspect, in another possible implementation manner of the first aspect, the second device includes a database corresponding to each of the plurality of modalities, and the obtaining of the first answer of the first question from the one or more second devices includes:
[0015] obtaining the first answer of the first question from the database corresponding to each of the plurality of modalities.
[0016] In combination with the first aspect, or any of the possible implementation manners of the first aspect, in another possible implementation manner of the first aspect, the generating of the reply content of the first question according to the first answer and the second answer includes:
[0017] If the second answer meets a preset similarity condition with the first answer, the second answer is determined as the reply content of the first question, and the plurality of agents stop debating.
[0018] In this way, the second answer is measured by similarity to the first answer to determine the deviation degree of the second answer from common sense, the deviation degree is measured by similarity, the calculation process is easy to implement, and the effect is good. In addition, when the answers generated by the plurality of agents and the first answer retrieved satisfy the consistency judgment, the debate is stopped in advance. Compared with the method in which all debates reach the maximum number of rounds in the conventional implementation, the embodiment of the application can greatly reduce the time delay generated in the debate process and improve the user experience.
[0019] With reference to the first aspect, or any possible implementation manner of the first aspect, in a further possible implementation manner of the first aspect, the method further includes:
[0020] If the second answer does not satisfy the preset similarity condition with the first answer, the step of debating the first question by the plurality of agents to obtain the second answer is performed.
[0021] It can be understood that according to the conventional operation, the plurality of agents need to debate again when they do not reach an agreement. In the embodiment of the application, if the answer reached by the plurality of agents does not reach an agreement with the first answer obtained by retrieval, the plurality of agents also need to debate again, and the consistency between the first answer and the answer reached by the plurality of agents is judged again after the debate reaches an agreement, until the two reach an agreement or the number of debates reaches a preset upper limit. In this way, an answer consistent with the first answer can be finally generated with a high probability.
[0022] With reference to the first aspect, or any possible implementation manner of the first aspect, in a further possible implementation manner of the first aspect, the preset similarity condition includes that the similarity exceeds a first similarity threshold.
[0023] With reference to the first aspect, or any possible implementation manner of the first aspect, in a further possible implementation manner of the first aspect, the debating the first question by the plurality of agents to obtain the second answer includes:
[0024] generating answers to the first question by the plurality of agents respectively and debating based on the generated answers;
[0025] If the plurality of agents do not reach an agreement in the debating, the step of generating answers to the first question by the plurality of agents respectively and debating based on the generated answers is performed again;
[0026] If the plurality of agents reach an agreement in the debating, the answer reached by the plurality of agents is taken as the second answer.
[0027] It can be understood that the debate in the embodiments of the present application is an iterative process. If the answers generated by the multiple agents do not reach an agreement, the debate will continue until an answer that can reach an agreement is generated or the number of debates reaches a preset upper limit.
[0028] With reference to the first aspect, or any possible implementation of the first aspect, in a possible implementation of the first aspect, the method further includes:
[0029] If the multiple agents do not reach an agreement through the debate, it is determined whether the first answer is needed as an input for the multiple agents to generate answers to the first question again. If it is determined that the first answer is needed, the input for generating the answers to the first question includes the first answer. If it is determined that the first answer is not needed, the input for generating the answers to the first question does not include the first answer.
[0030] It can be understood that the introduction of the self-feedback mechanism based on the retrieval knowledge guidance can enable the agent to explore its own knowledge boundary and introduce the retrieval knowledge evidence (i.e., the first answer) at an appropriate time, thereby improving the quality of the model reply and further alleviating the illusion balance phenomenon in the debate process of the multiple agents.
[0031] With reference to the first aspect, or any possible implementation of the first aspect, in a possible implementation of the first aspect, the method further includes:
[0032] The first loss value is determined according to the similarity between the third answer and the fourth answer, wherein the third answer is an answer to a second question obtained from the one or more second devices, and the fourth answer is an answer to the second question generated by the first agent;
[0033] The loss function of the first agent is updated according to the first loss value and a second loss value, wherein the second loss value is a loss of the fourth answer relative to a reference answer;
[0034] The first agent is updated through the loss function, wherein the first agent is any one of the multiple agents.
[0035] In this implementation, the third answer obtained through retrieval is used as a guide signal to evaluate the loss of the model parameters of the agent, i.e., the first loss value, so that the conventional loss of the model parameters (i.e., the second loss value) is optimized according to the first loss value to obtain a more accurate loss function of the model. The model parameters of the agent are updated through the more accurate loss function, which can improve the quality of the answers generated by the model.
[0036] With reference to the first aspect or any possible implementation of the first aspect, in a possible implementation of the first aspect, the method further includes: outputting the reply content of the first question.
[0037] The second aspect provides a device, for example, the first device, including units or modules for performing the method of any one of the first aspect.
[0038] The third aspect provides a device, which can be a single device or a distributed system composed of multiple nodes, including one or more processors and one or more memories, wherein: the one or more memories are used to store one or more programs, and the one or more processors invoke the one or more programs to execute the method described in the first aspect or any possible implementation of the first aspect.
[0039] The fourth aspect provides a storage medium (also referred to as a computer readable storage medium), which stores one or more programs, and the one or more programs are executed by a processor to implement the method described in the first aspect or any possible implementation of the first aspect.
[0040] The fifth aspect provides a chip system, including: the chip system includes one or more processors and one or more memories, and the one or more processors are used to read and execute one or more programs stored in the one or more memories to implement the method described in any one of the first aspect.
[0041] The sixth aspect provides a program product, which, when running on a device, causes the device to execute the method described in any one of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0042] The following describes the drawings used in the embodiments of the present application.
[0043] FIG. 1 is a case schematic diagram of a large model illusion in the prior art;
[0044] FIG. 2 is a case schematic diagram of another large model illusion in the prior art;
[0045] FIG. 3 is an architecture schematic diagram of an information processing system based on a large model provided by an embodiment of the present application;
[0046] FIG. 4 is a logic schematic diagram of argumentation among multiple intelligent agents and final output of consistent reply provided by an embodiment of the present application;
[0047] FIG. 5 is a flow schematic diagram of an information processing method based on a large model provided by an embodiment of the present application;
[0048] FIG. 6 is a scene diagram of multi-modal retrieval according to an embodiment of the present application;
[0049] FIG. 7 is a schematic diagram of consistency determination according to an embodiment of the present application;
[0050] FIG. 8 is a schematic diagram of splicing answers of multiple agents according to an embodiment of the present application;
[0051] FIG. 9 is a schematic diagram of debate between two agents according to an embodiment of the present application;
[0052] FIG. 10 is a schematic diagram of determining a compensation amount of a model loss based on a retrieval answer according to an embodiment of the present application;
[0053] FIG. 11 is a schematic diagram of a structure of an information processing apparatus based on a large model according to an embodiment of the present application;
[0054] FIG. 12 is a schematic diagram of a structure of a first device according to an embodiment of the present application. DETAILED DESCRIPTION
[0055] The embodiments of the present application will be described below with reference to the accompanying drawings.
[0056] Artificial intelligence is applied in many scenarios, and examples are as follows.
[0057] Scenario 1: a user inputs a question to a first device, and the first device generates an answer to the question through a large model. For example, the user inputs a question "which place is more suitable to go to this weekend" to the first device through voice or text or other ways, and the first device generates an answer "go to scenic spot A, the weather is sunny and the temperature is moderate, and the scenery is the best in the year" and outputs the answer. For another example, the user inputs a question "is the animal in this picture a donkey or a horse" to the first device through voice or text or other ways, and the first device generates an answer and reasons and outputs the answer. And so on.
[0058] Scenario 2: a user inputs a task to a first device, and the first device completes the task through a large model and outputs a result. For example, the user inputs a task "generate an article of 1000 words to describe the snow scene in winter" to the first device through voice or text or other ways, and the first device generates an article of 1000 words to meet the requirement and outputs the article. For another example, the user inputs two dressing styles to the first device, and the first device determines which style is more suitable for the user, and accordingly outputs a recommended result and reasons. For another example, the user inputs a task "find the defects (or improvements) in this article (or work or design)" to the first device through voice or text or other ways, and the first device outputs the positions of the defects and an optimization scheme and outputs the optimization scheme. And so on.
[0059] It should be noted that the above scenarios are only examples, and there are many other similar scenarios in practice, which are not described here.
[0060] Please refer to FIG. 3, which is a schematic diagram of an information processing architecture based on a large model according to an embodiment of the present application. The architecture 30 includes a first device that performs a task based on a large model. The first device can be a single node (or device) or a distributed system composed of multiple nodes (or devices). In the embodiment of the present application, the node can be a physical node or a virtual node (such as a node implemented by a virtual machine). When there are multiple nodes, one or more agents can be deployed on each node. The multiple nodes can be deployed on the cloud, deployed locally, or partially deployed on the cloud and partially deployed locally (i.e., end-cloud collaboration). Optionally, if the end-cloud collaboration scenario is adopted, the cloud-side large-scale language model (including agents) can debate with the end-side (i.e., local) small-scale language model (including agents), effectively improving the performance of the first device in executing the task (or responding). In addition, the multiple agents in the embodiment of the present application can be two or more, and can be extended to more agent debate application scenarios when the computing resources permit.
[0061] FIG. 3 illustrates an end-cloud collaboration scenario. The information processing architecture based on a large model 30 includes a node 301 deployed on the cloud, a node 302 and a node 303 deployed locally (i.e., on the end side). The nodes in the architecture 30 are connected by wired or wireless means, so the different nodes can communicate with each other. In addition, the agents deployed on the nodes can debate with each other. In the information processing method based on a large model provided by the embodiment of the present application, operations other than debate (such as retrieval, output of responses (or replies or tasks), consistency judgment, etc.) can be completed by the node 301 or the node 302, or by a node 303 that does not deploy an agent. One node can complete the operation, or multiple nodes can complete the operation.
[0062] Optionally, the user can interact with the information processing architecture based on a large model 30 through the local node 302 or the local node 303, such as asking questions to the local node 302 or the local node 303. In this case, the local node 302 or the local node 303 can be a device that applies a large model, such as a handheld device (e.g., a mobile phone, a tablet computer, a palm computer, a notebook computer, etc.), a vehicle-mounted device (e.g., a car, a bicycle, an electric vehicle, an airplane, a ship, etc.), a wearable device (e.g., a smart watch (such as iWatch, etc.), a smart bracelet, a pedometer, etc.), a smart home device (e.g., a refrigerator, a television, an air conditioner, an electricity meter, etc.), a smart robot, a workshop device, a computer, etc. The specific device is not limited here.
[0063] Optionally, as shown in FIG. 4, a logical diagram of the argumentation between agents and the final output of a consistent reply is shown. The agents in FIG. 4 can be the agents (English can be called Agent) in the architecture shown in FIG. 3, or can be agents in other architectures. The execution logic shown in FIG. 4 is as follows: taking the argumentation between two agents (agent 1 and agent 2) as an example, the agent argumentation system can include a multi-modal knowledge retrieval module, an agent reply module, a knowledge self-feedback module, a consistency judgment module, and a retrieval timing module. For the user input query, first, multi-modal knowledge retrieval is performed to obtain the retrieved knowledge segment (i.e., the first answer mentioned later, which can be used as retrieval evidence) which will be used for subsequent knowledge self-feedback and agent reply. Secondly, the two agent reply modules generate replies (or answers) corresponding to the user input query, and then input the replies to the consistency judgment module to determine whether the answers generated by the two agents are consistent. (1) If the agent replies are not consistent, then enter the retrieval timing module, and the agent determines based on its own reply whether the retrieval evidence (i.e., the first answer) needs to be input as input for generating the reply (or answer) in the next round, and enters the next round of argumentation. In this process, if the retrieval evidence needs to be input as input, the input includes the retrieved knowledge segment and the answers generated by multiple agents in the history, and if the retrieval evidence does not need to be input as input, the input includes the answers generated by multiple agents in the history. (2) If the agent replies are consistent or reach the maximum argumentation round, the argumentation ends. In addition, after each round of agent reply, the knowledge self-feedback mechanism can be used to correct the model reply to achieve the purpose of alleviating the illusion balance in agent argumentation. The specific implementation details will be described in detail in conjunction with the method flow shown in FIG. 5.
[0064] Please refer to FIG. 5, which is an information processing method based on a large model provided by an embodiment of the present application. The method can be implemented based on the architecture shown in FIG. 3, or can be implemented based on other architectures. The method includes but is not limited to the following steps:
[0065] Step S501: obtaining a first answer to a first question from one or more second devices.
[0066] Specifically, the second device can be a single device or a distributed system composed of multiple nodes. The second device can be the first device described above, and when the first device is a distributed system composed of multiple nodes, the second device can be part of the nodes in the distributed system. Of course, the second device can also be a device other than the first device. When obtaining the first answer to the first question from the second device, it can be obtained by retrieval, or by reading, or by other means, which is not limited here.
[0067] The first question can be a question, such as "Which is more appropriate to go to this weekend?", or "Is the animal in this picture a donkey or a horse?"; the first question can also be a task, such as "Generate a 1000-word article describing the snow scene in winter".
[0068] The first question can be single-modal, for example, the first question is presented or input in the form of text, and the first question is single-modal; for another example, the first question is presented or input in the form of audio, and the first question is single-modal.
[0069] In addition, the first question can also be multi-modal, for example, the first question is composed of text and image, and the first question is multi-modal; for another example, the first question is composed of audio and image, and the first question is multi-modal.
[0070] Optionally, the second device includes a plurality of databases corresponding to a plurality of modalities, which can be internal databases or external databases (such as databases provided by the Internet or other platforms), and subsequent examples take the databases as external databases for example. Optionally, there can be multiple databases, for example, as shown in FIG. 6, assuming that the aforementioned multiple modalities include text, image, audio, etc., there can be a database (or knowledge base) corresponding to text, a database (or knowledge base) corresponding to image, a database (or knowledge base) corresponding to audio, etc.; when the first question is multi-modal, answers can be retrieved from the databases corresponding to the multiple modalities, and a multi-modal retrieval module can be configured to realize multi-modal retrieval (Retrieve Module), and the answers retrieved from the multiple modalities can be fused to obtain the first answer. Optionally, the information of different modalities in the first question can be encoded (or quantized) by the corresponding encoder in the multi-modal retrieval module (such as a text encoder, an audio encoder, an image encoder, etc.), and then retrieved from the corresponding database in the multi-modal retrieval module, such as using a similarity matching algorithm to retrieve a knowledge fragment from the corresponding database, and the knowledge fragment that meets the preset condition can be used as the answer of retrieval. Optionally, the first answer obtained by fusion can be a multi-modal answer, as shown in FIG. 6, the output first answer 601 includes image, text, and sound, and thus belongs to a multi-modal answer.
[0071] When the first question is single-modal, the answer (or after processing) obtained from a single database (such as retrieval) can be used as the first answer.
[0072] Step S502: debating the first question through a plurality of agents to obtain a second answer.
[0073] The agent is an object constructed based on a model, such as an object constructed based on a large model that can understand, plan decisions, and execute tasks.
[0074] The principle of the debate in the embodiments of the present application is as follows:
[0075] By generating answers to the first question by multiple agents respectively and debating based on the generated answers, for example, the answers (or replies) generated by different agents can be encoded using an encoder (such as TinyBert) respectively, and the similarity is calculated two by two, if the similarity is greater than a preset second similarity threshold, it indicates that the answers (or replies) generated by the two agents are consistent, that is, an agreement is reached. Optionally, the second similarity threshold can be set according to actual needs, as shown in FIG. 7, taking 0.5 as the second similarity threshold for example.
[0076] If an agreement is reached between any two of the preceding multiple agents, the agreed answer is taken as the second answer.
[0077] If an agreement is not reached between any two of the preceding multiple agents, the multiple agents generate answers to the first question again respectively and, based on the generated answers, make consistency judgments two by two according to the previous principle, if an agreement is still not reached, the answers to the first question are generated again, and the process is repeated until the multiple agents reach an agreement, and the agreed answer is taken as the second answer. This process is the process of reaching an agreement through agent debate.
[0078] In an alternative, if the plurality of agents cannot reach an agreement, the first answer is used as an input for each agent to generate an answer to the first question in the next round. Alternatively, a model strategy is pre-trained to combine the answers generated by the plurality of agents to obtain a combined answer, which is then input to each agent. As shown in FIG. 8, each agent determines whether to use the first answer as an input in the next round of generating an answer to the first question. From the perspective of a single agent, the retrieval timing module of the agent combines the answer (or response) of the agent with the answers (or responses) of other agents to obtain a combined answer, which is then used as an input for the agent to determine whether to use the first answer as an input in the next round of generating an answer to the first question. If it is determined that the first answer is needed, the input for generating the answer to the first question includes the first answer. If it is determined that the first answer is not needed, the input for generating the answer to the first question does not include the first answer. This implementation scheme gives the agent the ability to explore the boundaries of knowledge. Specifically, based on the knowledge-guided feedback mechanism, the agent is guided to explore the boundaries of knowledge and to know whether it knows or not. At the right time, the agent is guided to retrieve knowledge fragments (i.e., the first answer obtained by retrieval) to generate a better response.
[0079] An argumentation process is illustrated below with reference to FIG. 9, taking a plurality of agents (e.g., Agent 1 and Agent 2) as an example.
[0080] In this example, Agent 1 is deployed in the cloud, and Agent 2 is deployed on the edge (i.e., locally).
[0081] 1. The user inputs a first question to the large model-based information processing system (i.e., a first device, which can be the architecture shown in FIG. 3), which in this case includes “What animal is in the picture?” and a picture.
[0082] 2. The multi-modal retrieval module in the large model-based information processing system retrieves from the corresponding database to obtain a first answer 1001, which can be seen as a multi-modal response content including text, images, and sound. The first answer can be used as multi-modal retrieval evidence (Multi Modal Evidences) in the subsequent process.
[0083] 3. Enter the first round of argumentation process (round 1)
[0084] Agent 1 generates an answer to the first question, which is “The animal in the picture is a deer.”
[0085] Agent2 generates the answer to the first question, i.e., "the animal in the picture is a horse".
[0086] 4. The consistency judgment module judges whether the answers of Agent1 and Agent2 are consistent. If no consensus is reached in round1, the retrieval timing module of Agent1 and Agent2 triggers to splice the answers of Agent1 and Agent2 to obtain a spliced answer (English can also be called prompt).
[0087] 5. The retrieval timing module of Agent1 and Agent2 judges whether the first answer (i.e., the answer obtained by retrieval previously) needs to be taken as one of the inputs when generating the answer to the first question in the next round according to the spliced answer. It can be seen that in the first round of debate process (round1), Agent1 and Agent2 both need to take the first answer as one of the inputs.
[0088] 6. Enter the second round of debate process (round2)
[0089] Agent1 takes the answer generated in Agent1 history, the answer generated in Agent2 history, and the first answer as inputs to regenerate the answer to the first question, i.e., "horses generally do not have horns and are relatively large in size. According to the search picture, the animal in the picture is more similar to a deer".
[0090] Agent2 takes the answer generated in Agent1 history, the answer generated in Agent2 history, and the first answer as inputs to regenerate the answer to the first question, i.e., "horses and deer are herbivores and both have four legs. I feel that the animal in the picture is more like a horse".
[0091] 7. The consistency judgment module judges whether the answers of Agent1 and Agent2 are consistent. If no consensus is reached in round2, the retrieval timing module of Agent1 and Agent2 triggers to splice the answers of Agent1 and Agent2 to obtain a spliced answer.
[0092] 8. The retrieval timing module of Agent1 and Agent2 judges whether the first answer (i.e., the answer obtained by retrieval previously) needs to be taken as one of the inputs when generating the answer to the first question in the next round according to the spliced answer. It can be seen that in the second round of debate process (round2), Agent1 does not need to take the first answer as one of the inputs, and Agent2 needs to take the first answer as one of the inputs.
[0093] 9. Enter the third round of debate process (round3)
[0094] Agent 1 takes the answer generated in Agent 1 history and the answer generated in Agent 2 history as input to regenerate the answer to the first question, that is, "horses also have four legs, but their body size is large, the animal in the picture is small in size, and has horns."
[0095] Agent 2 takes the answer generated in Agent 1 history, the answer generated in Agent 2 history, and the first answer as input to regenerate the answer to the first question, that is, "you are right, horses generally have no horns, but deer have horns, so the animal in the picture is a deer."
[0096] 10. The consistency judgment module judges whether the answers of Agent 1 and Agent 2 are consistent. If the answers of Agent 1 and Agent 2 are consistent in round 3, the debate between Agent 1 and Agent 2 is temporarily "ended". If the answer consistent with the first answer is consistent, the debate can be formally ended. Otherwise, the debate process will be started again until the consistent answer of the debate is consistent with the first answer.
[0097] Step S503: generating the reply content of the first question according to the first answer and the second answer.
[0098] Specifically, the final reply content of the first question needs to consider the first answer and the second answer. There are many specific implementation manners, and only some cases are taken as examples for illustration.
[0099] For example, the first answer and the second answer are fused to obtain the reply content of the first question.
[0100] For example, the first answer is taken as a reference for the second answer, and if the second answer is not too deviated from the first answer, the second answer is taken as the reply content of the first question. For example, whether the second answer and the first answer meet a preset similarity condition can be determined by encoding (or quantifying) the second answer and the first answer by using an encoder such as TinyBert and then comparing the similarity, and if the second answer and the first answer meet the preset similarity condition, the second answer is determined as the reply content of the first question, and the plurality of agents stop debating. Optionally, the preset similarity condition includes that the similarity exceeds a first similarity threshold, and the first similarity threshold can be set according to actual needs, for example, 0.5. As shown in FIG. 7, this process is a process of confirming whether the consensus answer (i.e., the second answer) of the plurality of agents and the retrieved “fact” (i.e., the first answer) are consistent, and therefore can be referred to as fact consistency determination. If an agreement is reached in the fact consistency determination process, the second answer can be taken as the reply content of the first question, and the above-mentioned debate is stopped. If an agreement is not reached in the fact consistency determination process, the debate process in step S502 needs to be performed again to generate a consensus answer (i.e., the second answer) again, and then step S503 is performed again based on the regenerated consensus answer (i.e., the second answer), until an agreement is reached in the fact consistency determination.
[0101] In the embodiment of the present application, before the above steps S501-S503, the large model can be trained, including updating and optimizing the model parameters of the plurality of agents. An optional model parameter updating method is provided as follows:
[0102] A first loss value is determined according to the similarity between a third answer and a fourth answer, wherein the third answer is an answer to a second question obtained from the one or more second devices, for example, an answer obtained by retrieval according to the principle of step S501, and the fourth answer is an answer to the second question generated by the first agent; by comparing the similarity of the third answer and the fourth answer, the degree of deviation of the third answer generated by the first agent from the knowledge in the database can be known. Optionally, the similarity is negatively correlated with the first loss value, that is, the smaller the similarity, the larger the first loss value. FIG. 10 illustrates the process of generating the first loss value βsim(e, r). The module performing this operation can be referred to as a self-supervised knowledge feedback module.
[0103] determining a loss function of the updated first agent according to the first loss value and the second loss value, wherein the second loss value is a loss of the fourth answer relative to a reference answer, and the reference answer can be a pre-configured standard answer. Optionally, the first loss value, the second loss value and the loss function Loss can satisfy the following relationship: Loss = CrossEntropyLoss - βsim(e, r)
[0104] wherein CrossEntropyLoss is the second loss value, βsim(e, r) is the first loss value, sim(e, r) is the similarity between the third answer and the fourth answer, and β is a weight factor, which can be set according to actual needs.
[0105] updating the first agent through the loss function, wherein the first agent is any one of the plurality of agents, that is, each agent in the plurality of agents can be updated in the manner of the first agent.
[0106] It can be seen that this model parameter updating manner mainly uses the third answer obtained by searching from the database as a guide signal to limit the answer generated by the agent from deviating from the search knowledge, and to alleviate the illusion balance problem in the debate of multiple agents to a certain extent.
[0107] It should be noted that, in addition to updating the model parameters of the agent in the manner of the above model parameter updating manner when training the large model before the steps S501-S503, the model parameters of the agent can also be updated in the manner of the principle of the above model parameter updating manner when the agent generates an answer each time in the steps S501-S503, and the specific process will not be described here.
[0108] It should be noted that, when training the large model before the steps S501-S503, the subject performing the model training can be the same as the subject performing the steps S501-S503, such as the architecture shown in FIG. 3 or other architectures, which can be a single device or a distributed system composed of multiple nodes. Of course, the subject performing the model training can also be different from the subject performing the steps S501-S503, that is, the subject performing the model training sends the trained large model (containing multiple agents) to the subject performing the steps S501-S503 for use.
[0109] Step S504: outputting the reply content of the first question.
[0110] Specifically, the output manner herein is not limited, and can be displayed through text, image, video, etc., or output through voice broadcasting. It can be single-modal output or multi-modal mixed output, such as a reply content including text and image.
[0111] In addition, the reply content of the first question can not be output, but some operations or tasks can be directly performed according to the reply content, or the reply content of the first question is sent to other devices for use by the other devices.
[0112] In the method shown in FIG. 5, under the agreement reached by the multiple agents after sufficient debate, the first answer retrieved is also introduced as a constraint to determine whether the second answer reached by the multiple agents is feasible, and if so, the second answer is taken as the reply content of the first question. In this way, a link is established between the first answer retrieved and the answer generated by the agent in the form of self-feedback to correct the answer of the agent, which can avoid the illusory balance problem in the debate process of the multiple agents and improve the quality of the reply content.
[0113] The above describes the method of the embodiments of the present application in detail, and the device of the embodiments of the present application is provided below.
[0114] Please refer to FIG. 11, which is a structural schematic diagram of an information processing device based on a large model according to an embodiment of the present application. The device can be the first device or a device or chip system in the first device. The device 110 can include a multi-modal retrieval module 1101 and a consistency judgment module 1102, and the detailed description of each unit is as follows.
[0115] The multi-modal retrieval module 1101 is configured to obtain a first answer to a first question from one or more second devices.
[0116] The consistency judgment module 1102 is configured to debate the first question through multiple agents to obtain a second answer. It should be understood that the agent is an object constructed by a model, and optionally, the agent is an object constructed based on a large model and capable of understanding, planning decisions, and executing tasks.
[0117] The consistency judgment module 1102 is further configured to generate a reply content of the first question according to the first answer and the second answer.
[0118] In the method shown in FIG. 5, under the request of the plurality of agents reaching an agreement after sufficient debate, a first answer obtained by retrieval is also introduced as a constraint to determine whether the second answer reached by the plurality of agents is feasible, and if so, the second answer is taken as the reply content of the first question. In this way, a link is established between the first answer obtained by retrieval and the answer generated by the agent, and the answer of the agent is corrected in the form of self-feedback, which can avoid the illusion balance problem in the debate process of the plurality of agents, and improve the quality of the reply content.
[0119] In a possible implementation, the first question includes multi-modal information, and the multi-modal information includes at least two of text, pictures, videos, and sound.
[0120] It can be understood that, compared with a conventional single-modal pure text method, the introduction of multi-modal information can correct the understanding and cognition of the model (such as the agent), improve the multi-perspective understanding ability of the unified instruction or question in the debate process of the plurality of agents, and further improve the quality of the generated answer.
[0121] In another possible implementation, the second device includes a database corresponding to each of the multi-modal information, and the multi-modal retrieval module 1101 is specifically configured to: obtain the first answer of the first question from the database corresponding to each of the multi-modal information.
[0122] In another possible implementation, the reply content of the first question is generated according to the first answer and the second answer, and the consistency judgment module 1102 is specifically configured to:
[0123] If the second answer meets the preset similarity condition with the first answer, the second answer is determined as the reply content of the first question, and the plurality of agents stop debating.
[0124] In this way, the degree of deviation of the second answer from the first answer is measured by similarity, so as to determine whether the second answer deviates from common sense. The degree of deviation is measured by similarity, and the calculation process is easy to implement and has good effect. In addition, when the answer generated by the plurality of agents meets the consistency judgment with the first answer obtained by retrieval, the debate is stopped in advance. Compared with the conventional implementation in which all debates reach the maximum round, the embodiment of the present application can greatly reduce the time delay generated in the debate process, and improve the user experience.
[0125] In another possible implementation, the consistency judgment module 1102 is further configured to:
[0126] If the second answer does not satisfy the preset similarity condition with the first answer, the step of debating the first question by the plurality of agents to obtain the second answer is performed.
[0127] It can be understood that, according to a conventional operation, the plurality of agents need to debate again when the plurality of agents do not reach an agreement. In the embodiment of the present application, when the plurality of agents reach an agreement, if the agreed answer does not reach an agreement with the first answer obtained by searching, the plurality of agents also need to debate again, and the consistency with the first answer is judged again after the debate reaches an agreement, until the two reach an agreement or the number of debates reaches a preset upper limit. In this way, an answer with consistency with the first answer can be finally generated with a high probability.
[0128] In yet another possible implementation, the preset similarity condition includes that the similarity exceeds a first similarity threshold.
[0129] In yet another possible implementation, the debating the first question by the plurality of agents to obtain the second answer, the consistency judgment module 1102 is specifically configured to:
[0130] generating answers to the first question by the plurality of agents respectively and debating based on the generated answers;
[0131] If the plurality of agents do not reach an agreement in the debating, the step of generating answers to the first question by the plurality of agents respectively and debating based on the generated answers is performed again;
[0132] If the plurality of agents reach an agreement in the debating, the agreed answer is taken as the second answer.
[0133] It can be understood that the debating in the embodiment of the present application is an iterative process. If the answers generated by the plurality of agents do not reach an agreement, the debating is continued until an answer that can reach an agreement is generated or the number of debates reaches a preset upper limit.
[0134] In yet another possible implementation, the method further includes:
[0135] a searching timing module configured to, if the plurality of agents do not reach an agreement in the debating, judging whether the first answer needs to be taken as an input for the plurality of agents to generate answers to the first question again according to the answers generated by the plurality of agents; if it is determined that the first answer needs to be taken as the input, the input when the answers to the first question are generated includes the first answer; if it is determined that the first answer does not need to be taken as the input, the input when the answers to the first question are generated does not include the first answer.
[0136] It can be understood that the introduction of a self-feedback mechanism based on retrieval knowledge guidance can enable the agent to explore its own knowledge boundary and introduce retrieval knowledge evidence (i.e., the first answer) at the appropriate time to improve the quality of model responses and further alleviate the illusion balance phenomenon in the debate process of multiple agents.
[0137] In yet another possible implementation, a self-supervised knowledge feedback module is further included for:
[0138] determining a first loss value according to a similarity between a third answer and a fourth answer, wherein the third answer is an answer to a second question obtained from the one or more second devices, and the fourth answer is an answer to the second question generated by the first agent;
[0139] determining an updated loss function of the first agent according to the first loss value and a second loss value, wherein the second loss value is a loss of the fourth answer relative to a reference answer;
[0140] updating the first agent through the loss function, wherein the first agent is any one of the multiple agents.
[0141] In this implementation, the retrieved third answer is used as a guide signal to evaluate the model parameter loss of the agent, i.e., the first loss value, so that the conventional model parameter loss (i.e., the second loss value) is optimized according to the first loss value to obtain a more accurate loss function of the model. Updating the model parameters of the agent through the more accurate loss function can improve the quality of the answers generated by the model.
[0142] In yet another possible implementation, an output module is further included for outputting the reply content of the first question.
[0143] It should be noted that the implementation and benefits of each unit can also be referred to the corresponding description of the method embodiment shown in FIG. 5.
[0144] It can be understood that each of the above modules is a functional module divided according to function. In specific implementation, some of the functional blocks can be subdivided into more detailed functional modules, and some of the functional modules can be combined into one functional module. However, whether the functional modules are subdivided or combined, the above information processing process based on the large model is roughly the same. Generally, each functional module corresponds to its own program code (or program instructions). When the program codes corresponding to each functional module are run on the processor, the functional modules execute the corresponding processes to achieve the corresponding functions.
[0145] Please refer to FIG. 12, which is a structural schematic diagram of an apparatus provided by an embodiment of the present application. For the convenience of distinction, the apparatus can be referred to as a first apparatus. The first apparatus 120 includes one or more processors 1201 and one or more memories 1202. Optionally, the first apparatus 120 can also include a communication interface 1203 and a user interface 1204. The first apparatus 120 can be a single apparatus or a distributed system composed of multiple nodes. The various modules are introduced respectively as follows.
[0146] The processor 1201 can be a general processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. The processor 1201 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as one or more processors for execution.
[0147] The memory 1202 can be one or more memories and can be used to store program instructions and / or data. The memory 1202 is coupled to the processor 1201. The coupling between the memory 1202 and the processor 1201 in the embodiments of the present application is indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms, for information interaction between devices, units or modules. The processor 1201 can operate in cooperation with the memory 1202. The processor 1201 can execute program instructions stored in the memory 1202. Optionally, at least one of the one or more memories can be included in the processor. The memory can include, but is not limited to, a non-volatile memory such as a hard disk or a solid state disk, a random access memory, an erasable programmable read-only memory, a read-only memory or a portable read-only memory, etc. The memory is any storage medium capable of carrying or storing program codes in the form of instructions or data structures and capable of being read and / or written by the apparatus (such as the first apparatus, etc.). The memory in the embodiments of the present application can also be a circuit or other any device capable of realizing the storage function, for storing program instructions and / or data.
[0148] The communication interface 1203 can communicate with other devices to realize the reception and transmission of data.
[0149] The user interface 1204 is mainly used for human-computer interaction, such as output and / or output information. Specifically, the user interface can include input and output devices, such as a touch screen, a display screen, a keyboard, etc., which are mainly used for receiving user input data and outputting data to the user.
[0150] The specific connection medium between the user interface 1204, the communication interface 1203, the processor 1201 and the memory 1202 in the embodiments of the present application is not limited. In FIG. 12, the connection between the user interface 1204, the communication interface 1203, the processor 1201 and the memory 1202 is taken as an example through a bus connection, which is represented by a thick line in FIG. 12. The connection mode between other components is only illustrative and is not limited. The bus can be divided into an address bus, a data bus, a control bus and the like. For convenience of representation, only one thick line is used in FIG. 12, but it does not mean that there is only one bus or only one type of bus.
[0151] The processor 1201 in the first device 120 is configured to read one or more programs stored in the memory 1202 and perform the following operations:
[0152] obtaining a first answer to the first question from one or more second devices;
[0153] debating the first question through a plurality of agents to obtain a second answer, the agent being an object constructed through a model, and optionally, the agent being an object constructed based on a large model and capable of understanding, planning decisions and executing tasks;
[0154] generating reply content of the first question according to the first answer and the second answer.
[0155] In the method shown in FIG. 5, under the condition that the plurality of agents reach an agreement after sufficient debate, the first answer obtained by retrieval is also introduced as a constraint to determine whether the second answer reached by the plurality of agents is feasible, and if it is feasible, the second answer is taken as the reply content of the first question. In this way, a connection is established between the first answer obtained by retrieval and the answer generated by the agent in the form of self-feedback to correct the answer of the agent, which can avoid the illusion balance problem in the debating process of the plurality of agents and improve the quality of the reply content.
[0156] In a possible implementation, the first question includes multi-modal information, and the multi-modal information includes at least two of text, pictures, videos and sound.
[0157] It can be understood that, compared with a conventional single-modal pure text method, the introduction of multi-modal information can correct the understanding and cognition of the model (such as the agent), improve the multi-perspective understanding ability of the plurality of agents in the debating process of the unified instruction or question, and further improve the quality of the generated answer.
[0158] In another possible implementation, the second device includes a database corresponding to a plurality of modalities, and the processor 1201 is specifically configured to:
[0159] obtaining the first answer of the first question from a database corresponding to each of the plurality of modalities.
[0160] In yet another possible implementation, the generating the reply content of the first question according to the first answer and the second answer, the processor 1201 is specifically configured to:
[0161] If the second answer meets a preset similarity condition with the first answer, the second answer is determined as the reply content of the first question, and the plurality of agents stop debating.
[0162] In this way, the degree of deviation of the second answer from the first answer is measured by similarity, so as to determine whether the second answer deviates from common sense. The degree of deviation is measured by similarity, the calculation process is easy to implement, and the effect is good. In addition, when the answer generated by the plurality of agents meets the consistency with the first answer retrieved, the debating is stopped in advance. Compared with the method in which all debates reach the maximum number of rounds in the conventional implementation, the application embodiment can greatly reduce the time delay generated in the debating process, and improve the user experience.
[0163] In yet another possible implementation, the processor 1201 is further configured to:
[0164] If the second answer does not meet the preset similarity condition with the first answer, the step of debating the first question by the plurality of agents to obtain the second answer is returned to be executed.
[0165] It can be understood that, according to the conventional operation, the agents need to debate again when they do not reach an agreement. In the embodiment of the application, when the plurality of agents reach an agreement, if the agreement does not reach an agreement with the first answer obtained by retrieval, the plurality of agents also need to debate again, and then perform the consistency judgment with the first answer after reaching an agreement in the debating, until the two reach an agreement or the number of debates reaches a preset upper limit. In this way, the answer with consistency with the first answer can be finally generated with a high probability.
[0166] In yet another possible implementation, the preset similarity condition includes that the similarity exceeds a first similarity threshold.
[0167] In yet another possible implementation, the debating the first question by the plurality of agents to obtain the second answer, the processor 1201 is specifically configured to:
[0168] generating answers of the first question by the plurality of agents respectively and debating based on the generated answers;
[0169] If the debate of the plurality of agents does not reach a consensus, returning to performing the step of generating answers to the first question by the plurality of agents respectively and debating based on the generated answers;
[0170] If the debate of the plurality of agents reaches a consensus, taking the consensus answer as the second answer.
[0171] It can be understood that the debate in the embodiments of the present application is an iterative process. If the answers generated by the plurality of agents do not reach a consensus, the debate will continue until an answer that can reach a consensus is generated or the number of debates reaches a preset upper limit.
[0172] In yet another possible implementation, the processor 1201 is further configured to:
[0173] If the debate of the plurality of agents does not reach a consensus, determining whether the first answer needs to be used as an input for the plurality of agents to generate answers to the first question again according to the answers generated by the plurality of agents; if it is determined that the first answer needs to be used as an input, the input when generating the answers to the first question includes the first answer, and if it is determined that the first answer does not need to be used as an input, the input when generating the answers to the first question does not include the first answer.
[0174] It can be understood that introducing a self-feedback mechanism based on retrieval knowledge guidance can enable the agent to explore its own knowledge boundary and introduce retrieval knowledge evidence (i.e., the first answer) at an appropriate time to improve the quality of model responses and further alleviate the illusion balance phenomenon in the debate process of the plurality of agents.
[0175] In yet another possible implementation, before the plurality of agents debate the first question to obtain a second answer, the processor is further configured to:
[0176] determining a first loss value according to a similarity between a third answer and a fourth answer, wherein the third answer is an answer to a second question obtained from one or more second devices, and the fourth answer is an answer to the second question generated by the first agent;
[0177] determining an updated loss function of the first agent according to the first loss value and a second loss value, wherein the second loss value is a loss of the fourth answer relative to a reference answer;
[0178] updating the first agent through the loss function, wherein the first agent is any one of the plurality of agents.
[0179] In this implementation, the third answer retrieved is used as a guide signal to evaluate the model parameter loss of the agent, i.e., a first loss value, so that a conventional model parameter loss, i.e., a second loss value, is optimized according to the first loss value to obtain a more accurate loss function of the model. The model parameter of the agent is updated by the more accurate loss function, which can improve the quality of the answer generated by the model.
[0180] In yet another possible implementation, the processor 1201 is further configured to output the reply content of the first question through the user interface 1204.
[0181] It should be noted that the implementation and benefits of each operation can also correspond to the description of the corresponding method embodiment shown in FIG. 5.
[0182] The first device shown in the embodiments of the present application can implement the method provided by the embodiments of the present application in the form of hardware, or implement the method provided by the embodiments of the present application in the form of software, etc., and the embodiments of the present application do not limit this.
[0183] In addition, the present application also provides a program for implementing the method executed by the device (e.g., the first device) in the method provided by the present application.
[0184] The present application also provides a storage medium, such as a computer readable storage medium, which stores one or more programs (such as a computer program), when the one or more programs are called by a processor, so that the method provided by the present application is executed by the device (e.g., the first device).
[0185] The present application also provides a storage medium, such as a chip system, which includes one or more processors and one or more memories, the one or more processors are used to read and execute one or more programs stored in the one or more memories, so that the method provided by the present application is executed by the device (e.g., the first device).
[0186] The present application also provides a program product, which includes code or programs, when the code or programs are called by a processor, so that the method provided by the present application is executed by the device (e.g., the first device).
[0187] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for processing information based on a large model, characterized in that, The method applied to a first device comprises: obtaining a first answer to a first question from one or more second devices; debating the first question through a plurality of agents to obtain a second answer; generating a reply content of the first question according to the first answer and the second answer.
2. The method of claim 1, wherein, The first question comprises multi-modal information, and the multi-modal information comprises at least two of text, pictures, videos, and sound.
3. The method of claim 2, wherein, The second device comprises a plurality of databases corresponding to a plurality of modalities, and the obtaining of the first answer to the first question from the one or more second devices comprises: obtaining the first answer to the first question from a database corresponding to each modality of the multi-modal information.
4. The method according to any one of claims 1 to 3, characterized in that, The generating of the reply content of the first question according to the first answer and the second answer comprises: if the second answer meets a preset similarity condition with the first answer, determining the second answer as the reply content of the first question, and stopping the debate of the plurality of agents.
5. The method of claim 4, wherein, Further comprising: if the second answer does not meet the preset similarity condition with the first answer, returning to execute the debating of the first question through the plurality of agents to obtain the second answer.
6. The method according to any one of claims 1 to 5, characterized in that, The debating of the first question through the plurality of agents to obtain the second answer comprises: generating answers to the first question by the plurality of agents respectively and debating based on the generated answers; if the debate of the plurality of agents does not reach an agreement, returning to execute the generating of the answers to the first question by the plurality of agents respectively and the debating based on the generated answers; if the debate of the plurality of agents reaches an agreement, determining the answer reaching the agreement as the second answer.
7. The method of claim 6, wherein, Further comprising: if the debate of the plurality of agents does not reach an agreement, determining whether the first answer needs to be used as an input for the generation of the answers to the first question by each agent according to the answers generated by the plurality of agents; if it is determined that the first answer needs to be used, the input for the generation of the answers to the first question comprises the first answer, and if it is determined that the first answer does not need to be used, the input for the generation of the answers to the first question does not comprise the first answer.
8. The method according to any one of claims 1 to 7, characterized in that, Before the debating of the first question through the plurality of agents to obtain the second answer, further comprising: determining a first loss value according to a similarity between a third answer and a fourth answer, wherein the third answer is an answer to the second question obtained from the one or more second devices, and the fourth answer is an answer to the second question generated by a first agent; determining an updated loss function of the first agent according to the first loss value and a second loss value, wherein the second loss value is a loss of the fourth answer relative to a reference answer; updating the first agent through the loss function, wherein the first agent is any one of the plurality of agents.
9. The method according to any one of claims 1 to 8, characterized in that, Further comprising: outputting the reply content of the first question.
10. An apparatus, comprising: comprising one or more processors and one or more memories, wherein: The one or more memories are configured to store one or more programs, and the one or more processors are configured to invoke the one or more programs for execution of the method of any one of claims 1-9.
11. A storage medium, characterized by The storage medium stores a program, and the program, when executed by a processor, implements the method of any one of claims 1-9.
12. A chip system comprising: The chip system includes one or more processors and one or more memories, and the one or more processors are configured to read and execute one or more programs stored in the one or more memories, for execution of the method of any one of claims 1-9.