Large medical emotion support model and generation method thereof
By designing a medical emotion support model, including emotion detection, dialogue strategy guidance, short-term memory storage, response generation and correction modules, the shortcomings of the existing medical big language model in terms of emotional support are solved, accurate identification and effective support of patient emotions are achieved, and patients' treatment experience and rehabilitation process are improved.
Patent Information
- Application Number
- CN202411720411.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-21
AI Technical Summary
The existing medical large language model has shortcomings in emotional support and cannot effectively help patients relieve emotional problems and affect patients' treatment experience and rehabilitation process.
A medical emotion support model was designed, including emotion detection module, dialogue strategy guidance module, short-term memory storage module, response generation module and correction module. Through the coordinated work of these modules, targeted emotional support responses are generated to provide emotional support and regulation.
The model's empathy and the effect of emotional support for patients is improved. By accurately identifying the patient's emotional state and the causes of emotions, targeted responses are generated, helping patients feel caring and understanding during the conversation, and optimizing the overall dialogue experience.
Smart Images

Figure CN119673384A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a medical emotion support large model and a generation method thereof, and belongs to the technical field of medical data processing. Background Art
[0002] Since ChatGPT, GPT4 and Palm-2 have shown extraordinary capabilities in the medical field,
[0003] A series of medical big language models have emerged, such as DoctorGLM, HuatuoGPT, BenTsao, Bianque, etc. The sufficient text data and professional knowledge in the medical field provide strong support for the development of medical big models, making medical big models have rich medical professional knowledge. On the basis of general medical big models, medical big language models specifically used in the medical professional field have also emerged one after another, such as Radiology-GPT for analyzing radiological examination results and frameworks for chest X-ray report generation. In the field of medical big language models, related research not only includes giving models the ability to dialogue, but also report generation, model evaluation, clinical diagnosis, equipment management, psychotherapy and other functions, assisting doctors from multiple levels and reducing doctors' work pressure; however, these current models are trained on a large amount of medical texts and images, lack a certain degree of empathy, and cannot empathize with patients during conversations with them, give them emotional support, and regulate their negative emotions due to diseases and other reasons.
[0004] Although various large-scale models of conversational medicine have emerged, these large-scale language models are all for answering questions based on professional knowledge, and there is no large-scale language model or framework that specifically supports patients' emotions. This means that existing medical conversational models are insufficient in terms of emotional support and cannot effectively help patients alleviate emotional problems, thus affecting the overall treatment experience and recovery process of patients. Summary of the invention
[0005] In order to solve the above problems, the present invention provides a large medical emotional support model and a generation method thereof. The present invention constructs a framework that can provide medical consultation assistance and emotional support assistance to patients. The constructed framework can generate a medical emotional dialogue dataset.
[0006] The technical solution of the present invention is: in the first aspect, the present invention provides a large model of medical emotion support, including an emotion detection module, a dialogue strategy guidance module, a short-term memory storage module, a response generation module, and a correction module;
[0007] The emotion detection module is used to identify the patient's current negative emotions and the reasons for such negative emotions through the conversation history, and input the detection results into the response generation module so that a more targeted response can be given to the patient;
[0008] The short-term memory storage module is used to store the conversation between the patient and the response generation module as a conversation history record. Once the conversation exceeds the upper limit set, the most recent conversation is retained, and the conversation history exceeding the upper limit is compiled as background information by the large language model and input into the current response generation module so that it can understand the current stage of the conversation and make an appropriate response;
[0009] The dialogue strategy guidance module is used to determine the dialogue communication strategy that the response generation module should use next through the dialogue history record, and provide emotional support to the patient from the whole dialogue level;
[0010] The response generation module is used to set personal background information and the current situation, and simulate the doctor to generate appropriate responses to the questions raised by the patient based on the large language model;
[0011] The correction module is used to conduct self-reflection based on the patient's feedback on the medical emotional support framework, summarize the reasons for the failure of strategy recommendation, and update the recommended experience of the dialogue strategy guidance module.
[0012] Furthermore, the emotion detection module also includes: improving the authenticity of the large language model generation by adding emotion-related stimuli to the input prompt words of the large language model, and the large language model judges the patient's negative emotions and reasons based on the input dialogue history, and inputs them into the subsequent response generation module.
[0013] Furthermore, the short-term memory storage module includes: using LangChain's memory storage module, after each conversation, the built-in large language model will compile the multi-round conversation parts that exceed the word limit as the conversation history background, compress the information, and retain the key content; the recent rounds of conversations within the word limit are regarded as recent conversations and output together with the conversation history background. The word limit is set according to demand, ranging from hundreds to thousands, to effectively manage long-term conversation history.
[0014] Furthermore, the dialogue strategy guidance module includes: adding doctor-patient communication strategies, historical dialogue strategies and guidance plans in the prompt, wherein the doctor-patient communication strategies are skills for communicating between doctors and patients manually written by doctor experts, the historical dialogue strategies are doctor-patient communication strategies used in past dialogues, and the guidance plans include doctor-patient communication strategy trajectories for controlling the medical emotional framework at the global dialogue level, for example: first obtaining key information on diagnosis and comfort of patients, empathizing with patients and providing effective suggestions, comforting patients and helping them solve emotional problems.
[0015] Furthermore, the response generation module includes: simulating the doctor's tone and style according to the doctor role information set within the response generation module to enhance the patient's sense of trust; judging the stage of the current conversation according to the recent conversation history provided by the short-term memory storage module to better maintain consistency with the theme of the conversation history; and then responding to the patient in a targeted manner according to the strategy provided by the dialogue strategy guidance module.
[0016] Furthermore, the correction module includes: a module for summarizing the reflective experience of the system's failure to provide emotional support based on the patient's questions, the system's responses and the patient's feedback, and providing timely feedback to the dialogue strategy guidance module in the medical emotional support framework, so as to provide more effective emotional support.
[0017] Furthermore, when initially developing the medical emotional support framework, a pre-trained large language model was used to simulate the patient role and conduct conversations with the medical emotional support framework. The system was comprehensively evaluated by analyzing multiple rounds of conversation records between the virtual patient played by the large language model and the medical emotional support system.
[0018] In a second aspect, the present invention provides a method for generating a large medical emotional support model, the method comprising:
[0019] Step 1: Identify the patient’s current negative emotions and the reasons for such negative emotions through the conversation history, and input the detection results into the response generation module so that the patient can be given a more targeted response;
[0020] Step 2: Store the conversation between the patient and the response generation module as a conversation history record. Once the conversation exceeds the upper limit, keep the most recent conversation. The large language model will compile the conversation history that exceeds the upper limit as background information and input it into the current response generation module so that it can understand the current stage of the conversation and make an appropriate response.
[0021] Step 3: Use the conversation history records to determine the conversation communication strategy that the response generation module should use next, and provide emotional support to the patient from the perspective of the entire conversation;
[0022] Step 4: Set personal background information and current situation, and use the large language model as the core to simulate the doctor to generate appropriate responses to the questions raised by the patient;
[0023] Step 5. Conduct self-reflection based on the patient’s feedback on the medical emotional support framework, summarize the reasons for the failure of strategy recommendations, and update the recommended experience of the dialogue strategy guidance module.
[0024] Furthermore, the Step 1 includes:
[0025] The authenticity of the large language model generation is improved by adding emotion-related stimuli to the input prompt words of the large language model. The large language model judges the patient's negative emotions and reasons based on the input dialogue history and inputs them into the subsequent response generation module.
[0026] Furthermore, the Step 4 includes: simulating the doctor's tone and style according to the doctor role information set in the response generation module to enhance the patient's sense of trust, judging the stage of the current conversation according to the recent conversation history provided by the short-term memory storage module to better maintain consistency with the theme of the conversation history; and then responding to the patient in a targeted manner according to the strategy provided by the dialogue strategy guidance module.
[0027] The beneficial effects of the present invention are:
[0028] 1. In the emotion detection module, the present invention uses preset prompts to accurately identify the patient's emotional state, such as anxiety, sadness, anger, etc., by analyzing the patient's conversation history. According to the detection results, a targeted emotional support response is generated, thereby improving the model's empathy and the emotional support effect on the patient.
[0029] 2. The short-term memory storage module of the present invention stores and manages the conversation history to ensure that the most recent conversation content is retained when the conversation exceeds the set upper limit. The historical conversation is summarized and the background information is compiled through the large language model, and dynamically updated and input into the response generation module, so that the model can continuously understand and adapt to the context of the conversation, improving the continuity and relevance of the response.
[0030] 3. The dialogue strategy guidance module of the present invention determines the communication strategy that the response generation module should adopt next by analyzing the recent dialogue history. Combining the emotion detection results and the dialogue background, it provides strategy suggestions so that the generated response is not only accurate in content but also emotionally supportive, helping patients feel cared for and understood during the dialogue process and optimizing the overall dialogue experience.
[0031] 4. The correction module of the present invention reflects on the failed communication strategy, deeply analyzes the problems behind it, infers the reasons for the failure, and summarizes the experience. The correction experience is updated in the dialogue strategy guidance module to achieve fine-tuning of the dialogue strategy guidance module.
[0032] 5. The medical emotional support framework constructed by the present invention can be applied to patient consultation services, providing emotional support to patients while answering their questions. The medical emotional dialogue dataset can be generated by the constructed framework in the medical field for subsequent model training and fine-tuning; BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a framework diagram of the present invention;
[0034] Figure 2 Schematic diagram of the process of generating a patient's personal simulation data card. DETAILED DESCRIPTION
[0035] Example 1: The construction of a medical emotional support framework is mainly used to reduce the negative emotions of patients due to various reasons such as illness, surgery, work, and expenses, and to help them understand and overcome the challenges they are facing. The patient's emotions also affect their physical condition. Positive emotions can improve physical condition, promote recovery and prevent disease in a variety of ways. Negative emotions such as depression, anxiety, anger and sadness will not only affect the patient's mental state, but also have a negative effect on the body through a variety of physiological mechanisms, and even affect the success rate of surgery to a certain extent. For the medical emotional support framework to be constructed, such as Figure 1-Figure 2 As shown, in the first aspect, the present invention provides a large medical emotion support model, including an emotion detection module, a dialogue strategy guidance module, a short-term memory storage module, a response generation module, and a correction module;
[0036] The emotion detection module is used to identify the patient's current negative emotions and the reasons for such negative emotions through the conversation history, and input the detection results into the response generation module so that a more targeted response can be given to the patient;
[0037] The emotion detection module also includes: adding emotion-related stimuli to the input prompt words of the large language model to improve the authenticity of the large language model generation, accurately identifying the patient's current negative emotions and the causes of such negative emotions, which helps the model to generate more targeted responses; the large language model determines the patient's negative emotions and causes based on the input dialogue history, and inputs them into the subsequent response generation module. The corresponding prompt is:
[0038] "Dialogue History: {Dialogue}
[0039] emotion: Determine the patient's current emotion from the conversation history.
[0040] cause: Determine the reason why the patient is currently experiencing negative emotions based on the conversation history, using minimalist language to describe it.
[0041] degree: Determine the intensity of the patient's current negative emotions from the conversation history. The intensity of negative emotions is divided into five levels: 1, 2, 3, 4, and 5. 1 is no negative emotion, 2 is mild negative emotion, 3 is strong negative emotion, 4 is very strong negative emotion, and 5 is severe negative emotion.
[0042] Output in the form of a dictionary of "emotion":"","cause":"","degree":"":"
[0043] The short-term memory storage module is used to store the conversation between the patient and the response generation module as a conversation history record. Once the conversation exceeds the upper limit set, the most recent conversation is retained, and the conversation history exceeding the upper limit is compiled as background information by the large language model and input into the current response generation module so that it can understand the current stage of the conversation and make an appropriate response;
[0044] In the past, multi-round conversations usually stored all conversations, and each time a response was made, all historical conversation records were added to the prompt as input. However, as the conversation records increased, the conversation records would not only exceed the limit of the model's one-time input, but also distract the model's attention and fail to maintain the consistency of long-term conversations. In order to change this situation, using LangChain's memory storage module, after each conversation, the built-in large language model will write the multi-round conversation part that exceeds the word limit as the conversation history background, compress the information, and retain the key content; the recent rounds of conversations within the word limit are regarded as recent conversations and output together with the conversation history background. The word limit is set according to demand, ranging from hundreds to thousands, effectively managing long-term conversation history.
[0045] The dialogue strategy guidance module is used to determine the dialogue communication strategy that the next response generation module should use through dialogue history records, and provide emotional support to the patient from the entire dialogue level; although the framework is able to realize dialogue with the patient, the dialogue communication strategy recommended by the large language model is unstable. Incorrect strategy recommendations not only fail to provide emotional support to the patient, but may even further lead to negative emotions in the patient.
[0046] The dialogue strategy guidance module includes: adding doctor-patient communication strategies, historical dialogue strategies and guidance plans to prompts, wherein the doctor-patient communication strategies are skills for communicating between doctors and patients manually written by doctor experts, the historical dialogue strategies are doctor-patient communication strategies used in past dialogues, and the guidance plans include doctor-patient communication strategy trajectories for controlling the medical emotional framework at the global dialogue level, for example: first obtaining key information on diagnosis and treatment and comfort of patients, empathizing with patients and providing effective suggestions, comforting patients and helping them solve emotional problems.
[0047] In the process of dialogue between the medical emotional support framework and the patient, it should not only answer the patient's obvious questions and tell the patient objective facts, but also be full of empathy for the patient in the response. However, empathy alone is not enough. A dialogue process without progress may even aggravate the patient's negative emotions. Providing emotional support to patients is not intuitive. Procedural dialogue skills are more helpful in providing emotional support to patients. Understanding patients' feelings, exploring problems, and providing suggestions can help build trust and understanding between patients and the medical emotional support framework, reduce patients' emotional distress, help patients better understand their current situation, and find solutions to problems. In the emotional support system, reasonable dialogue strategies are crucial to providing effective emotional support.
[0048] The system needs to recognize and adapt to different conversation scenarios and patient needs. The system first needs to understand the context of the conversation, including previously discussed topics and the patient's needs, to ensure that the selected strategy is consistent with the conversation flow. Second, the system needs to analyze the conversation history and the patient's current emotional state to determine the most appropriate strategy. For example, if the patient expresses anxiety or uncertainty, the system may choose an "empathy" strategy to provide emotional support.
[0049] The order in which conversation skills are used is crucial for the system to provide emotional support throughout the conversation. The patient's emotional state and needs will change as the conversation progresses. A reasonable order of using skills can provide patients with appropriate feedback and support at different stages of the conversation. It can also explore the user's problems more deeply, thereby providing deeper support and understanding, avoiding premature conclusions that cause misunderstandings and conflicts, and responding to various possible scenarios with greater adaptability. The overall guidance strategy follows the principle of first exploring some specific information about the patient and the situation he or she is facing, then empathizing with the patient to soothe the patient's emotions, and finally taking action to provide reasonable advice and information to help the patient solve his or her problems. Prompt for the conversation strategy guidance module:
[0050] "[Dialogue history]: {dialogue}
[0051] [Strategy History]:{actions}
[0052] [Guideline]:
[0053] [Corrective experience]:{experience}
[0054] [Strategy]:{strategy}
[0055] Understand the content of [dialogue history], select the appropriate strategy according to [guidance strategy] and [guidance strategy history] to generate the next response. These strategies are [question, verification, diagnosis, suggestion, information, empathy, chat], and only output the strategy:"
[0056] The response generation module is the core of the emotional support dialogue system. The response generation module is used to set personal background information and the current situation, and use the large language model as the core to simulate the doctor to generate appropriate responses to the questions raised by the patient;
[0057] The response generation module includes: according to the doctor role information set in the response generation module, simulating the doctor's tone and style to enhance the patient's trust; judging the current stage of the conversation based on the recent conversation history provided by the short-term memory storage module to better maintain consistency with the topic of the conversation history; and then responding to the patient in a targeted manner based on the strategy provided by the dialogue strategy guidance module, ensuring that the response not only complies with the strategy, but also takes into account the patient's emotions and the coherence of the conversation. Prompt of the response generation module:
[0058] "[Doctor information]: {summary}
[0059] [Conversation history]:{history}
[0060] [COT] Step by step thinking:
[0061] 1. Understand the content of [conversation history] and determine the stage of the current conversation.
[0062] 2. The patient's current emotion: {emotion}, the reason for this emotion: {cause}
[0063] 3. Think about what information is missing to provide emotional support and diagnosis to patients.
[0064] 4. Answer patients' questions accurately, be proactive, and ask for missing key patient-related information.
[0065] 5. Be empathetic to the patient’s condition, difficulties and experiences, and give reasonable suggestions.
[0066] Combine the above 5 steps to output your response to the patient.
[0067] A total of {max_turn} rounds of dialogue are required, and now it is the {current_turn} round.
[0068] The response strategy to be used next: {strategy}
[0069] <patient>:{question}
[0070] <Doctor>: Output your questions or answers as a medical robot. It should not exceed 100 words. "
[0071] The correction module is used to conduct self-reflection based on the patient's feedback on the medical emotional support framework, summarize the reasons for the failure of strategy recommendation, and update the recommended experience of the dialogue strategy guidance module.
[0072] Furthermore, generally speaking, the more relevant information about the patient, the more effective the response generated by the medical emotional support system, but this does not guarantee that the patient's mood will be improved. The main goal of the correction module is to ensure that the communication between the medical emotional support system and the patient is accurate. The correction module includes: a module for summarizing the reflection experience of the failure of the system to provide emotional support based on the patient's questions, the system's response and the patient's feedback, and timely feedback to the dialogue strategy guidance module in the medical emotional support framework, so as to provide more effective emotional support. The prompt of the correction module:
[0073] "[Dialogue history]: {dialogue}
[0074] [Strategy]:{strategy}
[0075] [Strategy History]:{actions}
[0076] Understand the content of [conversation history], find out the reasons why the patient's mood has deteriorated, reflect on yourself based on [strategy history], and summarize the experience of failed strategy recommendations:"
[0077] Furthermore, when initially developing the medical emotional support framework, a pre-trained large language model was used to simulate the patient role and conduct conversations with the medical emotional support framework. The system was comprehensively evaluated by analyzing multiple rounds of conversation records between the virtual patient played by the large language model and the medical emotional support system.
[0078] In a second aspect, the present invention provides a method for generating a large medical emotional support model, the method comprising:
[0079] Step 1: Identify the patient’s current negative emotions and the reasons for such negative emotions through the conversation history, and input the detection results into the response generation module so that the patient can be given a more targeted response;
[0080] Step 2: Store the conversation between the patient and the response generation module as a conversation history record. Once the conversation exceeds the upper limit, keep the most recent conversation. The large language model will compile the conversation history that exceeds the upper limit as background information and input it into the current response generation module so that it can understand the current stage of the conversation and make an appropriate response.
[0081] Step 3: Use the conversation history records to determine the conversation communication strategy that the response generation module should use next, and provide emotional support to the patient from the perspective of the entire conversation;
[0082] Step 4: Set personal background information and current situation, and use the large language model as the core to simulate the doctor to generate appropriate responses to the questions raised by the patient;
[0083] Step 5. Conduct self-reflection based on the patient’s feedback on the medical emotional support framework, summarize the reasons for the failure of strategy recommendations, and update the recommended experience of the dialogue strategy guidance module.
[0084] Furthermore, the Step 1 includes:
[0085] The authenticity of the large language model generation is improved by adding emotion-related stimuli to the input prompt words of the large language model. The large language model judges the patient's negative emotions and reasons based on the input dialogue history and inputs them into the subsequent response generation module.
[0086] Furthermore, the Step 4 includes: simulating the doctor's tone and style according to the doctor role information set in the response generation module to enhance the patient's sense of trust, judging the stage of the current conversation according to the recent conversation history provided by the short-term memory storage module to better maintain consistency with the theme of the conversation history; and then responding to the patient in a targeted manner according to the strategy provided by the dialogue strategy guidance module.
[0087] Large language models have great potential in simulating the role of patients in medical consultation. Influenced by this, when initially developing a medical emotional support framework, a pre-trained large language model can be used to simulate the patient role and communicate with the medical emotional support framework. By analyzing multiple rounds of dialogue records between virtual patients played by the large language model and the medical emotional support system, it is possible to more comprehensively evaluate whether the system can accurately grasp the core demands of patients, whether it can provide appropriate emotional support and suggestions, whether the response is natural and smooth, etc., thereby evaluating and improving the overall performance of the system.
[0088] In order to better enable the large language model to simulate the patient role, such as Figure 2 As shown in the figure, a certain amount of real patient medical record data is collected, and the key information of the patient is extracted from the medical record using a large language model; then the large language model generates the patient's personal background profile and current situation based on this key information and some negative emotions, so that the large language model can simulate the patient's psychological emotions more realistically.
[0089] The collected medical records contain a lot of information such as a patient's personal information, main statement, current medical history, past medical history, physical examination, examination, etc. This excessive objective information may distract the attention of the large language model, causing the large language model to have a large deviation when simulating the patient's psychological emotions. The simulation of virtual patients does not require so much information. The large language model is used to extract and compress key information related to the patient from the medical records, such as age, gender, disease, examination, type of surgery, etc. The corresponding compression prompt:
[0090] "[patient information]: {information}
[0091] Extract and compress the key information of the above medical records, including age, gender, symptoms, diseases, type of surgery, complications, past history, examinations, etc.
[0092] Response: Compress the key information and then generate a continuous summary"
[0093] In order to ensure that the patient data cards generated later are more authentic, several patient data cards are manually compiled as seed sets, and the key information extracted from the medical records and random negative emotions are used in a self-instruct manner to generate exclusive patient data cards based on the data in the seed set. These contain the patient's emotions, personal background information, and the patient's current situation.
[0094] The corresponding role information generates prompt:
[0095] "[patient information]: {information}
[0096] [Example]: {example}
[0097] Based on the given [patient information] and [example], generate a role profile card\n persona: a unique personality background, for example: you are a... status: the scenario faced by a patient who needs surgery and feels {emotion}, including symptoms, diseases, type of surgery, etc. For example:
[0098] You are now....\n
[0099] If the patient is too young, the perspective is his or her guardian, parents and relatives; if the patient is too old, the perspective is his or her children.
[0100] The reasons that lead to the patient's negative emotions are as random and diverse as possible, involving various aspects, such as: family, education, money, work, family, love, etc.
[0101] Output the patient data card in the form of a dictionary, the format is exactly the same as that of Example:"
[0102] After obtaining the patient role data, a virtual patient role is constructed with the large language model as the core. According to the patient personality settings in the data card, the patient consults the medical emotional support framework about the current situation, and must answer the doctor's questions while expressing his or her own troubles. Corresponding patient prompt:
[0103] "[patient information]: {summary}
[0104] Your goal now is to have an organic, thoughtful chat like a real <patient>.
[0105] Ask the doctor questions to express your current mood and situation, and be sure to answer the doctor's questions.
[0106] [Conversation history]: {history}
[0107] A total of {max_turn} rounds of dialogue are required, and now it is the {current_turn} round.
[0108] <Doctor>:{question}
[0109] <Patient>: Input your question or answer as a patient. It should not exceed 100 words. ”
[0110] The purpose of the medical emotional support framework is to continuously adapt to various medical scenarios to meet the diverse emotional needs of patients in medical scenarios. In order to ensure the adaptability and effectiveness of the medical emotional support framework, the specified medical scenario can be tuned. This tuning method is basically the same as the black box tuning idea. Multiple rounds of dialogue between the framework and virtual patients can be used to conduct a simple evaluation of the framework. Expert doctors give feedback based on the results of the dialogue to adjust the doctor-patient communication strategy, the personal background of the doctor and the patient, the strategy planning method, etc. in the prompts to optimize the performance of the framework to achieve the best interaction effect.
[0111] The multi-dimensional combination of disease types (acute, chronic, common diseases, rare diseases, etc.) in the patient's personal background, patient information (age, gender, occupation, family status, etc.), emotional state (anxiety, fear, depression, anger, etc.), and treatment stage (initial diagnosis, follow-up visit, preoperative, postoperative, etc.) can generate a variety of different patient scenarios to simulate real medical scenarios to the greatest extent, which is crucial for further optimizing and evaluating the emotional support framework.
[0112] In this way, through continuous testing, evaluation and optimization, the Medical Emotional Support Framework can provide more accurate and effective emotional support in various medical scenarios, helping patients better cope with the psychological pressure and emotional challenges they may encounter during treatment. This continuous tuning process not only improves the performance of the framework, but also generates a large amount of conversation data that simulates real scenarios.
[0113] In order to illustrate the effect of the present invention, the present invention evaluates the quality of the conversation between the virtual patient and the medical emotional support framework to represent the performance of the medical emotional support framework. The quality of the multi-round conversation is mainly evaluated from the following aspects:
[0114] Empathy: Ability to accurately understand and respond to the patient's emotional state, and to express care and understanding with appropriate language. Effectiveness: Ability to get to the heart of the patient's problem, provide useful information and suggestions, and effectively calm the patient's emotions. Consistency: Ability to correctly remember and use information from previous conversations, and maintain logical coherence and consistency in multiple rounds of conversations.
[0115] Harmful: Producing responses that could negatively impact the patient, provide inappropriate medical advice or misinformation.
[0116] Fluency: correct grammar, natural sentence structure, no abrupt expressions or inappropriate word usage. Each indicator is scored from 1 to 5 points, the higher the score, the better;
[0117] Taking the GPT3.5 large language model as an example, the performance of the medical emotional support framework based on GPT3.5 and the GPT3.5 large language model was compared. Two scorers scored the responses of the model and framework from the perspective of patients in five aspects: empathy, effectiveness, consistency, harmfulness, and fluency.
[0118] Table 1. Manual evaluation of multi-round dialogue
[0119] method Empathy Effectiveness consistency Harmfulness Fluency Average number of rounds Large Language Model 1.95 1.83 2.25 1.58 2.03 3 Medical Emotional Support Framework 3.05 2.7 2.53 1.45 2.65 3
[0120] As shown in Table 1, taking GPT-3.5 as an example, in the conversation with the virtual patient, although the medical emotional support framework is less harmful than the direct large language model, it has significant hints in empathy, effectiveness, and fluency.
[0121] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A large model of medical emotional support, characterized by: It includes emotion detection module, dialogue strategy guidance module, short-term memory storage module, response generation module and correction module; The emotion detection module is used to identify the patient's current negative emotions and the reasons for such negative emotions through the conversation history, and input the detection results into the response generation module so that a more targeted response can be given to the patient; The short-term memory storage module is used to store the conversation between the patient and the response generation module as a conversation history record. Once the conversation exceeds the upper limit set, the most recent conversation is retained, and the conversation history exceeding the upper limit is compiled as background information by the large language model and input into the current response generation module so that it can understand the current stage of the conversation and make an appropriate response; The dialogue strategy guidance module is used to determine the dialogue communication strategy that the response generation module should use next through the dialogue history record, and provide emotional support to the patient from the whole dialogue level; The response generation module is used to set personal background information and the current situation, and simulate the doctor to generate appropriate responses to the questions raised by the patient based on the large language model; The correction module is used to conduct self-reflection based on the patient's feedback on the medical emotional support framework, summarize the reasons for the failure of strategy recommendation, and update the recommended experience of the dialogue strategy guidance module.
2. The medical emotional support model according to claim 1, characterized in that: The emotion detection module also includes: a module for improving the authenticity of the large language model generation by adding emotion-related stimuli to the input prompt words of the large language model, and the large language model determines the patient's negative emotions and reasons based on the input dialogue history, and inputs them into the subsequent response generation module.
3. The medical emotional support model according to claim 1, characterized in that: The short-term memory storage module includes: using LangChain's memory storage module, after each conversation, the built-in large language model will compile the multi-round conversation part that exceeds the word limit as the conversation history background, compress the information, and retain the key content; the recent rounds of conversation within the word limit are regarded as recent conversations and output together with the conversation history background. The word limit is set according to demand, ranging from hundreds to thousands, to effectively manage long-term conversation history.
4. The medical emotional support model according to claim 1, characterized in that: The dialogue strategy guidance module includes: adding doctor-patient communication strategies, historical dialogue strategies and guidance plans to prompts, wherein the doctor-patient communication strategies are skills for communication between doctors and patients manually written by doctor experts, the historical dialogue strategies are doctor-patient communication strategies used in past dialogues, and the guidance plans include doctor-patient communication strategy trajectories for controlling the medical emotion framework at the global dialogue level.
5. The medical emotional support model according to claim 1, characterized in that: The response generation module includes: simulating the doctor's tone and style according to the doctor role information set inside the response generation module to enhance the patient's sense of trust; judging the stage of the current conversation according to the recent conversation history provided by the short-term memory storage module to better maintain consistency with the theme of the conversation history; and then responding to the patient in a targeted manner according to the strategy provided by the dialogue strategy guidance module.
6. The medical emotional support model according to claim 1, characterized in that: The correction module includes: a module for summarizing the reflective experience of the system's failure to provide emotional support based on the patient's questions, the system's responses and the patient's feedback, and providing timely feedback to the dialogue strategy guidance module in the medical emotional support framework, so as to provide more effective emotional support.
7. The medical emotional support model according to claim 1, characterized in that: When initially developing the medical emotional support framework, a pre-trained large language model was used to simulate the patient role and to have conversations with the medical emotional support framework. The system was comprehensively evaluated by analyzing multiple rounds of conversation records between the virtual patient played by the large language model and the medical emotional support system.
8. A method for generating a large medical emotional support model, characterized in that: The method comprises: Step 1: Identify the patient’s current negative emotions and the reasons for such negative emotions through the conversation history, and input the detection results into the response generation module so that a more targeted response can be given to the patient; Step 2: Store the conversation between the patient and the response generation module as a conversation history record. Once the conversation exceeds the upper limit, keep the most recent conversation. The large language model will compile the conversation history that exceeds the upper limit as background information and input it into the current response generation module so that it can understand the current stage of the conversation and make an appropriate response. Step 3: Use the conversation history records to determine the conversation communication strategy that the response generation module should use next, and provide emotional support to the patient from the perspective of the entire conversation; Step 4: Set personal background information and current situation, and use the large language model as the core to simulate the doctor to generate appropriate responses to the questions raised by the patient; Step 5. Conduct self-reflection based on the patient’s feedback on the medical emotional support framework, summarize the reasons for the failure of strategy recommendation, and update the recommended experience of the dialogue strategy guidance module.
9. The method for generating a large medical emotional support model according to claim 8, characterized in that: The Step 1 includes: The authenticity of the large language model generation is improved by adding emotion-related stimuli to the input prompt words of the large language model. The large language model judges the patient's negative emotions and reasons based on the input dialogue history and inputs them into the subsequent response generation module.
10. The method for generating a large medical emotional support model according to claim 8, characterized in that: The Step 4 includes: simulating the doctor's tone and style according to the doctor's role information set in the response generation module to enhance the patient's sense of trust; judging the stage of the current conversation according to the recent conversation history provided by the short-term memory storage module to better maintain consistency with the topic of the conversation history; and then responding to the patient in a targeted manner according to the strategy provided by the dialogue strategy guidance module.
Citation Information
Cited By
Conversation content scene suitability intelligent evaluation method based on text sentiment calculation
CN120600355A
Intelligent Evaluation Method for Dialogue Content Context Adaptability Based on Text-Based Sentiment Computation
CN120600355B