CN117573946A - Dialogue sample generation method, chat dialogue large model training method and related devices - Google Patents

Dialogue sample generation method, chat dialogue large model training method and related devices Download PDF

Info

Publication number
CN117573946A
CN117573946A CN202311233602.7A CN202311233602A CN117573946A CN 117573946 A CN117573946 A CN 117573946A CN 202311233602 A CN202311233602 A CN 202311233602A CN 117573946 A CN117573946 A CN 117573946A
Authority
CN
China
Prior art keywords
agent
dialogue
reply
conversation
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311233602.7A
Other languages
Chinese (zh)
Inventor
陈程
彭继东
王丛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202311233602.7A priority Critical patent/CN117573946A/en
Publication of CN117573946A publication Critical patent/CN117573946A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation
    • G06F16/90332Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a conversation sample generation method, a chat conversation large model training method and related devices, and relates to the technical field of artificial intelligence such as intelligent agents, man-machine interaction, generation models, large language models and the like. The method comprises the following steps: acquiring different user agents for mimicking users with different identity attributes; acquiring different answer agents which are answer to questions with different identity attributes; and selecting any user agent and any answer agent to perform dialogue to obtain a dialogue sample, and obtaining corresponding question-call reply by the answer agent through a preset question decision model to the question initiated by the user agent, wherein the user agent and the answer agent are combined with the historical dialogue and the external knowledge not contained in the historical dialogue to perform experience refinement and summarization to form experience data. According to the scheme, enough and as true as possible man-machine conversation samples can be generated, and further, a large chat conversation model which can more accurately understand the complex demands of users and is more anthropomorphic is obtained through training.

Description

Dialogue sample generation method, chat dialogue large model training method and related devices
Technical Field
The present disclosure relates to the field of data processing, and in particular, to the field of artificial intelligence technologies such as an agent, a man-machine interaction, a generation model, a large language model, etc., and more particularly, to a method for generating a dialogue sample and a method for training a large chat dialogue model, and corresponding apparatuses, electronic devices, computer-readable storage media, and computer program products.
Background
Large language models (LLM, large Language Model), which are essentially generative models, also simply generative large language models, have demonstrated powerful NLP (Natural Language Processing ) understanding and generating capabilities.
Current large language models are typically provided to users in the form of chat robots (chatbots) that are intended to simulate human conversations, enabling text or voice interactions with the user. These robots are designed to understand a user's questions, provide answers, perform tasks, or provide assistance without human intervention.
The current generation type dialogue system has poor dialogue effect due to lack of enough and real dialogue samples.
Disclosure of Invention
The embodiment of the disclosure provides a conversation sample generation method, a chat conversation large model training device, electronic equipment, a computer readable storage medium and a computer program product.
In a first aspect, an embodiment of the present disclosure provides a method for generating a dialog sample, including: acquiring different user agents for mimicking users with different identity attributes; acquiring different answer agents which are answer to questions with different identity attributes; and selecting any user agent and any answer agent to perform dialogue to obtain a dialogue sample, and obtaining corresponding question-call reply by the answer agent through a preset question decision model to the question initiated by the user agent, wherein the user agent and the answer agent are combined with the historical dialogue and the external knowledge not contained in the historical dialogue to perform experience refinement and summarization to form experience data.
In a second aspect, an embodiment of the present disclosure proposes a dialog sample generation device, including: a user agent acquisition unit configured to acquire different user agents for mimicking users having different identity properties; a reply agent acquisition unit configured to acquire different reply agents as question respondents having different identity attributes; and the dialogue unit is configured to select any user agent to conduct dialogue with any reply agent to obtain dialogue samples, the reply agent obtains corresponding question-call replies to questions initiated by the user agent through a preset problem decision model, and the user agent and the reply agent are combined with the historical dialogue and external knowledge not contained in the historical dialogue to conduct experience refining and summarization to form experience data.
In a third aspect, an embodiment of the present disclosure provides a chat conversation large model training method, including: obtaining a dialogue sample; wherein the dialog sample is obtained according to the dialog sample generation method described in the first aspect; training an initial chat conversation large model by using the conversation sample to obtain a target chat conversation large model.
In a fourth aspect, an embodiment of the present disclosure provides a chat conversation large model training apparatus, including: a dialogue sample acquisition unit configured to acquire a dialogue sample; wherein the dialog sample is derived from the dialog sample generation device described in the second aspect; and the chat conversation large model training unit is configured to train the initial chat conversation large model by using the conversation sample to obtain a target chat conversation large model.
In a fifth aspect, embodiments of the present disclosure provide an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to implement a conversation sample generation method as described in the first aspect or a chat conversation large model training method as described in the third aspect when executed.
In a sixth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions for enabling a computer to implement a conversation sample generation method as described in the first aspect or a chat conversation large model training method as described in the third aspect when executed.
In a seventh aspect, embodiments of the present disclosure provide a computer program product comprising a computer program which, when executed by a processor, is capable of implementing the steps of the conversation sample generation method as described in the first aspect or the steps of the chat conversation model training method as described in the third aspect.
According to the conversation sample generation scheme and the chat conversation large model training scheme, corresponding conversation role identities are given to different intelligent agents, so that the different intelligent agents can mutually carry out conversation according to the given role identities, conversation and communication processes between real users and machines are simulated as much as possible, enough and as real man-machine conversation samples as possible are obtained, and further the conversation samples can be used for training to obtain the chat conversation large model capable of understanding complex demands of the users and simulating people more accurately.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture in which the present disclosure may be applied;
fig. 2 is a flowchart of a method for generating a dialogue sample according to an embodiment of the disclosure;
FIG. 3 is a flow chart of a method for obtaining full-volume dialog samples provided by an embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for manually review of a dialog sample, provided by an embodiment of the present disclosure;
FIG. 5 is a flowchart of a chat conversation large model training method provided by an embodiment of the present disclosure;
FIG. 6 is a schematic flow chart of generating a dialogue sample and generating a dialogue dual-agent according to an embodiment of the disclosure;
fig. 7 is a block diagram of a dialogue sample generation device according to an embodiment of the present disclosure;
FIG. 8 is a block diagram of a chat conversation large model training apparatus provided in an embodiment of the present disclosure;
Fig. 9 is a schematic structural diagram of an electronic device adapted to perform a method for generating a dialogue sample and/or a method for training a chat conversation model according to an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness. It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
FIG. 1 illustrates an exemplary system architecture 100 to which embodiments of methods, apparatus, electronic devices, and computer-readable storage media for training face recognition models and recognizing faces of the present application may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various applications for implementing information communication between the terminal devices 101, 102, 103 and the server 105, such as an agent generation class application, a dialogue sample generation class application, a chat dialogue model training class application, and the like, may be installed on the terminal devices.
The terminal devices 101, 102, 103 and the server 105 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to smartphones, tablets, laptop and desktop computers, etc.; when the terminal devices 101, 102, 103 are software, they may be installed in the above-listed electronic devices, which may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not particularly limited herein. When the server 105 is hardware, it may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server; when the server is software, the server may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not particularly limited herein.
The server 105 may provide various services through various built-in applications, and for example, a session sample generation class application that may generate a session sample for training a chat session big model, the server 105 may implement the following effects when running the session sample generation class application: firstly, acquiring different user agents for imitating users with different identity attributes; then, different answer agents which are answer to the questions with different identity attributes are obtained; and then, selecting any user agent to carry out dialogue with any reply agent to obtain a dialogue sample, and obtaining corresponding question-call reply by the reply agent through a preset question decision model on the question initiated by the user agent, wherein the user agent and the reply agent are combined with the historical dialogue and the external knowledge not contained in the historical dialogue to carry out experience refinement and summarization to form experience data.
Further, after obtaining enough dialogue samples in the above manner, a large model for chat dialogue can be obtained by training the following manner with the help of the chat dialogue model training class application built in the server 105: firstly, acquiring the dialogue sample in advance; and then training an initial chat conversation large model by using the conversation sample to obtain a target chat conversation large model.
Since obtaining the dialogue sample through the agent needs to occupy more computing resources and stronger computing power, the dialogue sample generation method provided in the embodiments described later is generally executed by the server 105 having stronger computing power and more computing resources, and accordingly, the dialogue sample generation device is also generally disposed in the server 105. However, it should be noted that, when the terminal devices 101, 102, 103 also have the required computing capability and computing resources, the terminal devices 101, 102, 103 may also complete each operation performed by the server 105 through the session sample generation class application installed thereon, and further output the same result as the server 105. Correspondingly, the dialog sample generation device can also be provided in the terminal device 101, 102, 103. In this case, the exemplary system architecture 100 may also not include the server 105 and the network 104.
Of course, the server used to train the large model of chat conversations may be different from the server used to generate the conversation samples. In particular, the large chat conversation model trained by the server 105 can also obtain a lightweight chat conversation model suitable for being put into the terminal devices 101, 102 and 103 in a model distillation manner, and the lightweight chat conversation model in the terminal devices 101, 102 and 103 can be flexibly selected according to the identification accuracy of actual requirements, or a more complex chat conversation large model in the server 105 can be selected.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring to fig. 2, fig. 2 is a flowchart of a method for generating a dialogue sample according to an embodiment of the disclosure, wherein a flowchart 200 includes the following steps:
step 201: acquiring different user agents for mimicking users with different identity attributes;
this step aims at obtaining, by an executing entity of the dialog sample generation method (e.g. the server 105 shown in fig. 1), different user agents for mimicking users with different identity properties.
Among them, smart technology is an important concept in the field of artificial intelligence, which refers to computing systems that are capable of sensing environments, making decisions, and performing actions. These agents may be virtual, software-based, or may be physical, hardware devices. The intelligent agent technology has the following technical points:
sensing: the agent is able to sense its surrounding environment. This includes using sensors, cameras, microphones, etc. to obtain information about the outside world. In the technical development of the fields of computer vision, natural language processing, voice recognition and the like, the perception capability of an intelligent body is obviously enhanced;
Decision making: the agent is able to make decisions based on the information it perceives. This typically involves predicting the best action or strategy using techniques such as machine learning, rules engine or deep reinforcement learning;
the actions are performed: the agent can take action to make its decision. This may include physical actions such as robots performing tasks, and may also include virtual actions such as chat robots generating text responses;
learning and adaptation: agents typically have learning capabilities and can be improved empirically to maintain their performance. This may be achieved by techniques such as supervised learning, reinforcement learning or self-supervised learning;
and (3) interaction: the agent may interact with a human user or other agent. This includes understanding and generating natural language, recognizing emotion and emotion, and communicating in a user friendly manner.
In order to enable an agent to more accurately mimic humans, this may be accomplished by assigning it corresponding human role attributes, which may include: age, gender, occupation, question-initiated identity, mood, personality, manner of dialog, history information, preferences, desired results.
Wherein the age attribute may make it appear young or older, which may affect its manner of interaction and the content of the conversation. For example, a younger looking agent may be more inclined to use modern popular words, while a older looking agent may be more formal;
The gender attribute may impart gender characteristics to the agent male, female, or neutral. This can affect its language and communication style. For example, an agent given female gender attribute may use a softer tone;
an agent may be designed to possess specific professional properties, such as doctors, teachers, engineers, etc. This determines its expertise and degree of knowledge about a particular topic;
the question initiation identity is different from the occupation of the agent imitating the user, and is used for locating the user to initiate a question with which identity to influence the subsequent reply direction, such as a patient, a leader, staff, investors, staff, and the like;
the mood attribute affects the way the agent speaks. It may be friendly, official, humorous, earnest, etc. The mood attribute is helpful for the agent to adapt to different dialogue scenes;
the personality attributes determine the personality characteristics of the agent, such as optimistic, serious, benign, etc. The character attribute can enable the intelligent agent to establish emotion connection with the user more easily;
conversational mode: dialog style attributes relate to how an agent handles different types of dialog, including questions and answers, suggestions, pacifies, and the like. This helps the agent to better meet the needs of the user;
History information: the agent may store previous conversations and interaction histories to better understand the needs of the user and provide a consistent conversational experience;
preference: the agent may learn about the user's preferences, such as food, music, movies, etc., in order to provide more relevant advice and information;
the desired result is: the agent can learn what information or help the user wishes to obtain from the interaction, which helps the agent better meet the user's expectations.
These identity attributes may be combined together, alone or in combination, to create various types of anthropomorphic agents to meet the needs of different users and applications.
Assuming that the user agent is a patient agent mimicking a patient, the question-call initiation identity in the corresponding configurable identity attribute may include: patient, physician, etc., the dialog may include: medical knowledge consultation (which can be further subdivided into symptom consultation, current disease development direction, medicine use consultation, medical machinery use consultation, sequelae and the like), and history information comprises: historical visit logs, family history information, etc., the desired results may then include: symptom relief, regression or even cure, or control of non-metastasis of lesions, etc. within a preset period of time.
Step 202: acquiring different answer agents which are answer to questions with different identity attributes;
on the basis of step 201, this step aims at obtaining different answer agents as answer to questions with different identity properties. In contrast to human users, which are typically questioners, which are mostly machines or robots, anthropomorphic agents also exist as answer agents in some cases.
Thus, when the reply agent is an anthropomorphic reply agent, the configurable identity attributes of the anthropomorphic reply agent include at least one of: age, gender, occupation, mood, personality, manner of dialogue, history information, responsibility, and stamina (i.e., most identity attributes are consistent with those that anthropomorphic user agents may possess). The responsibility attribute is a description attribute of how the answer agent should answer questions in question in order to determine how the answer agent answers questions in question, for example, responsibility may be "responsible for answering questions about drug use for patients," and other domain questions can only be briefly answered.
Taking the anthropomorphic response agent as an example of a doctor agent mimicking a doctor, the profession in the corresponding configurable identity attribute may include: the dialogue modes can include: solving the medical knowledge problem, responsibilities may include: and carrying out risk prompt on the mentioned risks of various medicines, medical instruments and operations. Meanwhile, in order to take care of the patient or the emotion of the patient, the mood may be set to be gentle, the tolerance level may be set to be high, and the like.
When the reply agent is a non-anthropomorphic robotic reply agent, the configurable identity attributes of the robotic reply agent include at least one of: mood, response speed, responsibility, dialogue mode, history information. I.e. the robotic reply agent should be configured to embody part of its properties belonging to the robot, such as a constant or fixed speech rate, etc., as compared to an anthropomorphic reply agent.
Taking the robotic reply agent as an example of a medical knowledge robotic reply agent that replies to questions in the medical field, the responsibilities in the corresponding configurable identity attributes may include: the comprehensive reply is carried out according to the medical knowledge recorded in the knowledge base of the medical field, the risks of various medicines, medical instruments and operations are prompted, and the relevant reply speed can be set to be consistent with the speech speed of common human beings, but at fixed intervals, and the like.
In addition, the answer agent obtains a corresponding question reply to the question initiated by the currently-conducting user agent through a preset question decision model, for example, a conventional question decision model or a question diagnosis model is used, that is, the ability of the answer agent to answer the question comes from the used question decision or question diagnosis model, and the present disclosure does not specifically limit the specific model and generation process of the question decision or question diagnosis model, but only serves as the prior art.
Step 203: and selecting any user agent to perform dialogue with any reply agent to obtain a dialogue sample.
Based on step 201 and step 202, this step aims at selecting any user agent to perform a dialogue with any reply agent by the executing agent, so as to obtain a dialogue sample recorded with dialogue content, where one dialogue sample should be a sample containing one complete dialogue content.
Wherein the user agent and the response agent both refine and summarize experience in combination with the historical dialog and external knowledge not contained within the historical dialog to form experience data. The system has the capability of recording all historical dialogs of a user as shallow recording streams, and has the experience summarizing capability of summarizing, precipitating and reflecting the content of the historical dialogs by combining external knowledge, and refining into thinking and personal experience, namely, the user agent or the reply agent. In particular, the empirical data may be used to influence preferences or priorities of selecting response content when responding to subsequent questions by the responding agent, and may also be used to modify the user agent's question content.
The external knowledge includes: based on group experience and full network knowledge corresponding to behaviors generated by other users in other systems, the external knowledge is recorded in a preset database and is acquired by a user agent or a reply agent in an access mode.
In particular, group experience may be the behavior of other roles in other systems, such as search data, inquiry data, and so forth. Generally, user intelligence will use this knowledge; full network knowledge such as knowledge available from all papers, documents, specialized databases, search engines, specialized platforms, enterprise materials, etc., is typically used by reply agents.
According to the dialogue sample generation method, corresponding dialogue role identities are given to different intelligent agents, so that the different intelligent agents can mutually perform dialogue according to the given role identities, the dialogue and communication process between a real user and a machine can be simulated as much as possible, enough and as real man-machine dialogue samples can be obtained, and further the dialogue samples can be used for training to obtain a chat dialogue large model capable of understanding complex demands of the user and simulating people more accurately.
Referring to fig. 3, fig. 3 is a flowchart of a method for obtaining a full-scale dialogue sample according to an embodiment of the present disclosure, in which a specific implementation is provided for step 203 in the flowchart 200 shown in fig. 2, other steps in the flowchart 200 are not adjusted, and the specific implementation provided in the embodiment is replaced by the step 203 to obtain a new complete embodiment. Wherein the process 300 comprises the steps of:
Step 301: controlling each user agent to respectively carry out dialogue with each reply agent for preset times;
the method comprises the steps that the execution main body respectively controls each user intelligent agent to respectively perform conversations with each different reply intelligent agent for preset times, so that various conversation combinations of the user and the reply intelligent agents are obtained, and the conversation actions are performed for a plurality of times by controlling each conversation combination, so that conversation samples which are comprehensive and sufficient in quantity and have various identity attributes are finally collected.
Step 302: and attaching the serial numbers of the corresponding user agent and the corresponding reply agent to each recorded dialogue content to obtain a full dialogue sample.
Based on step 301, this step aims at attaching the corresponding user agent and the number label of the reply agent to each recorded dialogue content by the executing agent, so as to obtain a full dialogue sample.
It should be appreciated that the same dialog combination will have the same numbered labels for the same user agent and reply agent (e.g., U1-B2, i.e., the dialog combination of the corresponding user agent with the designation U1 and the reply agent with the designation B2), and therefore, in order to distinguish different dialog samples generated by the same dialog combination under different dialog behaviors, a secondary label (e.g., U1-b2—01, i.e., the dialog sample of the first dialog behavior under the dialog combination) may also be added to the numbered labels in order of time of the different behaviors of the different dialog behaviors.
Therefore, through the conversation behavior proceeding mode and the label marking system, a full-quantity conversation sample which is convenient for inquiring and tracing is obtained, and further comprehensive type and quantity requirements of various identity attributes are considered.
Referring to fig. 4, fig. 4 is a flowchart of a method for manually checking a dialogue sample according to an embodiment of the disclosure, which may further include corresponding processing steps on the basis of the embodiment shown in fig. 2 or the embodiment shown in fig. 3, so as to obtain a new complete embodiment. Wherein the process 400 comprises the steps of:
step 401: manually rechecking dialogue contents and dialogue effectiveness in a dialogue sample;
step 402: and adjusting identity attributes or intelligent parameters of the user intelligent agent and the reply intelligent agent which generate corresponding dialogue samples according to the result of the manual review.
The present embodiment aims at manually checking the dialogue content and the validity of the dialogue in the dialogue sample by the executing body, for example, manually checking whether the dialogue content contains obvious knowledge errors or ambiguous expressions, and whether the pertinence replies given by the user agent-initiated dialogue and the reply agent are actually effective in trying to understand and solve the dialogue, instead of being deviated. And then according to the artificial rechecking result, the identity attribute or the intelligent body parameter of the user intelligent body and the reply intelligent body which generate the corresponding dialogue sample are adjusted so as to correct the related problems of the intelligent body in the artificial rechecking process by adjusting the parameter.
The above embodiments illustrate, in various aspects, how to generate a dialogue sample that is as realistic as possible by means of a user agent and a reply agent, and in order to highlight, as far as possible, a subsequent use manner of the generated dialogue sample from an actual use scenario, the disclosure further provides, through fig. 5, a specific use manner, a flow 500 of which includes the following steps:
step 501: obtaining a dialogue sample;
the dialog sample obtained in this step is the dialog sample obtained after the user agent and the reply agent are controlled to perform dialog finally in the above embodiment.
Step 502: training an initial chat conversation large model by using the conversation sample to obtain a target chat conversation large model.
Based on step 501, this step aims to train an initial chat conversation big model by using a conversation sample to obtain a target chat conversation big model.
The target chat session large model is a generated large language model constructed based on the generated model and the large language model technology, so that the target chat session large model is required to be trained according to a training mode of the generated large language model.
Taking the above mentioned medical knowledge field as an example, the solution provided by this embodiment may be specifically: the method comprises the steps of obtaining a medical dialogue sample which is obtained by arranging dialogue contents initiated by a patient agent and a doctor agent or a medical knowledge robot in reply to the medical field knowledge of the agent, and training an initial medical dialogue large model by using the medical dialogue sample, so as to obtain a target medical dialogue large model which can be specifically applied to the medical field and provides better reply for a medical related question initiated by a user.
Of course, besides the medical field for which the above embodiment refers, the above solution may be applied to other fields such as legal fields, commodity customer service, etc., and when applied to other fields, the corresponding identity attribute of the corresponding agent may be configured correspondingly in combination with the unique characteristics or requirements in the actual field, so as to adapt to the field.
In other words, according to the embodiment, corresponding dialogue role identities are assigned to different agents, so that the different agents can mutually perform dialogue according to the assigned role identities, thereby simulating the actual dialogue and communication process between a user and a machine as much as possible, obtaining enough and as real man-machine dialogue samples as possible, and further obtaining a chat dialogue large model capable of more accurately understanding the complex needs of the user and more fitting people by training using the dialogue samples.
To deepen understanding, the present disclosure provides a specific implementation scheme from a chat dialogue requirement that is proposed in a real scenario to construct a good and accurate answer to a medicine use knowledge question presented by a user:
based on the safety consideration of medicine use, aiming at the related questions of medicine use knowledge, a reply robot is usually constructed in advance to reply to the questions initiated by the user, but after investigation on the current dialogue system provided in the existing scene, the following problems are found: 1) Generally, only a robot (bot or robot) model is built in an important way, a user initiating a question is not modeled, and the fact that the user as a complex individual in actual existence has strong individual characteristics is ignored; 2) Only the satisfaction rate of the bot for the reply of a certain round of problems is focused on.
In a real-world dialogue scenario, the real user who wants to initiate a question is entered into the dialogue system with a strong individual feature, and the user does not follow the guidance of the bot completely, nor does he care about the satisfaction rate of the bot single round/single answer. Therefore, this embodiment proposes to model both the user who initiates the question and the robot who answers the question, so that the real dialogue system can be described as much as possible.
The embodiment realizes a real dialogue sample simulation generation method by constructing a user agent and a non-human robot agent. Thereby building a more intelligent chat conversation system. Whether the user agent or the robot agent can be constructed according to the following agent construction mode:
first, the following parameters are set for the agent:
1. character attribute (or title attribute): long-term attributes of an agent such as age, gender, goal, or responsibility. Such as:
a) User role (User agent): you are a diabetic, male, 45 years old, currently in the second stage of diabetes, hopefully to effectively control the disease not to progress;
b) Botrol (robot agent): you are the intelligent instruction robot of metformin hydrochloride tablet, the women, responsible for answering the patient's question to this medicine, answer the question and confuse.
2. Shallow memory flow: all dialogue records of the agent in the system are memorized in time. And (5) storing the whole amount without deleting. It may be stored in a database using a data structure of [ role-id, time, dialogue ];
3. deep retrospective: summarizing, precipitating, and reflecting shallow memory flow and external knowledge, refining into thinking and personal experience. It may be stored in a database using a data structure of [ role-id, time, thought ]. While the external knowledge can come from two parts: group experience and full network knowledge. The group experience can be the behavior of other roles in other systems, such as search data, inquiry data, and the like. Generally, user intelligence will use this knowledge; full web knowledge is knowledge available from, for example, all papers, documents, specialized databases, search engines, specialized platforms, enterprise materials, etc., which the bot agent typically uses.
After the construction of the user agent and the machine agent is completed according to the above steps, the generation of the dialogue sample may be completed with reference to the flow chart shown in fig. 6:
1) Obtaining a current state; 2) Obtaining overall role setting; 3) Personal experiences are searched, including shallow memory, deep thinking, and external knowledge required for searching. Comprehensively obtaining all information; 4) And (5) comprehensive decision making. The decision maker can be realized by another common neural network or a large language model which is specially used for providing decisions and is responsible for summarizing, analyzing and reasoning all the information searched in the step 3 to obtain a final conclusion; 5) The next action is determined. Wherein the next action may include: and the generated dialogue samples are arranged and summarized and then are used for training a chat dialogue large model special for the field of medicine knowledge problems.
With further reference to fig. 7 and 8, as implementations of the methods shown in the foregoing figures, the present disclosure provides a session sample generating device embodiment and an embodiment of a chat conversation large model training device, respectively, where the session sample generating device embodiment corresponds to the session sample generating method embodiment shown in fig. 2, and the chat conversation large model training device embodiment corresponds to the chat conversation large model training method embodiment. The device can be applied to various electronic equipment.
As shown in fig. 7, the dialog sample generation device 700 of the present embodiment may include: a user agent acquisition unit 701, a reply agent acquisition unit 702, and a dialogue unit 703. Wherein, the user agent acquisition unit 701 is configured to acquire different user agents for mimicking users with different identity properties; a reply agent acquisition unit 702 configured to acquire different reply agents as question respondents having different identity attributes; and a dialogue unit 703 configured to select any user agent to perform dialogue with any reply agent to obtain a dialogue sample, wherein the reply agent obtains a corresponding question-call reply to the question-call initiated by the user agent through a preset question decision model, and the user agent and the reply agent combine the history dialogue and external knowledge not included in the history dialogue to perform experience refinement and summary to form experience data.
In the present embodiment, in the dialogue sample generation device 700: the specific processes of the user agent acquisition unit 701, the reply agent acquisition unit 702, and the dialogue unit 703 and the technical effects thereof may refer to the relevant descriptions of steps 201 to 203 in the corresponding embodiment of fig. 2, and are not described herein.
In some optional implementations of this embodiment, the configurable identity attribute of the user agent includes at least one of:
age, gender, occupation, mood, personality, manner of conversation, historical information, preferences, and desired results.
In some alternative implementations of the present embodiment, in response to the response agent being an anthropomorphic response agent, the configurable identity attribute of the anthropomorphic response agent comprises at least one of:
age, gender, occupation, mood, personality, manner of conversation, historical information, responsibility, and stamina.
In some optional implementations of this embodiment, in response to the agent being a non-anthropomorphic robotic reply agent, the configurable identity attribute of the robotic reply agent includes at least one of:
mood, response speed, responsibility, dialogue mode, history information.
In some alternative implementations of the present embodiment, the external knowledge includes: based on group experience and whole network knowledge corresponding to behaviors generated by other users in other systems, external knowledge is recorded in a preset database and is acquired by a user agent or a reply agent in an access mode.
In some alternative implementations of the present embodiment, dialog unit 703 may be further configured to;
controlling each user agent to respectively carry out dialogue with each reply agent for preset times;
and attaching the serial numbers of the corresponding user agent and the corresponding reply agent to each recorded dialogue content to obtain a full dialogue sample.
In some optional implementations of the present embodiment, the dialog sample generating apparatus 700 may further include:
the manual rechecking unit is configured to manually recheck the dialogue content and the dialogue validity in the dialogue sample;
an agent adjustment unit configured to adjust identity attributes or agent parameters of the user agent and the reply agent that generate the corresponding dialogue sample according to the result of the manual review:
as shown in fig. 8, the chat conversation large model training apparatus 800 of the present embodiment may include: session sample acquisition section 801, chat session large model training section 802. Wherein, a dialogue sample acquisition unit 801 is configured to acquire a dialogue sample; wherein the dialog samples are obtained based on the dialog sample generation device 700; chat conversation large model training unit 802 configured to train the initial chat conversation large model using the conversation sample to obtain a target chat conversation large model.
In this embodiment, in the chat conversation large model training apparatus 800: the specific processing of the session sample obtaining unit 801 and the chat session big model training unit 802 and the technical effects thereof may be referred to the related description in the method embodiment corresponding to fig. 6, and are not described herein again.
The embodiment exists as an embodiment of a device corresponding to the embodiment of the method, and the device for generating the dialogue sample and the training device for the chat dialogue large model provided by the embodiment endow different intelligent agents with corresponding dialogue role identities, so that the different intelligent agents can mutually perform dialogue according to the endowed role identities, thereby simulating the actual dialogue and communication process between a user and a machine as much as possible, obtaining enough and as true man-machine dialogue samples as possible, and further training by using the dialogue samples to obtain the chat dialogue large model capable of understanding the complex requirements of the user and simulating people more accurately.
According to an embodiment of the present disclosure, the present disclosure further provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to implement the conversation sample generation method and/or chat conversation large model training method described in any of the embodiments above when executed.
According to an embodiment of the present disclosure, there is further provided a readable storage medium storing computer instructions for enabling a computer to implement the conversation sample generation method and/or the chat conversation large model training method described in any of the above embodiments when executed.
The disclosed embodiments provide a computer program product which, when executed by a processor, is capable of carrying out the steps of the conversation sample generation method and/or the steps of the chat conversation large model training method described in any of the embodiments above.
Fig. 9 shows a schematic block diagram of an example electronic device 900 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the apparatus 900 includes a computing unit 901 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
Various components in device 900 are connected to I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, or the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, an optical disk, or the like; and a communication unit 909 such as a network card, modem, wireless communication transceiver, or the like. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as a conversation sample generation method and/or a chat conversation large model training method. For example, in some embodiments, the conversation sample generation method and/or the chat conversation model wide training method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the conversation sample generation method and/or chat conversation large model training method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the conversation sample generation method and/or the chat conversation large model training method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and virtual private server (VPS, virtual Private Server) service.
According to the technical scheme, the corresponding conversation role identities are given to different intelligent agents, so that the different intelligent agents can mutually carry out conversation according to the given role identities, conversation and communication processes between real users and machines are simulated as much as possible, enough and as real man-machine conversation samples as much as possible can be obtained, and further the conversation samples can be used for training to obtain a chat conversation large model capable of accurately understanding complex demands of the users and simulating people.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (27)

1.种对话样本生成方法,包括:1. A method for generating dialogue samples, including: 获取用于模仿具有不同身份属性用户的不同用户智能体;Obtain different user agents used to imitate users with different identity attributes; 获取作为具有不同身份属性的问题答复者的不同答复智能体;Obtain different reply agents that are question respondents with different identity attributes; 选择任一所述用户智能体与任一所述答复智能体进行对话,得到对话样本,所述答复智能体对所述用户智能体所发起的问话通过预设的问题决策模型得到相应的问话回复,所述用户智能体和所述答复智能体均结合历史对话和未包含在所述历史对话内的外部知识进行经验的提炼和总结形成经验数据。Select any of the user agents to have a dialogue with any of the reply agents to obtain a dialogue sample. The questions initiated by the reply agents to the user agents obtain corresponding questions through a preset question decision-making model. When replying, both the user agent and the reply agent combine historical conversations and external knowledge not included in the historical conversations to refine and summarize experiences to form experience data. 2.根据权利要求1所述的方法,其中,所述用户智能体的可配置身份属性包括以下至少一项:2. The method of claim 1, wherein the configurable identity attributes of the user agent include at least one of the following: 年龄、性别、职业、问话发起身份、语气、性格、对话方式、历史信息、偏好、期望结果。Age, gender, occupation, question initiating identity, tone, personality, conversation style, historical information, preferences, expected results. 3.根据权利要求2所述的方法,其中,响应于所述用户智能体为模仿患者的患者智能体,对应的,所述问话发起身份包括:患者,所述对话方式包括:医疗知识咨询,所述历史信息包括:历史就诊日志,所述期望结果包括:在预设时长内症状消退。3. The method according to claim 2, wherein in response to the user agent being a patient agent imitating a patient, correspondingly, the questioning initiating identity includes: patient, and the conversation method includes: medical knowledge consultation. , the historical information includes: historical medical treatment log, and the expected result includes: symptoms subside within a preset time period. 4.根据权利要求1所述的方法,其中,响应于所述答复智能体为拟人的拟人答复智能体,所述拟人答复智能体的可配置身份属性包括以下至少一项:4. The method of claim 1, wherein in response to the reply agent being an anthropomorphic reply agent, the configurable identity attribute of the anthropomorphic reply agent includes at least one of the following: 年龄、性别、职业、语气、性格、对话方式、历史信息、职责、耐心程度。Age, gender, occupation, tone, personality, conversational style, historical information, responsibilities, patience level. 5.根据权利要求4所述的方法,其中,响应于所述拟人答复智能体为模仿医生的医生智能体,对应的,所述职业包括:医生,所述对话方式包括:解答医疗知识问题,所述职责包括:对提及的各种药品、医疗器械、手术的风险进行风险提示。5. The method according to claim 4, wherein the agent responding to the anthropomorphic reply is a doctor agent imitating a doctor, correspondingly, the profession includes: a doctor, and the conversation method includes: answering medical knowledge questions, The responsibilities include: providing risk warnings on the risks of various drugs, medical devices, and surgeries mentioned. 6.根据权利要求4所述的方法,其中,响应于所述智能体为非拟人的机器人答复智能体,所述机器人答复智能体的可配置身份属性包括以下至少一项:6. The method of claim 4, wherein in response to the agent being a non-anthropomorphic robot reply agent, the configurable identity attribute of the robot reply agent includes at least one of the following: 语气、答复速度、职责、对话方式、历史信息。Tone, speed of response, responsibilities, conversational style, historical information. 7.根据权利要求6所述的方法,其中,响应于机器人答复智能体为对医疗领域下的问题进行答复的医疗知识机器人答复智能体,对应的,所述职责包括:按在医疗领域知识库内记录的医疗知识进行全面回复、对提及的各种药品、医疗器械、手术的风险进行风险提示。7. The method according to claim 6, wherein the robot reply agent is a medical knowledge robot reply agent that responds to questions in the medical field. Correspondingly, the responsibilities include: pressing in the medical field knowledge base Comprehensively reply to the medical knowledge recorded in the website, and provide risk warnings on the risks of various drugs, medical devices, and surgeries mentioned. 8.根据权利要求1所述的方法,其中,所述外部知识包括:基于其他用户在其它系统中所产生行为对应的群体经验和全网知识,所述外部知识被记录在预设数据库中、通过访问的方式被所述用户智能体或所述答复智能体获取。8. The method according to claim 1, wherein the external knowledge includes: group experience and network-wide knowledge corresponding to behaviors generated by other users in other systems, the external knowledge is recorded in a preset database, Obtained by the user agent or the reply agent through access. 9.根据权利要求1-7任一项所述的方法,其中,所述选择任一所述用户智能体与任一所述答复智能体进行对话,得到对话样本,包括;9. The method according to any one of claims 1 to 7, wherein the selecting any of the user agents to have a conversation with any of the reply agents to obtain a conversation sample includes; 控制每个所述用户智能体分别与每个所述答复智能体均进行预设次数的对话;Control each user agent to conduct a preset number of conversations with each reply agent; 将记录下的每份对话内容附加相应的用户智能体和答复智能体的编号标签,得到全量对话样本。Attach the corresponding number tags of the user agent and reply agent to each recorded conversation content to obtain a full set of conversation samples. 10.根据权利要求9所述的方法,还包括:10. The method of claim 9, further comprising: 对所述对话样本中的对话内容和对话有效性进行人工复核;Manually review the dialogue content and dialogue validity in the dialogue samples; 根据所述人工复核的结果调整产生出相应对话样本的用户智能体和答复智能体的身份属性或智能体参数。The identity attributes or agent parameters of the user agent and the reply agent that generate the corresponding dialogue sample are adjusted according to the results of the manual review. 11.一种聊天对话大模型训练方法,包括:11. A method for training a large chat dialogue model, including: 获取对话样本;其中,所述对话样本基于权利要求1-10任一项所提供的对话样本生成方法得到;Obtain a dialogue sample; wherein the dialogue sample is obtained based on the dialogue sample generation method provided in any one of claims 1-10; 利用所述对话样本训练初始的聊天对话大模型,得到目标聊天对话大模型。The dialogue samples are used to train an initial large chat dialogue model to obtain a target chat dialogue large model. 12.根据权利要求11所述的方法,其中,所述获取对话样本,包括:12. The method according to claim 11, wherein said obtaining dialogue samples includes: 获取由患者智能体与医生智能体或医疗知识机器人答复智能体就医疗领域知识发起的对话内容所整理得到的医疗对话样本;Obtain medical dialogue samples compiled by the dialogue content initiated by the patient agent and the doctor agent or the medical knowledge robot in response to the agent's knowledge in the medical field; 对应的,所述利用所述对话样本训练初始的聊天对话大模型,得到目标聊天对话大模型,包括:Correspondingly, using the conversation sample to train an initial large chat dialogue model to obtain a target chat dialogue large model includes: 利用所述医疗对话样本训练初始的医疗对话大模型,得到目标医疗对话大模型。The medical dialogue sample is used to train an initial large medical dialogue model to obtain a target medical dialogue large model. 13.一种对话样本生成装置,包括:13. A dialogue sample generating device, including: 用户智能体获取单元,被配置成获取用于模仿具有不同身份属性用户的不同用户智能体;A user agent acquisition unit configured to acquire different user agents used to imitate users with different identity attributes; 答复智能体获取单元,被配置成获取作为具有不同身份属性的问题答复者的不同答复智能体;a reply agent acquisition unit configured to acquire different reply agents that are question respondents with different identity attributes; 对话单元,被配置成选择任一所述用户智能体与任一所述答复智能体进行对话,得到对话样本,所述答复智能体对所述用户智能体所发起的问话通过预设的问题决策模型得到相应的问话回复,所述用户智能体和所述答复智能体均结合历史对话和未包含在所述历史对话内的外部知识进行经验的提炼和总结形成经验数据。The dialogue unit is configured to select any of the user agents to have a dialogue with any of the reply agents to obtain a dialogue sample, and the questions initiated by the reply agents to the user agents are passed through preset questions. The decision-making model obtains a corresponding question reply, and both the user agent and the reply agent combine historical conversations and external knowledge not included in the historical conversations to refine and summarize experience to form experience data. 14.根据权利要求13所述的装置,其中,所述用户智能体的可配置身份属性包括以下至少一项:14. The apparatus of claim 13, wherein the user agent's configurable identity attributes include at least one of the following: 年龄、性别、职业、问话发起身份、语气、性格、对话方式、历史信息、偏好、期望结果。Age, gender, occupation, question initiating identity, tone, personality, conversation style, historical information, preferences, expected results. 15.根据权利要求14所述的方法,其中,响应于所述用户智能体为模仿患者的患者智能体,对应的,所述问话发起身份包括:患者,所述对话方式包括:医疗知识咨询,所述历史信息包括:历史就诊日志,所述期望结果包括:在预设时长内症状消退。15. The method according to claim 14, wherein in response to the user agent being a patient agent imitating a patient, correspondingly, the questioning initiating identity includes: patient, and the conversation method includes: medical knowledge consultation. , the historical information includes: historical medical treatment log, and the expected result includes: symptoms subside within a preset time period. 16.根据权利要求13所述的装置,其中,响应于所述答复智能体为拟人的拟人答复智能体,所述拟人答复智能体的可配置身份属性包括以下至少一项:16. The apparatus of claim 13, wherein in response to the replying agent being an anthropomorphic replying agent, the configurable identity attribute of the anthropomorphic replying agent includes at least one of the following: 年龄、性别、职业、语气、性格、对话方式、历史信息、职责、耐心程度。Age, gender, occupation, tone, personality, conversational style, historical information, responsibilities, patience level. 17.根据权利要求16所述的方法,其中,响应于所述拟人答复智能体为模仿医生的医生智能体,对应的,所述职业包括:医生,所述对话方式包括:解答医疗知识问题,所述职责包括:对提及的各种药品、医疗器械、手术的风险进行风险提示。17. The method according to claim 16, wherein the anthropomorphic reply agent is a doctor agent that imitates a doctor, correspondingly, the profession includes: a doctor, and the conversation method includes: answering medical knowledge questions, The responsibilities include: providing risk warnings on the risks of various drugs, medical devices, and surgeries mentioned. 18.根据权利要求13所述的装置,其中,响应于所述智能体为非拟人的机器人答复智能体,所述机器人答复智能体的可配置身份属性包括以下至少一项:18. The apparatus of claim 13, wherein in response to the agent being a non-anthropomorphic robotic reply agent, the configurable identity attribute of the robotic reply agent includes at least one of the following: 语气、答复速度、职责、对话方式、历史信息。Tone, speed of response, responsibilities, conversational style, historical information. 19.根据权利要求18所述的方法,其中,响应于机器人答复智能体为对医疗领域下的问题进行答复的医疗知识机器人答复智能体,对应的,所述职责包括:按在医疗领域知识库内记录的医疗知识进行全面回复、对提及的各种药品、医疗器械、手术的风险进行风险提示。19. The method according to claim 18, wherein the responding robot reply agent is a medical knowledge robot reply agent that responds to questions in the medical field, and correspondingly, the responsibilities include: pressing in the medical field knowledge base Comprehensively reply to the medical knowledge recorded in the website, and provide risk warnings on the risks of various drugs, medical devices, and surgeries mentioned. 20.根据权利要求13所述的装置,其中,所述外部知识包括:基于其他用户在其它系统中所产生行为对应的群体经验和全网知识,所述外部知识被记录在预设数据库中、通过访问的方式被所述用户智能体或所述答复智能体获取。20. The device according to claim 13, wherein the external knowledge includes: group experience and network-wide knowledge based on behaviors generated by other users in other systems, and the external knowledge is recorded in a preset database, Obtained by the user agent or the reply agent through access. 21.根据权利要求13-20任一项所述的装置,其中,所述对话单元被进一步配置成;21. The device according to any one of claims 13-20, wherein the conversation unit is further configured to; 控制每个所述用户智能体分别与每个所述答复智能体均进行预设次数的对话;Control each user agent to conduct a preset number of conversations with each reply agent; 将记录下的每份对话内容附加相应的用户智能体和答复智能体的编号标签,得到全量对话样本。Attach the corresponding number tags of the user agent and reply agent to each recorded conversation content to obtain a full set of conversation samples. 22.根据权利要求21所述的装置,还包括:22. The device of claim 21, further comprising: 人工复核单元,被配置成对所述对话样本中的对话内容和对话有效性进行人工复核;A manual review unit configured to manually review the dialogue content and dialogue validity in the dialogue sample; 智能体调整单元,被配置成根据所述人工复核的结果调整产生出相应对话样本的用户智能体和答复智能体的身份属性或智能体参数。The agent adjustment unit is configured to adjust the identity attributes or agent parameters of the user agent and the reply agent that generate the corresponding dialogue sample according to the result of the manual review. 23.一种聊天对话大模型训练装置,包括:23. A chat dialogue large model training device, including: 对话样本获取单元,被配置成获取对话样本;其中,所述对话样本基于权利要求13-22任一项所提供的对话样本生成装置得到;A dialogue sample acquisition unit configured to acquire a dialogue sample; wherein the dialogue sample is obtained based on the dialogue sample generation device provided in any one of claims 13-22; 聊天对话大模型训练单元,被配置成利用所述对话样本训练初始的聊天对话大模型,得到目标聊天对话大模型。The chat dialogue large model training unit is configured to use the dialogue sample to train an initial chat dialogue large model to obtain a target chat dialogue large model. 24.根据权利要求23所述的装置,其中,所述对话样本获取单元被进一步配置成:24. The device of claim 23, wherein the conversation sample acquisition unit is further configured to: 获取由患者智能体与医生智能体或医疗知识机器人答复智能体就医疗领域知识发起的对话内容所整理得到的医疗对话样本;Obtain medical dialogue samples compiled by the dialogue content initiated by the patient agent and the doctor agent or the medical knowledge robot in response to the agent's knowledge in the medical field; 对应的,所述聊天对话大模型训练单元被进一步配置成:Correspondingly, the chat dialogue large model training unit is further configured to: 利用所述医疗对话样本训练初始的医疗对话大模型,得到目标医疗对话大模型。The medical dialogue sample is used to train an initial large medical dialogue model to obtain a target medical dialogue large model. 25.一种电子设备,包括:25. An electronic device, including: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-10中任一项所述的对话样本生成方法和/或权利要求11-12任一项所述的聊天对话大模型训练方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of claims 1-10. The dialogue sample generation method and/or the chat dialogue large model training method according to any one of claims 11-12. 26.一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行权利要求1-10中任一项所述的对话样本生成方法和/或权利要求11-12任一项所述的聊天对话大模型训练方法。26. A non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause the computer to execute the conversation sample generation method according to any one of claims 1-10 and/or claim 11 -The chat dialogue large model training method described in any of 12. 27.一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现根据权利要求1-10中任一项所述对话样本生成方法的步骤和/或权利要求11-12任一项所述聊天对话大模型训练方法的步骤。27. A computer program product, comprising a computer program that, when executed by a processor, implements the steps of the conversation sample generating method according to any one of claims 1-10 and/or any one of claims 11-12 The steps of the chat dialogue large model training method described in the item.
CN202311233602.7A 2023-09-21 2023-09-21 Dialogue sample generation method, chat dialogue large model training method and related devices Pending CN117573946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311233602.7A CN117573946A (en) 2023-09-21 2023-09-21 Dialogue sample generation method, chat dialogue large model training method and related devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311233602.7A CN117573946A (en) 2023-09-21 2023-09-21 Dialogue sample generation method, chat dialogue large model training method and related devices

Publications (1)

Publication Number Publication Date
CN117573946A true CN117573946A (en) 2024-02-20

Family

ID=89888729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311233602.7A Pending CN117573946A (en) 2023-09-21 2023-09-21 Dialogue sample generation method, chat dialogue large model training method and related devices

Country Status (1)

Country Link
CN (1) CN117573946A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118152544A (en) * 2024-05-08 2024-06-07 支付宝(杭州)信息技术有限公司 Medical question answering method and system based on intelligent agent and electronic equipment
CN119047578A (en) * 2024-08-02 2024-11-29 百度在线网络技术(北京)有限公司 Character dialogue method, agent, device and storage medium based on large model
CN119441418A (en) * 2024-09-30 2025-02-14 北京百度网讯科技有限公司 Intelligent agent processing method, system, device, equipment and storage medium
CN119557399A (en) * 2024-11-11 2025-03-04 北京百度网讯科技有限公司 Method, device and computer program product for generating response data
WO2025201460A1 (en) * 2024-03-29 2025-10-02 北京字跳网络技术有限公司 Media content processing method and apparatus, device, readable storage medium, and product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103078867A (en) * 2013-01-15 2013-05-01 深圳市紫光杰思谷科技有限公司 Automatic chatting method and chatting system among robots
US20180025726A1 (en) * 2016-07-22 2018-01-25 International Business Machines Corporation Creating coordinated multi-chatbots using natural dialogues by means of knowledge base
CN109817329A (en) * 2019-01-21 2019-05-28 暗物智能科技(广州)有限公司 A kind of medical treatment interrogation conversational system and the intensified learning method applied to the system
CN111309880A (en) * 2020-01-21 2020-06-19 清华大学 Multi-agent action strategy learning method, device, medium and computing equipment
CN114334163A (en) * 2022-01-25 2022-04-12 思必驰科技股份有限公司 Depression diagnosis dialogue dataset generation method, electronic device and storage medium
CN114564567A (en) * 2022-01-20 2022-05-31 浙江工业大学 Design method and system of artificial intelligence body based on user behavior
CN115309877A (en) * 2022-08-03 2022-11-08 北京百度网讯科技有限公司 Dialog generation method, dialog model training method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103078867A (en) * 2013-01-15 2013-05-01 深圳市紫光杰思谷科技有限公司 Automatic chatting method and chatting system among robots
US20180025726A1 (en) * 2016-07-22 2018-01-25 International Business Machines Corporation Creating coordinated multi-chatbots using natural dialogues by means of knowledge base
CN109817329A (en) * 2019-01-21 2019-05-28 暗物智能科技(广州)有限公司 A kind of medical treatment interrogation conversational system and the intensified learning method applied to the system
CN111309880A (en) * 2020-01-21 2020-06-19 清华大学 Multi-agent action strategy learning method, device, medium and computing equipment
CN114564567A (en) * 2022-01-20 2022-05-31 浙江工业大学 Design method and system of artificial intelligence body based on user behavior
CN114334163A (en) * 2022-01-25 2022-04-12 思必驰科技股份有限公司 Depression diagnosis dialogue dataset generation method, electronic device and storage medium
CN115309877A (en) * 2022-08-03 2022-11-08 北京百度网讯科技有限公司 Dialog generation method, dialog model training method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025201460A1 (en) * 2024-03-29 2025-10-02 北京字跳网络技术有限公司 Media content processing method and apparatus, device, readable storage medium, and product
CN118152544A (en) * 2024-05-08 2024-06-07 支付宝(杭州)信息技术有限公司 Medical question answering method and system based on intelligent agent and electronic equipment
CN119047578A (en) * 2024-08-02 2024-11-29 百度在线网络技术(北京)有限公司 Character dialogue method, agent, device and storage medium based on large model
CN119441418A (en) * 2024-09-30 2025-02-14 北京百度网讯科技有限公司 Intelligent agent processing method, system, device, equipment and storage medium
CN119557399A (en) * 2024-11-11 2025-03-04 北京百度网讯科技有限公司 Method, device and computer program product for generating response data
CN119557399B (en) * 2024-11-11 2026-05-01 北京百度网讯科技有限公司 Method, device and computer program product for generating response data

Similar Documents

Publication Publication Date Title
Rheu et al. Systematic review: Trust-building factors and implications for conversational agent design
CA3021197C (en) Auto-teleinterview solution
WO2021093821A1 (en) Intelligent assistant evaluation and recommendation methods, system, terminal, and readable storage medium
US10617959B2 (en) Method and system for training a chatbot
US20180344242A1 (en) Systems and methods for training artificially-intelligent classifier
US20160004299A1 (en) Systems and methods for assessing, verifying and adjusting the affective state of a user
CN117252260B (en) Interview skills training method, device and medium based on large language model
CN119106739A (en) Alignment model training method, information processing method and device
JP2021140588A (en) Matching system, matching method, and matching program
Etzrodt et al. What HMC teaches us about authenticity
CN120316554B (en) Training method, reasoning method, system, electronic device, storage medium and program product for visual language model
Chintala et al. Developing an adaptive educational chatbot for personalized SQL tutoring
Wilks et al. A prototype for a conversational companion for reminiscing about images
JP4742280B2 (en) Simulation system and program
CN119557397A (en) Question and answer method and device
CN117932015B (en) Question answering model training and question answering method and device
CN112560434B (en) Method, device, apparatus and medium for determining element attribute conflicts in text
Stanley et al. Toward a Framework for Machine Self-Presentation: A survey of self-presentation strategies in human-machine interaction studies
Denga Combining LLMs with BDI Systems for Training Children's Helpline Counsellors
US20250200673A1 (en) Dialog ability enhancement assistance device, dialog ability enhancement assistance control method, and non-transitory recording medium
Haut USIHC: Understand, Simulate, and Improve Human Compassion in Serious Illness Communication (SIC)
CN119295270A (en) Interactive scenario simulation method, electronic device, and medium for insurance business training
Rivero et al. Chatbot for Help in Gynecology and Obstetrics Areas
Goud et al. Chat-Bot System for Patient Assistance
Stancati A Conversational Agent to Support Virtual Reality-based Training on the Life-saving Intraosseous Insertion Procedure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20240220