CN-121351970-B - Training method and system for medical dialogue model
Abstract
The present disclosure provides a training method and system for a medical dialogue model, which constructs second dialogue sample data containing target reasoning information based on first dialogue sample data to train a preset dialogue model to obtain the medical dialogue model, so that the medical dialogue model can output the reasoning information in the dialogue process.
Inventors
- ZHANG JUNHANG
- MAO HONGJING
- CAI MINGJIAN
- SUN TAO
- YANG MINGHUI
Assignees
- 支付宝(杭州)数字服务技术有限公司
- 杭州市第七人民医院(杭州市心理危机研究与干预中心)
Dates
- Publication Date
- 20260512
- Application Date
- 20251210
Claims (10)
- 1. A method of training a medical dialog model, the method comprising: Acquiring first dialogue sample data, wherein the first dialogue sample data comprises a plurality of rounds of question-answer pairs, and each round of question-answer pairs comprises a question part and an answer part, and the first dialogue sample data is related to medical content; Inputting a target prompt word into a first preset large model to obtain second dialogue sample data output by the first preset large model, wherein the target prompt word comprises task description, the first dialogue sample data, a reference knowledge base and a target reasoning information construction part, the task description is used for indicating the first preset large model to add target reasoning information into at least one target round of the first dialogue sample data, the reference knowledge base is used for providing a reference basis for the first preset large model in the process of generating the target reasoning information, the target reasoning information construction part is used for guiding the first preset large model to generate information of each dimension corresponding to the target reasoning information construction part, the target reasoning information is used for describing question parts of the target rounds and question-answer pairs of previous rounds, and the reasoning process of answer parts of the target rounds is obtained, and the target rounds are any rounds in the multiple rounds; training a preset dialogue model based on the second dialogue sample data until the medical dialogue model is obtained, wherein the medical dialogue model has the capability of carrying out multi-round dialogue with an inquirer, and outputting reasoning information in a target round of multi-round dialogue.
- 2. The method of claim 1, wherein the target cue word further comprises a positive sample example and a negative sample example; The positive sample example comprises a first original dialogue sample and a first target dialogue sample, wherein the first target dialogue sample is obtained by adding correct reasoning information into the first original dialogue sample; The negative sample example comprises a second original dialogue sample and a second target dialogue sample, wherein the second target dialogue sample is a dialogue sample obtained by adding wrong reasoning information in the second original dialogue sample.
- 3. The method of claim 1 or 2, wherein the acquiring first dialog sample data comprises: Acquiring first text dialogue data; And performing data cleaning processing on the first text dialogue data to obtain the first dialogue sample data, wherein the data cleaning processing comprises at least one of correcting a situational error, correcting a professional term standardization, and outputting a dialogue quality assessment result, wherein the correcting situational error is used for correcting a situation-related word based on a dialogue scene, the correcting professional term is used for correcting a word related to the professional term in the first text dialogue data, and the dialogue quality assessment result is used for providing a reference basis for measuring whether the first dialogue sample data can be used for constructing second dialogue sample data.
- 4. A method according to claim 3, wherein said performing a data cleansing process on said first text session data to obtain said first session sample data comprises: And inputting the first text dialogue data into a second preset large model to obtain first dialogue sample data output by the second preset large model, wherein the second preset large model is used for performing data cleaning processing on the first text dialogue data.
- 5. The method of claim 4, wherein the obtaining the first text conversation data comprises: Acquiring original audio dialogue sample data, wherein the original audio dialogue sample data is a plurality of times of dialogue; And preprocessing the original audio dialogue sample data to obtain the first text dialogue data, wherein the preprocessing comprises voice recognition, speaker recognition and separation and desensitization.
- 6. The method of claim 1, wherein the reference knowledge base comprises a medical knowledge base and the target inference information construction section comprises at least one of the dimensions: the basic condition analysis is used for extracting basic condition information from dialogue contents before the target turn; The authentication processing consideration is used for giving the direction of authentication processing based on the basic condition information and the medical knowledge base; A next inquiry strategy, an answer strategy for outputting an answer part of the target round; the reasoning basis is used for outputting the reasoning basis of the answer part of the target round.
- 7. The method of claim 6, wherein the base case analysis comprises at least one of: symptom information finishing, namely extracting symptom information based on a target round and dialogue content before the target round; evaluating the integrity of information collected by dialogue content before the target round; the key problem identification is to identify the key problem in the dialogue content before the target round; Disease feature identification, identifying disease features based on the symptom information; The authentication processing consideration includes at least one of: Determining a candidate disease type based on the symptom information; identifying a processing list, namely determining disease characteristics to be distinguished based on the candidate disease types; priority ranking, namely determining the priority corresponding to the candidate disease type according to the representativeness and the severity of the symptom information; Disease classification, namely classifying the candidate disease types; The next interrogation strategy includes at least one of the following: Determining missing key information based on the target turn, dialogue content before the target turn and the candidate disease type; Constructing a question to be queried in the next step based on symptom information corresponding to the candidate disease type and the missing key information; determining the priority of the questions of the next inquiry according to the emergency degree of the candidate disease type; A risk assessment consideration, namely assessing the risk level of the symptom information based on the symptom information; Determining the expression mood and expression mode of the next question; The reasoning includes at least one of the following aspects in terms of description: and (3) comparing the identification standard with the identification standard of the candidate disease type in the medical knowledge base, and describing the reasoning basis.
- 8. A method according to claim 3, wherein the dialog quality assessment results include at least one of the following dimensions: Analyzing a conversation flow; checking information integrity; carding the logic relationship; marking key content; verifying real-time performance; Logic analysis; information credibility evaluation; and inquiring the quality assessment.
- 9. The method according to claim 1 or 2, wherein the pre-set dialog model is a pre-trained universal dialog model; Training a preset dialogue model based on the second dialogue sample data until the medical dialogue model is obtained, including: and performing fine tuning training on the pre-trained universal dialogue model based on the second dialogue sample data until the medical dialogue model is obtained.
- 10. A training system for a medical dialog model, the system comprising: At least one storage medium storing at least one instruction set for training a medical session model, and At least one processor in communication with the at least one storage medium, wherein the at least one processor reads the at least one instruction set when the medical dialog model is run and performs the training method of the medical dialog model as claimed in any of claims 1-9 in accordance with an indication of the at least one instruction set.
Description
Training method and system for medical dialogue model Technical Field The present disclosure relates to the field of artificial intelligence, and in particular, to a training method and system for a medical dialogue model. Background With the rapid development of artificial intelligence technology, the artificial intelligence technology is widely applied in a plurality of fields due to the advantages of high efficiency, accuracy and the like. Currently, in the medical field, the frequency of occurrence of health problems continues to rise, and identification and treatment of such health problems presents a number of challenges. The challenges include, but are not limited to, 1, shortage of professional medical staff, serious unbalance of the proportion of related special medical staff to patients, difficulty in timely identifying and processing health problems of patients, 2, strong subjectivity of the processing process, lack of objective quantitative standards depending on personal experience of medical staff in the current processing process, influence on the accuracy of identification, and 3, difficulty in early identification, namely that patients often seek medical assistance when health problems are serious due to lack of effective early identification means. Therefore, how to apply artificial intelligence technology to the identification and treatment of health problems is a problem that needs to be solved. The statements in this background section merely provide information to the inventors and may not represent prior art to the present disclosure nor may they represent prior art to the filing date of the present disclosure. Disclosure of Invention The specification provides a training method and system for a medical dialogue model. In a first aspect, the present specification provides a method for training a medical dialogue model, comprising: Acquiring first dialogue sample data, wherein the first dialogue sample data comprises a plurality of rounds of question-answer pairs, and each round of question-answer pairs comprises a question part and an answer part, and the first dialogue sample data is related to medical content; adding target reasoning information into at least one target turn of the first dialogue sample data to obtain second dialogue sample data, wherein the target reasoning information is used for describing a reasoning process of an answer part of the target turn from a question part of the target turn and a question-answer pair of a previous turn, and the target turn is any turn in the multiple turns; training a preset dialogue model based on the second dialogue sample data until the medical dialogue model is obtained, wherein the medical dialogue model has the capability of carrying out multi-round dialogue with an inquirer, and outputting reasoning information in a target round of multi-round dialogue. In the foregoing embodiment, adding target inference information to at least one target round of the first session sample data to obtain second session sample data includes: Inputting a target prompt word into a first preset large model to obtain second dialogue sample data output by the first preset large model, wherein the target prompt word is used for guiding the first preset large model to add target reasoning information into at least one target round of the first dialogue sample data to obtain the second dialogue sample data. In the embodiment, the target prompt word comprises a task description, the first dialogue sample data, a reference knowledge base and a target reasoning information construction part; The task description is used for indicating the first preset large model to add target reasoning information in at least one target round of the first dialogue sample data, the reference knowledge base is used for providing a reference basis for the first preset large model in the process of generating the target reasoning information, and the target reasoning information construction part is used for guiding the first preset large model to generate information of each dimension corresponding to the target reasoning information construction part. In the embodiment, the target prompt word further comprises a positive sample example and a negative sample example; The positive sample example comprises a first original dialogue sample and a first target dialogue sample, wherein the first target dialogue sample is obtained by adding correct reasoning information into the first original dialogue sample; The negative sample example comprises a second original dialogue sample and a second target dialogue sample, wherein the second target dialogue sample is a dialogue sample obtained by adding wrong reasoning information in the second original dialogue sample. In the above embodiment, the acquiring the first session sample data includes: Acquiring first text dialogue data; And performing data cleaning processing on the first text dialogue data to obtain the first dialogue sample