Instruction fine tuning data generation method and device based on medical information
By obtaining seed tasks and task expansion prompt information associated with the medical information knowledge base and combining with the large language model to generate subtasks, the problems that are difficult to meet the diversity and complexity of medical information extraction in the existing technology are solved, and the medical information extraction is achieved Diversity, complexity and specificity improve the accuracy of information extraction.
Patent Information
- Application Number
- CN202411226793.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art is difficult to meet the diversity and complexity required for medical information extraction. Traditional methods rely on artificial features. Although deep learning methods are widely used, the generated instruction fine-tuning data is difficult to meet the specific needs of medical information.
By obtaining multiple seed tasks associated with the medical information knowledge base, the configuration-based task expansion requirements generate task expansion prompt information, input a large language model to generate subtasks, and combine the target task set and medical documents to be extracted, using the target filtering method Build a target task set to generate instruction fine-tuning data with diversity and complexity.
It ensures the diversity, complexity and specificity of medical information extraction, provides strong information support for the fine-tuning of subsequent large prediction models, and improves the accuracy and effectiveness of information extraction.
Smart Images

Figure CN119203988A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and in particular, to a method and device for generating instruction fine-tuning data based on medical information. Background Art
[0002] With the advancement of information technology, the application of medical-related data in medical activities has been greatly promoted. This text information not only describes the medical process in detail, but also contains a large amount of valuable medical information, such as diagnosis, treatment, examination, testing, medication, clinical adverse events and other case information, which has broad application prospects, including but not limited to medical information retrieval, intelligent question-answering system and clinical decision support. Therefore, accurate extraction of medical entities is crucial to fully utilize medical information. However, due to the unstructured characteristics of medical-related data documents, extracting key medical information from them is a severe challenge.
[0003] At present, information entity extraction methods mainly include traditional machine learning algorithms and deep learning methods. Traditional methods rely on artificial features and have certain limitations. Deep learning methods are increasingly used in entity extraction, and large language models are particularly outstanding. However, the instruction fine-tuning data generated by large language models is difficult to meet the diversity and complexity required for medical information extraction. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method and device for generating instruction fine-tuning data based on medical information, which can generate a task set with diversity and complexity based on medical knowledge data such as clinical diagnosis and treatment guidelines and medical records, thereby obtaining instruction fine-tuning data with diversity and complexity, ensuring the diversity, complexity and specificity of medical information extraction instructions, and providing strong guarantee and information support for the fine-tuning of subsequent large prediction models.
[0005] In a first aspect, a method for generating instruction fine-tuning data based on medical information is provided, and the method may include:
[0006] Acquire a plurality of seed tasks associated with a preset medical information knowledge base;
[0007] Based on the configured task extension requirements and the plurality of seed tasks, generating task extension prompt information for any seed task;
[0008] Inputting the task extension prompt information into the trained large language model to obtain at least one subtask extended from different seed tasks; the task extension prompt information is used to instruct the large language model to extend any seed task to obtain a subtask that meets the task extension requirements;
[0009] Inputting extraction prompt information including a target task set and medical documents to be extracted into the large language model to obtain information extraction results that meet each task in the task set; the target task set is constructed based on the multiple seed tasks and the at least one subtask, and the extraction prompt information is used to instruct the large language model to extract information from the medical information knowledge base according to the tasks in the seed task set;
[0010] Based on each task in the task set and corresponding information extraction results, instruction fine-tuning data is generated.
[0011] In a possible implementation, the medical information knowledge base includes clinical diagnosis and treatment guideline data and clinical course data;
[0012] Get multiple seed tasks associated with the medical information knowledge base, including:
[0013] Extracting disease names and information associated with corresponding disease names from clinical diagnosis and treatment guideline data, wherein the information includes associations between different disease information and corresponding disease information;
[0014] Medical terminology was extracted from clinical course data;
[0015] According to the configured seed task format, the information associated with the disease name and the medical term are processed to obtain a plurality of seed tasks.
[0016] In a possible implementation, the configured seed task format includes a first seed task format for clinical diagnosis and treatment guideline data and a second seed task format for clinical course data;
[0017] If the association relationship between two target disease information associated with a disease name is a parallel relationship, the format of the first subtask for any target disease information is: extract / return the target disease information about the disease name in the medical document to be extracted;
[0018] If the association relationship between two target disease information associated with a disease name is an inclusion relationship, the format of the first subtask is: extract / return another target disease information in a target disease information about the disease name in the medical document to be extracted;
[0019] The second subtask format is: extracting / returning information related to the medical term in the medical document to be extracted.
[0020] In a possible implementation, after inputting the task extension prompt information into a trained large language model to obtain at least one subtask extended from different seed tasks, the method further includes:
[0021] Perform text parsing on each subtask obtained;
[0022] If the parsing fails, the corresponding subtask is determined as an empty character;
[0023] If the parsing is successful, the corresponding subtask is determined as an available subtask;
[0024] The target filtering method is adopted to filter the information to be filtered and obtain a target task set, wherein the information to be filtered includes the empty character and the available subtasks.
[0025] In a possible implementation, the target filtering method includes a character filtering method and a similarity filtering method;
[0026] Use the target filtering method to filter the information to be filtered and obtain the target task set, including:
[0027] Adopting the character filtering method, filtering the information to be filtered, so as to filter out the existing empty characters, None, and / or the information to be filtered whose first character is a symbol or contains the target character, and obtaining the filtered available subtasks;
[0028] The similarity filtering method is adopted to calculate the similarity between the filtered available subtasks and each seed task, and the filtered available subtasks corresponding to the similarity greater than a preset threshold are filtered out to obtain the available subtasks after secondary filtering;
[0029] The available subtasks after the secondary filtering and the plurality of seed tasks are used to construct a target task set.
[0030] In a possible implementation, the configuration method of the task extension requirement includes:
[0031] Get multiple pre-built task expansion strategies and the number of randomly configured strategies;
[0032] Combining the multiple task expansion strategies according to the number of strategies to obtain multiple strategy combinations;
[0033] The task extension strategy involved in each strategy combination is determined as a task extension requirement.
[0034] In one possible implementation, the multiple task extension strategies include one or more of a task extension strategy that adds constraints, a task extension strategy that increases the level of content detail, a task extension strategy that replaces content concepts, a task extension strategy based on multi-step implementation, and a task extension strategy that constructs content that is different from the corresponding seed task.
[0035] In a second aspect, a device for generating instruction fine-tuning data based on medical information is provided, and the device may include:
[0036] An acquisition unit, used for acquiring a plurality of seed tasks associated with a preset medical information knowledge base;
[0037] A generating unit, configured to generate task extension prompt information for any seed task based on the configured task extension requirement and the plurality of seed tasks;
[0038] An input unit, used to input the task extension prompt information into a trained large language model to obtain at least one subtask extended from different seed tasks; the task extension prompt information is used to instruct the large language model to expand any seed task to obtain a subtask that meets the task extension requirements;
[0039] And, inputting extraction prompt information including a target task set and medical documents to be extracted into the large language model to obtain information extraction results that meet each task in the task set; the target task set is constructed based on the multiple seed tasks and the at least one subtask, and the extraction prompt information is used to instruct the large language model to extract information from the medical information knowledge base according to the tasks in the seed task set;
[0040] The generating unit is further configured to generate instruction fine-tuning data based on the tasks in the task set and corresponding information extraction results.
[0041] In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0042] Memory, used to store computer programs;
[0043] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.
[0044] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.
[0045] The method for generating instruction fine-tuning data based on medical information provided by the present application generates task extension prompt information for any seed task based on the configured task extension requirements and multiple seed tasks after obtaining multiple seed tasks associated with a preset medical information knowledge base; inputs the task extension prompt information into a trained large language model to obtain at least one subtask extended from different seed tasks; the task extension prompt information is used to instruct the large language model to expand any seed task to obtain a subtask that meets the task extension requirements; inputs the extraction prompt information containing the target task set and the medical document to be extracted into the large language model to obtain the information extraction results that meet the tasks in the task set; the target task set is constructed based on multiple seed tasks and at least one subtask, and the extraction prompt information is used to instruct the large language model to extract information from the medical information knowledge base according to the tasks in the seed task set; based on each task in the task set and the corresponding information extraction results, the instruction fine-tuning data is generated. The method can obtain instruction fine-tuning data with diversity and complexity, ensuring the diversity, complexity and specificity of medical information extraction instructions. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A flowchart of a method for generating instruction fine-tuning data based on medical information provided in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of the structure of a device for generating instruction fine-tuning data based on medical information provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application. Unless otherwise defined, the technical terms or scientific terms used in this application should be the common meanings understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "including" and other similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connected", "coupled" or "connected" and other similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0051] Instruction Fine Tuning (IFT) is a representative capability of the new language big model. It can help humans give commands to the big model in natural language and communicate with each other. This makes the interaction between people and machines more convenient. In order to perform instruction fine tuning, it is necessary to collect or build a data set. How to obtain a large amount of instruction fine tuning data with diversity, complexity and specificity is an urgent problem to be solved.
[0052] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0053] Figure 1 A flowchart of a method for generating instruction fine-tuning data based on medical information provided in an embodiment of the present application. Figure 1 As shown, the method may include:
[0054] Step S110: Acquire multiple seed tasks associated with a preset medical information knowledge base.
[0055] The medical information knowledge base may include clinical diagnosis and treatment guideline data and clinical course data; among them, clinical diagnosis and treatment guideline data covers the names of various diseases, such as hypertension, diabetes, chronic obstructive pulmonary disease (COPD) and coronary heart disease, the summary of the corresponding diseases, etiology information, clinical manifestation information and corresponding treatment plan information. Clinical course data may include but are not limited to admission records, patient-related information, first course records, daily medical records, surgical records, rescue records and discharge summaries.
[0056] In a specific implementation, the disease names and information associated with the corresponding disease names are extracted from the clinical diagnosis and treatment guideline data. The information may include different disease information (e.g., disease overview, etiology, clinical manifestations, treatment plans and treatment plan related information, etc.) and the relationship between the corresponding disease information;
[0057] Extract medical terms from clinical course data, such as basic patient information, medical history, personal history, hospitalization number, chief complaint, preliminary diagnosis, diagnostic basis, and treatment plan;
[0058] Afterwards, according to the configured seed task format, the information associated with the disease name and the medical terms are processed to obtain multiple seed tasks. The configured seed task format may include a first seed task format for clinical diagnosis and treatment guideline data and a second seed task format for clinical course data;
[0059] Specifically, if the association relationship between two target disease information associated with a certain disease name is a parallel relationship, the first seed task format for any target disease information is: extract / return the target disease information about the disease name in the medical document to be extracted; for example, extract / return specific text, information on the cause of hypertension.
[0060] If the association relationship between two target disease information associated with a disease name is an inclusion relationship, the first subtask format is: extract / return another target disease information in a target disease information about the disease name in the medical document to be extracted; for example, extract / return specific text, information about preventive drugs in preventive measures for coronary heart disease.
[0061] The second subtask format is: extract / return information related to the medical term in the medical document to be extracted. For example, extract / return specific text and information related to the hospital number.
[0062] Table 1
[0063]
[0064]
[0065] Note: Related data 1 represents the seed tasks obtained from clinical diagnosis and treatment guideline data, and related data 2 represents the seed tasks obtained from clinical course data.
[0066] Step S120: Generate task extension prompt information for any seed task based on the configured task extension requirements and multiple seed tasks.
[0067] In some embodiments, the configuration of task extension requirements may include:
[0068] Get multiple pre-built task expansion strategies and the number of randomly configured strategies;
[0069] According to the number of strategies, multiple task expansion strategies are combined to obtain multiple strategy combinations;
[0070] The task extension strategy involved in each strategy combination is determined as a task extension requirement.
[0071] Among them, task expansion strategies may include task expansion strategies that add constraints, task expansion strategies that increase the level of content detail, task expansion strategies that replace content concepts, task expansion strategies based on multi-step implementation (or "based on multi-step decomposition"), and task expansion strategies that construct content different from the corresponding seed task (or "drawing new inspiration to create completely different sub-tasks"). That is, the task expansion requirements may include one or more of the above-mentioned task expansion strategies.
[0072] In a specific implementation, any seed task and the configured task extension requirements are used to generate task extension prompt information for the seed task. For example, the task extension prompt information may be as follows:
[0073] Follow the task expansion requirements below for the following seed task, rewritten into a more complex and diverse statement:
[0074] The following task extension requirements must be followed:
[0075] 1. {Task extension strategy 1}: Add a constraint or requirement;
[0076] 2. {Task expansion strategy 2}: Increase the depth of content;
[0077] 3. Please only give one subtask, and the word count should be within 50 words;
[0078] ##Seed task: extract / return specific text, information on the causes of hypertension;
[0079] ##Please remember that the returned format is as follows: {"subtask":""}
[0080] Step S130: Input the task extension prompt information into the trained large language model to obtain at least one subtask extended from different seed tasks.
[0081] The task expansion prompt information is used to instruct the large language model to expand any seed task to obtain a subtask that meets the task expansion requirements; the large language model may include OpenAI, Tongyi Qianwen, Wenxin Yiyan, Kimi, Baichuan, etc.
[0082] In an example, subtasks expanded from different seed tasks may be as shown in Table 2.
[0083] Table 2
[0084]
[0085]
[0086] Step S140: Input the extraction prompt information including the target task set and the medical documents to be extracted into the large language model to obtain the information extraction results that meet each task in the task set.
[0087] The target task set is constructed based on multiple seed tasks and at least one subtask, and the extraction prompt information is used to instruct the large language model to extract information from the medical information knowledge base according to the tasks in the seed task set.
[0088] In some embodiments, the target task set may be a set consisting of at least one subtask and a seed task expanded in step S130.
[0089] Alternatively, the target task set can be obtained by the following steps, including:
[0090] Perform text parsing on each subtask obtained; text parsing mainly includes text parsing and removing redundant spaces.
[0091] If the parsing fails, the corresponding subtask is determined as an empty character;
[0092] If the parsing is successful, the corresponding subtask is determined as an available subtask;
[0093] The target filtering method is adopted to filter the information to be filtered and obtain the target task set. The information to be filtered may include the parsed empty characters and available subtasks.
[0094] Furthermore, the target filtering method may include a character filtering method and a similarity filtering method;
[0095] Use the target filtering method to filter the information to be filtered and obtain the target task set, including:
[0096] Adopting a character filtering method, filtering the information to be filtered, so as to filter out the existing empty characters, None, and / or the information to be filtered whose first character is a symbol or contains the target character (or "customized special character"), and obtain the filtered available subtasks;
[0097] Using similarity filtering, calculate the similarity between the filtered available subtasks and each seed task, and filter out the filtered available subtasks corresponding to the similarity greater than a preset threshold, to obtain the available subtasks after secondary filtering;
[0098] The available subtasks after secondary filtering and multiple seed tasks are used to construct the target task set.
[0099] In some embodiments, if the number of available subtasks after filtering is less than a preset number threshold, the process returns to step S130 until the number of returned executions reaches a set number threshold to expand the number of tasks in the target task set.
[0100] It should be noted that the large language model in this step may be the same as or different from the large language model in step S130. This application will not go into details here. If it is different from the large language model in step S130, the large language model in this step may be GPT-4o.
[0101] Step S150: Generate instruction fine-tuning data based on each task in the task set and corresponding information extraction results.
[0102] An instruction fine-tuning data may consist of a seed task and the corresponding information extraction result, or may consist of an available subtask and the corresponding information extraction result.
[0103] The method for generating instruction fine-tuning data based on medical information provided in this application combines clinical guidelines and medical record-related data, designs specific seed tasks, and uses a large language model for multi-dimensional expansion to obtain instruction fine-tuning data with diversity and complexity, thereby ensuring the diversity, complexity and specificity of medical information extraction instructions.
[0104] Corresponding to the above method, the embodiment of the present application also provides a device for generating instruction fine-tuning data based on medical information, such as Figure 2 As shown, the device comprises:
[0105] An acquisition unit 210, configured to acquire a plurality of seed tasks associated with a preset medical information knowledge base;
[0106] A generating unit 220, configured to generate task extension prompt information for any seed task based on the configured task extension requirement and the plurality of seed tasks;
[0107] An input unit 230 is used to input the task extension prompt information into a trained large language model to obtain at least one subtask extended from different seed tasks; the task extension prompt information is used to instruct the large language model to expand any seed task to obtain a subtask that meets the task extension requirements;
[0108] And, inputting extraction prompt information including a target task set and medical documents to be extracted into the large language model to obtain information extraction results that meet each task in the task set; the target task set is constructed based on the multiple seed tasks and the at least one subtask, and the extraction prompt information is used to instruct the large language model to extract information from the medical information knowledge base according to the tasks in the seed task set;
[0109] The generating unit 220 is further configured to generate instruction fine-tuning data based on the tasks in the task set and corresponding information extraction results.
[0110] The functions of each functional unit of the instruction fine-tuning data generating device based on medical information provided in the above-mentioned embodiments of the present application can be realized through the above-mentioned method steps. Therefore, the specific working process and beneficial effects of each unit in the instruction fine-tuning data generating device based on medical information provided in the embodiments of the present application will not be repeated here.
[0111] The present application also provides an electronic device, such as Figure 3 As shown, it includes a processor 310 , a communication interface 320 , a memory 330 and a communication bus 340 , wherein the processor 310 , the communication interface 320 , and the memory 330 communicate with each other via the communication bus 340 .
[0112] Memory 330, for storing computer programs;
[0113] The processor 310 is used to execute the program stored in the memory 330 to implement the following steps:
[0114] Acquire a plurality of seed tasks associated with a preset medical information knowledge base;
[0115] Based on the configured task extension requirements and the plurality of seed tasks, generating task extension prompt information for any seed task;
[0116] Inputting the task extension prompt information into the trained large language model to obtain at least one subtask extended from different seed tasks; the task extension prompt information is used to instruct the large language model to expand any seed task to obtain a subtask that meets the task extension requirements;
[0117] Inputting extraction prompt information including a target task set and medical documents to be extracted into the large language model to obtain information extraction results that meet each task in the task set; the target task set is constructed based on the multiple seed tasks and the at least one subtask, and the extraction prompt information is used to instruct the large language model to extract information from the medical information knowledge base according to the tasks in the seed task set;
[0118] Based on each task in the task set and corresponding information extraction results, instruction fine-tuning data is generated.
[0119] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0120] The communication interface is used for communication between the above electronic device and other devices.
[0121] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0122] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0123] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 1 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.
[0124] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the instruction fine-tuning data generation method based on medical information described in any of the above embodiments.
[0125] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the instruction fine-tuning data generation method based on medical information as described in any of the above embodiments.
[0126] Those skilled in the art will appreciate that the embodiments in the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt a complete hardware embodiment, a complete software embodiment, or a form of an embodiment combining software and hardware. Moreover, the present application may adopt a form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0127] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0128] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0130] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0131] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application fall within the scope of the claims and their equivalents in the embodiments of the present application, the embodiments of the present application are also intended to include these modifications and variations.
Claims
1. A method for generating instruction fine-tuning data based on medical information, characterized in that: The method comprises: Acquire a plurality of seed tasks associated with a preset medical information knowledge base; Based on the configured task extension requirements and the plurality of seed tasks, generating task extension prompt information for any seed task; Inputting the task extension prompt information into the trained large language model to obtain at least one subtask extended from different seed tasks; the task extension prompt information is used to instruct the large language model to extend any seed task to obtain a subtask that meets the task extension requirements; Inputting extraction prompt information including a target task set and medical documents to be extracted into the large language model to obtain information extraction results that meet each task in the task set; the target task set is constructed based on the multiple seed tasks and the at least one subtask, and the extraction prompt information is used to instruct the large language model to extract information from the medical information knowledge base according to the tasks in the seed task set; Based on each task in the task set and corresponding information extraction results, instruction fine-tuning data is generated.
2. The method according to claim 1, characterized in that The medical information knowledge base includes clinical diagnosis and treatment guideline data and clinical course data; Get multiple seed tasks associated with the medical information knowledge base, including: Extracting disease names and information associated with corresponding disease names from clinical diagnosis and treatment guideline data, wherein the information includes associations between different disease information and corresponding disease information; Medical terminology was extracted from clinical course data; According to the configured seed task format, the information associated with the disease name and the medical term are processed to obtain a plurality of seed tasks.
3. The method according to claim 2, characterized in that The configured seed task format includes a first seed task format for clinical diagnosis and treatment guideline data and a second seed task format for clinical course data; If the association relationship between two target disease information associated with a disease name is a parallel relationship, the format of the first subtask for any target disease information is: extract / return the target disease information about the disease name in the medical document to be extracted; If the association relationship between two target disease information associated with a disease name is an inclusion relationship, the format of the first subtask is: extract / return another target disease information in a target disease information about the disease name in the medical document to be extracted; The second subtask format is: extracting / returning information related to the medical term in the medical document to be extracted.
4. The method according to claim 1, characterized in that After inputting the task extension prompt information into a trained large language model to obtain at least one subtask extended from different seed tasks, the method further includes: Perform text parsing on each subtask obtained; If the parsing fails, the corresponding subtask is determined as an empty character; If the parsing is successful, the corresponding subtask is determined as an available subtask; The target filtering method is adopted to filter the information to be filtered and obtain a target task set, wherein the information to be filtered includes the empty character and the available subtasks.
5. The method according to claim 4, characterized in that The target filtering method includes a character filtering method and a similarity filtering method; Use the target filtering method to filter the information to be filtered and obtain the target task set, including: Adopting the character filtering method, filtering the information to be filtered, so as to filter out the existing empty characters, None, and / or the information to be filtered whose first character is a symbol or contains the target character, and obtaining the filtered available subtasks; The similarity filtering method is adopted to calculate the similarity between the filtered available subtasks and each seed task, and the filtered available subtasks corresponding to the similarity greater than a preset threshold are filtered out to obtain the available subtasks after secondary filtering; The available subtasks after the secondary filtering and the plurality of seed tasks are used to construct a target task set.
6. The method according to claim 1, characterized in that The configuration methods of the task extension requirements include: Get multiple pre-built task expansion strategies and the number of randomly configured strategies; Combining the multiple task expansion strategies according to the number of strategies to obtain multiple strategy combinations; The task extension strategy involved in each strategy combination is determined as a task extension requirement.
7. The method according to claim 6, characterized in that The multiple task expansion strategies include one or more of a task expansion strategy that adds constraints, a task expansion strategy that increases the level of content detail, a task expansion strategy that replaces content concepts, a task expansion strategy based on multi-step implementation, and a task expansion strategy that constructs content that is different from the corresponding seed task.
8. A device for generating instruction fine-tuning data based on medical information, characterized in that: The device comprises: An acquisition unit, used for acquiring a plurality of seed tasks associated with a preset medical information knowledge base; A generating unit, configured to generate task extension prompt information for any seed task based on the configured task extension requirement and the plurality of seed tasks; An input unit, used to input the task extension prompt information into a trained large language model to obtain at least one subtask extended from different seed tasks; the task extension prompt information is used to instruct the large language model to expand any seed task to obtain a subtask that meets the task extension requirements; And, inputting extraction prompt information including a target task set and medical documents to be extracted into the large language model to obtain information extraction results that meet each task in the task set; the target task set is constructed based on the multiple seed tasks and the at least one subtask, and the extraction prompt information is used to instruct the large language model to extract information from the medical information knowledge base according to the tasks in the seed task set; The generating unit is further configured to generate instruction fine-tuning data based on the tasks in the task set and corresponding information extraction results.
9. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
