Medical guidance problem generation method and related device
By splitting the medical data text into fragments and generating summary, and building a problem-generating prompt instruction, it solves the problem that medical guidance problems generated by the medical question-and-answer system are difficult to match user intentions, achieving a higher user experience.
Patent Information
- Application Number
- CN202411829447.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-15
AI Technical Summary
When the existing medical question-and-answer system generates medical guidance questions, it is difficult to match the user's intentions and needs, resulting in poor user experience.
By splitting the acquired medical data text into multiple medical text fragments and generating a medical text summary with a smaller text length for each fragment, a problem generation prompt instruction including a medical text summary is constructed to instruct the medical large language model to generate medical guidance problems.
This enables the medical large language model to understand the longer medical data text content more accurately, generate medical guidance issues that better match user intentions and needs, thereby improving user experience.
Smart Images

Figure CN119830921A_ABST
Abstract
Description
Technical Field
[0001] The implementation methods in this application relate to the field of intelligent medical technology, and in particular to a method for generating medical guidance questions and related devices. Background Art
[0002] With the rapid development of the medical industry, medical question-and-answer systems have played an increasingly important role in improving diagnosis and treatment efficiency, optimizing medical services, and enhancing the level of medical intelligence. Medical question-and-answer systems provide patients and medical practitioners with convenient consultation channels to help quickly obtain medical information, reduce diagnosis time, and improve the quality of medical services. Medical question-and-answer systems usually rely on natural language processing technology and knowledge graphs, combined with big data analysis, to provide users with professional and accurate medical answers.
[0003] Since the knowledge in the medical field is vast and specialized, users may find it difficult to accurately express their needs when asking questions, which makes it difficult for the system to understand their intentions, affecting the quality of answering questions. Therefore, in related technologies, the medical question-answering system needs to recommend questions to users during the interaction with users, that is, generate one or more medical guidance questions recommended by the system, and users can select medical guidance questions that match their intentions and needs for subsequent questions and answers to obtain the desired medical information.
[0004] However, when existing medical question-answering systems recommend questions to users, the generated medical guidance questions are difficult to match the user's intentions and needs, resulting in a poor user experience. Summary of the invention
[0005] In view of this, multiple embodiments of the present application are dedicated to providing a method for generating medical guidance questions and related devices, which can make the generated medical guidance questions more in line with user intentions and needs, and improve user experience.
[0006] One embodiment of the present application provides a method for generating medical guidance questions, the method comprising: splitting the acquired medical data text into multiple medical text segments; generating a medical text summary corresponding to the medical text segments; wherein the length of the medical text summary is less than the length of the corresponding medical text segment; and constructing a question generation prompt instruction including the medical text summary to instruct a medical large language model to generate a medical guidance question.
[0007] One embodiment of the present application provides a device for generating medical guidance questions, the generating device comprising: a splitting module, used to split the acquired medical data text into multiple medical text segments; a summary generating module, used to generate a medical text summary corresponding to the medical text segment; wherein the length of the medical text summary is less than the length of the corresponding medical text segment; an instruction construction module, used to construct a question generation prompt instruction including the medical text summary, so as to instruct the medical large language model to generate a medical guidance question.
[0008] One embodiment of the present application provides a computer device, which includes a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the method for generating medical guidance questions as described above.
[0009] One embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, the method for generating medical guidance questions as described above can be implemented.
[0010] One embodiment of the present application provides a computer program product, which is used to implement the method for generating medical guidance questions as described above.
[0011] In multiple implementations provided in this application, by splitting the acquired medical data text into multiple medical text segments, and generating a medical text summary with a shorter text length corresponding to the medical text segment, a question generation prompt instruction including the medical text summary can be constructed to instruct the medical large language model to generate medical guidance questions. In this way, the medical large language model can more accurately understand the content of the longer medical data text and generate medical guidance questions that better match the user's intentions and needs to improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A schematic diagram of a medical question-answering system generating medical guidance questions according to one embodiment of the present application.
[0013] Figure 2 A flowchart of a method for generating medical guidance questions provided in accordance with one embodiment of the present application.
[0014] Figure 3 A schematic diagram of the interaction between a client and a server of a medical question-and-answer system provided for one embodiment of the present application.
[0015] Figure 4 A schematic diagram of a device for generating medical guidance questions provided in accordance with an embodiment of the present application.
[0016] Figure 5 A schematic diagram of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0018] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0019] In the related art, in the process of Q&A interaction with users, the medical Q&A system can recommend questions to users based on the user's input text and the context of the conversation, by understanding the user's intention and needs, so as to assist the user in obtaining the required medical information. For example, the medical Q&A system can generate a solution for medical guidance questions by first constructing a medical guidance question library offline, and then retrieving and recalling based on the user's questions when interacting with the user.
[0020] Due to the complexity of the medical field, in many scenarios, users' questions often involve a lot of background information and medical knowledge content. For example, the user of the medical question-and-answer system can be a doctor. When providing diagnosis and treatment services to patients, the doctor can use the medical question-and-answer system to retrieve relevant medical information, such as medical literature, and obtain corresponding clinical suggestions as auxiliary information for their diagnosis and treatment activities. This makes the medical question-and-answer system need to understand a longer context when generating medical guidance questions. However, the medical question-and-answer system usually performs better when processing shorter context texts, and can understand and identify user intentions. However, in the case of a longer context, such as medical literature content that may be as long as tens of thousands of words, the medical question-and-answer system's ability to understand is limited, and key information is prone to missing, making it difficult for the medical guidance questions generated by the medical question-and-answer system to match the user's intentions and needs, resulting in a poor user experience.
[0021] Furthermore, since the medical question-answering system in the related art relies on a constructed medical guidance question library to implement question recommendations, when the medical guidance question library of the medical question-answering system lacks historical data, the problem of "cold start difficulty" is prone to occur. For example, when the user using the medical question-answering system is a new user who uses it for the first time, or when the user inputs new content, the medical question-answering system may find it difficult to match highly relevant results in the medical guidance question library, and thus it is difficult to provide effective question recommendations to the user.
[0022] In addition, in actual use, user inputs are diverse, and the historical data in the medical guidance question library is difficult to cover all possible user intentions. The offline constructed medical guidance question library also needs to be updated and maintained regularly to maintain its accuracy and timeliness, which makes the operation and maintenance cost of the medical question-answering system high.
[0023] Therefore, it is necessary to provide a method for generating medical guidance questions, which can make the generated medical guidance questions more consistent with user intentions to improve user experience.
[0024] See also Figure 1 . One embodiment of the present application provides an example of an application scenario of a method for generating medical guidance questions. The method for generating medical guidance questions can be applied to a medical question-and-answer system. Specifically, for example, as a user of the medical question-and-answer system, a doctor can obtain auxiliary medical information through the medical question-and-answer system when conducting diagnosis and treatment activities or academic research activities. Among them, the medical question-and-answer system can generate one or more medical guidance questions as question recommendations while generating corresponding answers to questions raised by the doctor through the method for generating medical guidance questions. The doctor can select medical guidance questions that match his or her needs and input them to obtain more medical information when he or she needs to continue asking questions.
[0025] When recommending questions, the medical question-answering system can first obtain medical information text related to the questions raised by the doctor. The medical information text may contain a large amount of medical knowledge content and a large number of words. For example, the medical information text may include medical literature, medical cases, etc. Specifically, the medical question-answering system can obtain medical information text by having the doctor upload files or input text on the client, or by retrieving and recalling the medical information text in the medical knowledge base.
[0026] In this scenario example, the doctor wants to know the medical information related to the cause of hypertension in order to provide a more detailed treatment and management plan for the hypertensive patient he is treating. The doctor can enter in the client of the medical question-answering system: "Hello, as a medical expert, please give some suggestions for the treatment and management of hypertension for patient xxx. The relevant information of patient xxx is as follows: xxx". Then, after receiving the request from the client, the server of the medical question-answering system can retrieve a 40,000-word medical paper from the medical knowledge base as the medical data text based on the content entered by the doctor, and call the medical big language model, using the medical paper as part of the question generation prompt instruction, and instructing the medical big language model to generate medical guidance questions recommended to the doctor for further questions.
[0027] Due to the limitations of the scale and parameters of the medical large language model, it has a maximum input length limit for the input prompt instructions, such as the maximum input length can be 10,000 words. When the text length of the prompt instruction input to the medical large language model exceeds the maximum input length, the medical large language model is prone to lose some key information in the prompt instruction, making it difficult for the medical large language model to understand the medical papers or doctors' intentions obtained by the medical question-answering system, resulting in the generated medical guidance questions not matching the doctor's needs, and it is difficult to guide the doctor's subsequent questions. Therefore, if the medical question-answering system directly inputs a 40,000-word medical paper as part of the prompt instruction into the medical large language model, exceeding the maximum input length limit of 10,000 words, the medical large language model may find it difficult to fully understand the content of its context, resulting in key information loss. For example, in a medical paper, the content about the treatment and management of hypertension that doctors want to know may be located in the last chapter, that is, the text that matches the intention and needs of the doctor's question may be concentrated in the last 5,000 to 10,000 words. At this time, because the prompt instruction input to the medical language model includes the content of the entire medical paper, which far exceeds the maximum input length, the medical language model may lose the information in the last chapter when processing, that is, lose the key information that matches the doctor's needs. Furthermore, the medical guidance questions recommended to doctors by the medical language model may not be related to the treatment and management of hypertension. For example, the medical guidance questions recommended to doctors may be some questions about the incidence population and pathogenesis of hypertension.
[0028] Therefore, in this scenario example, the medical question-and-answer system can set a specified upper length threshold for the prompt instructions input to the medical large language model. The specified upper length threshold can be less than the maximum input length of the medical large language model, such as 5,000 words. For prompt instructions with an input length of less than 5,000 words, the medical large language model can have better processing performance, and can understand the content in the prompt instructions more fully, and it is not easy to lose key information. Before calling the medical large language model, the medical question-and-answer system can first construct a question generation prompt instruction for the content of the medical paper when the acquired medical paper exceeds 5,000 words, so that the length of the question generation prompt instruction input to the medical large language model is less than 5,000 words. In this way, the medical large language model can process the question generation prompt instruction based on better processing performance.
[0029] Specifically, in this scenario example, for the obtained medical paper, if its text length exceeds the specified length upper limit threshold of 5,000 words, the medical question-answering system can split it into multiple medical text segments through semantic segmentation. For example, a medical paper includes 6 chapters, then for the medical paper, each chapter can be split as a medical text segment to obtain 6 medical text segments.
[0030] Then, for these six medical text fragments, the medical question-answering system can first call the medical big language model, input the summary prompt instructions built based on each medical text fragment into the medical big language model, and instruct the medical big language model to generate medical text summaries corresponding to the six medical text fragments. In this scenario example, the medical big language model can filter out the content that is irrelevant or meaningless to the doctor's intention or needs in each chapter of the medical paper by referring to the historical conversation content, question content, and other basic information between the doctor and the medical question-answering system, so as to shorten the text length of the medical text summary while retaining the extracted core and key information. For example, in a medical paper, the introduction, footnotes, and citation parts of the references are of little reference value for the treatment and management of hypertension, and can be filtered out in the generated medical summary text.
[0031] In this scenario, the length of the medical text summary can be much shorter than the length of the medical text segment. For a 40,000-word medical paper, the length of the medical text segment obtained by splitting each chapter can be no more than 7,000 words, and the length of the generated medical text summary can be within 700 words.
[0032] In this scenario example, based on the medical text summaries corresponding to the 6 medical text fragments, the medical question-answering system can construct a question generation prompt instruction, and input the question generation prompt instruction into the called medical large language model to instruct the medical large language model to generate n medical guidance questions. Since the length of each medical text summary is within 700 words, the length of the question generation prompt instruction constructed by the medical question-answering system based on the 6 medical text summaries can be less than the specified length upper limit threshold of 5000 words. In this way, when calling the medical large language model to generate medical guidance questions, the medical large language model can have better processing performance, more accurately and fully understand the core content of medical papers and identify the doctor's intentions, so that the generated medical guidance questions are more in line with the doctor's needs, so as to guide the doctor's further questions. Among them, the question generation prompt instruction can not only include the content of the medical text summary, but also include the doctor's basic user information, historical conversation content, and intention prompt information used to reflect the doctor's intention to ask questions.
[0033] In this scenario example, further, the medical question-and-answer system can call the medical lightweight model to filter the n generated medical guidance questions, remove the medical guidance questions that contain medical knowledge errors, AI hallucinations, inconsistent contextual intent, etc., and then display the remaining target medical guidance questions on the client to the doctor for selection, so that the medical guidance questions provided to the doctor can be more accurate.
[0034] Through the above method, the medical question-and-answer system can more accurately recommend medical guidance questions to doctor users during the interaction with doctor users, bringing convenience to doctor users.
[0035] See also Figure 2 The embodiment of the present application provides a method for generating medical guidance questions. The method for generating medical guidance questions can be applied to a server of a medical question-answering system.
[0036] In this embodiment, the method for generating medical guidance questions may include the following steps.
[0037] Step S110: split the acquired medical data text into multiple medical text segments.
[0038] In some cases, the medical question-answering system can process long texts more effectively by splitting the acquired medical data text into multiple medical text segments, thereby improving the processing efficiency and accuracy of the medical large language model. Since medical data texts usually contain a large amount of complex information and involve different medical fields and backgrounds, the medical question-answering system may encounter performance bottlenecks during processing, affecting the accuracy of the output results. Therefore, splitting longer medical data texts can enable the medical question-answering system to understand the content of the medical data text more accurately and avoid problems such as missing key information.
[0039] In this embodiment, the medical information text can be used as background information text for the user to interact with the medical question-and-answer system. Specifically, for example, the user of the medical question-and-answer system can be a doctor or a patient. In the dialogue between the user and the medical question-and-answer system, the medical information text can be used as the basis for the medical question-and-answer system to answer the user's questions, helping the medical question-and-answer system to output medical information more comprehensively and accurately.
[0040] In this embodiment, the medical data text may be medical literature, such as medical papers, medical journals, etc., or may be medical knowledge or cases retrieved based on a retrieval system or a search engine.
[0041] In this embodiment, the medical question-and-answer system can obtain medical information text by searching and recalling in a medical knowledge base, or by allowing a user to upload a document or input text on a client.
[0042] In this embodiment, the medical question-answering system can split the medical data text according to its structure and semantic content. For example, the medical data text can be split into multiple medical text segments according to chapter titles, paragraph structures, or other semantic identifiers. Each medical text segment can independently reflect a specific theme or medical field in the text. For example, a medical data text segment can contain a description of the symptoms of a specific disease, a treatment plan, a drug use guide, and other content.
[0043] In some embodiments, the medical question-answering system is not limited to dividing the medical document text according to the traditional structural division, but can also flexibly divide it according to the context and semantic relevance. For example, the medical question-answering system can identify key terms and information association points in the medical document text and divide it into multiple medical text segments, so that each medical text segment can be processed independently and reduce the impact of redundant information.
[0044] Step S120: Generate a medical text summary corresponding to the medical text segment; wherein the length of the medical text summary is smaller than the length of the corresponding medical text segment.
[0045] In some cases, the medical question-answering system can effectively extract and retain the core and key information in the text by generating a medical text summary for each medical text fragment to reduce the impact of redundant content.
[0046] In this embodiment, the medical text summary can serve as the basis for the subsequent generation and recommendation of medical guidance questions. By extracting the core points in the medical text fragments, the medical text summary can provide clear background information, so that the medical question-answering system can understand user needs more accurately, thereby generating more accurate and personalized medical guidance questions, and further improving the user experience.
[0047] In this embodiment, the length of the medical text summary is less than the length of the corresponding medical text segment, which can make the generated medical text summary meet the requirements of content extraction, further shorten the length of the text to be subsequently processed by the medical question-and-answer system, and help the medical question-and-answer system to generate and recommend more accurate medical guidance questions based on understanding the core and key content in the medical material text. Specifically, the medical question-and-answer system can extract and compress key sentences, medical terms, and related background information in the medical text segment, retaining important semantic information to generate a medical text summary. In this way, the medical text summary can reflect the core content of the medical text segment without including irrelevant content.
[0048] In some embodiments, the medical question-and-answer system can also combine the user's current question and historical conversations to generate a medical text summary corresponding to the medical text segment by analyzing the user's intent, so that the content of the medical text summary is more consistent with the user's intent, thereby improving the matching degree between the subsequent processing results of the medical question-and-answer system and the user's needs. Specifically, for example, when the medical question-and-answer system generates a medical text summary for a medical text segment about diabetes, if the user's historical conversation content mainly focuses on how to treat diabetes, the generated medical text summary can better match the user's intent and needs, and only contain descriptions of treatment methods, commonly used drugs and efficacy, while omitting irrelevant historical background or statistical data.
[0049] Step S130: construct a question generation prompt instruction including the medical text summary to instruct the medical large language model to generate medical guidance questions.
[0050] In some cases, the medical question-answering system can improve the matching degree between medical guidance questions and user needs by using medical text summaries to construct question generation prompts and calling the medical big language model to output medical guidance questions based on the question generation prompts. Specifically, medical text summaries, as key information extracted from medical material text fragments, can provide highly summarized background knowledge for the medical big language model. By embedding the content of medical text summaries into question generation prompts, the medical big language model can be helped to understand user needs more accurately and generate corresponding medical guidance questions.
[0051] In this embodiment, the question generation prompt instruction can be used to guide the medical large language model to generate a task requirement according to the question generation prompt instruction, and based on the text content therein, output one or more medical guidance questions for recommendation to the user as an answer and response to the task requirement proposed in the question generation prompt instruction. Specifically, for example, the question generation prompt instruction can be in the following form: "You are an assistant who helps doctors analyze medical information. Please generate 5 professional questions that doctors may ask based on the following multiple medical text summaries. [Medical text summary 1: xxx; Medical text summary 2: xxx; .......]", of course, it can also be constructed in other forms or templates, and there is no specific limitation on this.
[0052] In this embodiment, the medical large language model can be a general large language model (Large Language Model, LLM for short). Specifically, the medical large language model can be trained with a large number of parameters and large-scale data. The medical large language model can have a huge structure and complexity to capture a large number of features. The medical large language model can have semantic understanding, analysis, reasoning, and natural language generation capabilities. The medical large language model can output the corresponding answer text based on the prompt instructions input by the user and the large amount of general knowledge it has learned.
[0053] In this embodiment, the medical big language model can also be a big language model focusing on medical field tasks obtained by fine-tuning the pre-trained model.
[0054] In some embodiments, the constructed question generation prompt instruction includes not only a medical text summary, but also other relevant information, such as the user's historical conversations, the user's basic information, or the user's intention prompt information. These relevant information help the medical big language model to further accurately understand the user's needs and provide more personalized guidance for generating medical guidance questions. By combining the user's historical conversations, basic information, or intention prompt information, the medical guidance questions generated by the medical big language model are more in line with the user's intentions and actual needs, improving the user's experience when using the medical question-answering system.
[0055] In some embodiments, the user's historical conversation may include the interaction history between the user and the medical question-answering system, which can provide the medical big language model with the user's question intention, focus, and medical background information. For example, if the user has previously asked questions about "diabetes management", the medical question-answering system can use the information about diabetes management as part of the question generation prompt instruction, so that when the medical big language model is called, it can generate at least some medical guidance questions related to diabetes management, so as to better match the user's needs.
[0056] In some implementations, the user's basic information may include the user's personal background, medical history, medical needs, etc. Similarly, the user's basic information may also provide a personalized basis for the medical language model to generate medical guidance questions, so as to improve the matching degree between the generated medical guidance questions and the user.
[0057] In some embodiments, the user intention prompt information can be used to reflect the user's needs and concerns. The user intention prompt information can be derived from the user's current questioning method, content, or intention expression. Specifically, the user intention prompt information may include keywords used to express the user's concerns. For example, the user intention prompt information may include: treatment plan, diagnosis, cause, drug, symptom, adverse reaction, etc.
[0058] In some embodiments, when constructing the question generation prompt instruction, the format can also be adjusted and optimized according to the content of the medical text summary to improve the efficiency of the output of the medical large language model. For example, in some cases, the medical question-answering system can appropriately streamline the user's historical conversation content and remove redundant or irrelevant information, so that the question generation prompt instruction input to the medical large language model is more compact, thereby improving the processing efficiency of the medical large language model.
[0059] In this embodiment, complex medical data text is converted into multiple medical text segments through text splitting, and a question generation prompt instruction is constructed based on the medical text summary extracted from the medical text segment to instruct the medical big language model to generate medical guidance questions that can be accurately recommended to users, using the chain of thought (COT). Chain thinking can solve complex problems by gradually decomposing them and converting them into a series of simple sub-problems. In this embodiment, the question generation prompt instruction input to the medical big language model is designed using the chain thinking method, which can help the medical big language model better understand the structure and logic of the question generation prompt instruction, including the medical text summary after the medical data text is split, basic user information, historical conversations, intention prompt information and other contents, thereby improving the accuracy and interpretability of the output results.
[0060] In this embodiment, by splitting the acquired medical data text into multiple medical text segments and generating medical text summaries with smaller text lengths corresponding to the medical text segments, the medical large language model can more accurately understand the content of longer medical data texts and generate medical guidance questions that better match user intentions and needs, thereby improving the user experience.
[0061] Moreover, compared with the medical question-and-answer system of the related technology, the method for generating medical guidance questions provided in the present embodiment, when applied in the medical question-and-answer system, does not need to rely on the retrieval and recall method of the medical guidance question library to recommend questions. Therefore, it can also reduce the problems of "difficult cold start", low user intention coverage, and high operation and maintenance costs.
[0062] In some embodiments, the medical question-and-answer system can also obtain multiple medical guidance questions generated by the medical large language model; call the trained medical lightweight model to screen the multiple medical guidance questions, and determine the target medical guidance questions to be provided to the user.
[0063] In some cases, since the medical large language model may generate a large number of medical guidance questions, some of them may have poor relevance or accuracy. For example, some medical guidance questions generated by the medical large language model may contain medical knowledge errors, AI hallucinations, or be irrelevant to user intentions. These medical guidance questions need to be eliminated by calling the medical lightweight model for screening, so that the target medical guidance questions finally provided to users can be more accurate and better match user needs.
[0064] In some embodiments, the medical question-and-answer system can call the trained medical lightweight model to perform binary classification labeling on multiple medical guidance questions generated by the medical large language model from multiple dimensions such as knowledge errors, AI hallucinations, and user intention continuation to determine the target medical guidance questions to be provided to the user.
[0065] In some embodiments, since a lightweight model is called in the step of screening multiple medical guidance questions, less computing resources can be occupied in the medical question-answering system, thereby improving overall efficiency.
[0066] In some embodiments, the medical question-answering system may split the received medical data text into multiple medical text segments only when the received medical data text exceeds a specified upper length threshold; wherein the specified upper length threshold is less than the maximum input length of the medical large language model.
[0067] In some embodiments, the medical large language model has a maximum input length. The maximum input length refers to the maximum number of characters that the medical large language model can accept and process. Text exceeding the maximum input length will not be completely processed by the medical large language model. Specifically, the maximum input length of the medical large language model is set according to the architecture and computing power of the model, and this length is usually defined by the designer of the model during the pre-training stage. For example, a 12-layer or 24-layer Transformer structure has a maximum input length of no more than 512 characters.
[0068] In some embodiments, the specified length upper limit threshold is used to indicate the processing performance bottleneck of the medical large language model for the text length of the prompt instruction. Specifically, the processing performance of the medical large language model for prompt instructions whose length is less than the specified length upper limit threshold may be better than the processing performance of prompt instructions whose length is greater than the specified length upper limit threshold. For example, when the length of the medical data text input to the medical large language model does not exceed the specified length upper limit threshold, the medical large language model may have a higher processing performance and be able to fully understand the medical data text. However, when the length of the medical data text input to the medical large language model exceeds the specified length upper limit threshold, the processing performance of the medical large language model will decrease, and problems such as loss of key information and misunderstanding may occur when understanding the medical data text. It can be understood that the specified length upper limit threshold is less than the maximum input length of the medical large language model. For example, the maximum input length of the medical large language model is 10,000 words, and the specified length upper limit threshold can be 9,000 words or 5,000 words. Of course, the maximum input length of the medical large language model can also be set to 5,000 words or 15,000 words, and correspondingly, the specified length upper limit threshold can be set to 4,000 words or 12,000 words, which can be flexibly set according to needs. Therefore, when the received medical data text does not exceed the specified length upper limit threshold, the medical question-answering system can directly call the medical large language model for processing, and when the received medical data text exceeds the specified length upper limit threshold, the medical question-answering system splits the medical data text into multiple medical text segments so that the length of each medical text segment does not exceed the specified length upper limit threshold, so as to ensure that the medical large language model maintains a high processing performance, thereby improving the accuracy of the generated medical guidance questions.
[0069] In some implementations, the length of the medical text summary satisfies: the length of the question generation prompt instruction including the medical text summary is less than a specified upper length threshold.
[0070] In some cases, since the content of the question generation prompt instruction may include relevant information such as the user's historical conversations, the user's basic information, or the user's intention prompt information in addition to the medical text summary, the length of the constructed question generation prompt instruction may exceed the specified length upper limit threshold after adding these relevant information. If it is input into the medical large language model, the processing performance of the medical large language model will be reduced, and it will be difficult to generate more accurate medical guidance questions. Therefore, the medical question-answering system can control the length of the medical text summary generated based on the medical text fragment within a certain range to ensure that the length of the final generated question generation prompt instruction does not exceed the specified length upper limit threshold, so that the medical large language model can maintain a high processing performance when processing the question generation prompt instruction, thereby improving the generated medical guidance questions to better match user needs.
[0071] In some embodiments, the medical question-answering model may call a medical large language model to generate medical text summaries for multiple medical text fragments during the step of generating medical text summaries corresponding to medical text fragments; wherein, in the summary prompt instruction for calling the medical large language model to generate the medical text summary, a constraint prompt word for constraining the length of the generated medical text summary is included, so that the length of the question generation prompt instruction including the medical text summary is less than a specified length upper limit threshold.
[0072] In some cases, the medical question-answering model can limit the constraint prompt words in the summary prompt instruction input to the medical large language model, so that the length of the medical text summary output by the medical large language model is shorter, and the length of the question generation prompt instruction constructed based on the medical text summary can be less than the specified length upper limit threshold. In this way, the medical large language model can maintain a high processing performance when processing the question generation prompt instruction.
[0073] In some embodiments, the summary prompt instruction is used to instruct the medical large language model to output a medical text summary corresponding to the medical text fragment. Specifically, the summary prompt instruction can be constructed based on the medical text fragment. For example, the summary prompt instruction can be in the following form: "You are an assistant who helps doctors analyze medical information. Based on the following medical text fragment, please generate a medical text summary that can summarize the core points in the medical text fragment. Please note that the number of words in the generated medical text summary should not exceed 500. [Medical text fragment: xxx]".
[0074] In some embodiments, the constraint prompt word is used to limit the length of the medical text summary output by the medical large language model. Specifically, the constraint prompt word can be part of the summary prompt instruction. For example, in the example of the summary prompt instruction above, "no more than 500 words" is a constraint prompt word.
[0075] See also Figure 3 . One embodiment of the present application provides a medical question-and-answer system. The medical question-and-answer system may include a client and a server. Among them, the client may be an electronic device with network access capability. Specifically, for example, the client may be a desktop computer, a tablet computer, a laptop computer, a smart phone, a digital assistant, a smart wearable device, a shopping guide terminal, a television, a smart speaker, a microphone, etc. Among them, smart wearable devices include but are not limited to smart bracelets, smart watches, smart glasses, smart helmets, smart necklaces, etc. Alternatively, the client may also be software that can be run in the electronic device. The server may be an electronic device with certain computing and processing capabilities. It may have a network communication module, a processor, and a memory, etc. Of course, the server may also refer to software running in the electronic device. The server may also be a distributed server, which may be a system with multiple processors, memories, network communication modules, etc. operating in collaboration. Alternatively, the server may also be a server cluster formed by several servers. Alternatively, with the development of science and technology, the server may also be a new technical means that can realize the corresponding functions of the implementation method of the specification. For example, it may be a new form of "server" based on quantum computing.
[0076] In this embodiment, if Figure 3 As shown in , after the user asks a question to the medical question-answering system on the client, the client can send a recommendation request for medical guidance questions to the server. After receiving the recommendation request for medical guidance questions, the server can obtain the target medical guidance question by executing the method for generating medical guidance questions in the aforementioned embodiment and return it to the client to provide it to the user for selection in the user interface.
[0077] See also Figure 4 One embodiment of the present application further provides a device for generating medical guidance questions, and the device may include the following modules.
[0078] A splitting module, used for splitting the acquired medical data text into multiple medical text segments;
[0079] A summary generation module, used to generate a medical text summary corresponding to the medical text segment; wherein the length of the medical text summary is less than the length of the corresponding medical text segment;
[0080] An instruction construction module is used to construct a question generation prompt instruction including the medical text summary to instruct the medical large language model to generate medical guidance questions.
[0081] In this embodiment, the specific functions and effects achieved by the device for generating medical guidance questions can be explained with reference to other embodiments of the present application and will not be repeated here.
[0082] The embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor implements the method for generating medical guidance questions as described above.
[0083] The embodiment of the present application also provides a computer program product comprising instructions, and when the computer program product is executed by a processor, the method for generating medical guidance questions as described above is implemented.
[0084] See also Figure 5 The embodiment of the present application may provide a computer device, the computer device comprising: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, the instructions are executed by the one or more processors, so that the one or more processors implement the aforementioned method for generating medical guidance questions.
[0085] In some embodiments, the computer device may include a processor, a non-volatile storage medium, an internal memory, a communication interface, a display device, and an input device connected by a system bus. The non-volatile storage medium may store an operating system and related computer programs.
[0086] The user information or user account information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, etc.) involved in multiple implementation methods of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0087] It should be understood that the specific examples in this article are only intended to help those skilled in the art better understand the embodiments of the present application, rather than to limit the scope of the present invention.
[0088] It can be understood that in the various implementations of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of the present application.
[0089] It can be understood that the various embodiments described in this application can be implemented individually or in combination, and the embodiments of this application are not limited to this.
[0090] Unless otherwise stated, all technical and scientific terms used in the embodiments of the present application have the same meaning as those generally understood by those skilled in the art of the technical field of the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the scope of the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed items. The singular forms of "a kind of", "above" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0091] It can be understood that the processor of the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0092] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0093] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0094] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.
[0095] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0096] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0097] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0098] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0099] The above is only a specific implementation of the present application, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for generating medical guidance questions, characterized in that: The method comprises: Splitting the acquired medical data text into multiple medical text segments; Generate a medical text summary corresponding to the medical text segment; wherein the length of the medical text summary is less than the length of the corresponding medical text segment; Construct a question generation prompt instruction including the medical text summary to instruct the medical large language model to generate medical guidance questions.
2. The method according to claim 1, characterized in that The steps of splitting the acquired medical data text into multiple medical text segments include: The medical data text is split into multiple medical text segments only when the received medical data text exceeds a specified upper length threshold; wherein the specified upper length threshold is less than the maximum input length of the medical large language model.
3. The method according to claim 2, characterized in that The processing performance of the medical large language model for prompt instructions whose length is less than the specified upper limit threshold is better than the processing performance of prompt instructions whose length is greater than the specified upper limit threshold.
4. The method according to claim 2, characterized in that: The length of the medical text summary satisfies: the length of the question generation prompt instruction including the medical text summary is less than the specified length upper limit threshold.
5. The method according to claim 4, characterized in that The step of generating a medical text summary corresponding to the medical text segment includes: A medical big language model is called to generate medical text summaries of multiple medical text fragments; wherein, in the summary prompt instruction of calling the medical big language model to generate the medical text summary, a constraint prompt word for constraining the length of the generated medical text summary is included, so that the length of the question generation prompt instruction including the medical text summary is less than the specified length upper limit threshold.
6. The method according to claim 4, characterized in that The question generation prompt instruction also includes at least one of the following: user historical dialogue, user basic information or user intention prompt information.
7. The method according to claim 1, characterized in that The method further comprises: Obtaining multiple medical guidance questions generated by the medical large language model; The trained medical lightweight model is called to screen the multiple medical guidance questions and determine the target medical guidance questions to be provided to the user.
8. A device for generating medical guidance questions, characterized in that: The generating device comprises: A splitting module, used for splitting the acquired medical data text into multiple medical text segments; A summary generation module, used to generate a medical text summary corresponding to the medical text segment; wherein the length of the medical text summary is less than the length of the corresponding medical text segment; An instruction construction module is used to construct a question generation prompt instruction including the medical text summary to instruct the medical large language model to generate medical guidance questions.
9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the method for generating medical guidance questions according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, it can implement the method for generating medical guidance questions according to any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product is used to implement the method for generating medical guidance questions according to any one of claims 1 to 7.
