Ophthalmology automatic inquiry system based on large language model dynamic prompt project

Through dynamic prompt engineering based on large language model, a targeted problem list is generated, which solves the problems of low efficiency and insufficient personalization of the existing ophthalmic consultation system, and realizes efficient and convenient automatic ophthalmic consultation, improving diagnostic accuracy and User experience.

CN119007992AInactive Publication Date: 2024-11-22SUZHOU UNIV

Patent Information

Application Number
CN202411495489.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing ophthalmic consultation system is inefficient, resources are wasted, and the intelligent consultation system is not targeted and personalized, resulting in inaccurate diagnosis results and ineffective improvement of user experience and service popularity.

Method used

Adopt a dynamic prompt project based on a large language model, and generate a highly targeted problem list through the main complaint classifier, dynamic prompt word generation module and question prompt word generation module to guide users to provide more symptom information, and combine the context learning of the large language model. ability to generate personalized disease classification and medical advice.

Benefits of technology

It improves the accuracy and personalization of medical advice, improves the user's medical experience and efficiency, helps doctors quickly understand the condition and provides more accurate treatment assistance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119007992A_ABST
    Figure CN119007992A_ABST
Patent Text Reader

Abstract

The invention provides an ophthalmology automatic inquiry system based on large language model dynamic prompt engineering, and relates to the technical field of medical health informatization and artificial intelligence auxiliary diagnosis, and the system comprises a chief complaint classifier which is used for carrying out the preliminary classification of chief complaints inputted by a user; the dynamic cue word generation module is used for selecting and splicing dynamic cue words from the cue word database according to the classification result of the chief complaint classifier; the question prompt word generation module is used for generating question prompt words containing identity definitions, dynamic prompt words and user complaints; and the large language model interaction module is used for generating a question list according to the generated question prompt words, sending the question list to the user, receiving answers of the user, obtaining analysis prompt words, and generating illness state classification and treatment suggestions according to the obtained analysis prompt words. According to the invention, the accuracy and personalization of the doctor-seeing suggestion are improved, the artificial participation of the doctor is reduced, and the user can conveniently consult at any time and assist the triage doctor in quickly knowing the illness state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical health informationization and artificial intelligence-assisted diagnosis technology, and in particular to an automatic ophthalmology consultation system based on a large language model dynamic prompting project. Background Art

[0002] Eyes are the core organ of human vision, and their health is crucial to an individual's quality of life. Early diagnosis and timely intervention of ophthalmic diseases are the key to maintaining vision and eye health. However, the current ophthalmic consultation process is highly dependent on manual operations, including detailed diagnosis by professional doctors and inspection by complex equipment, which not only leads to a long diagnosis cycle, but also causes a shortage and waste of medical resources.

[0003] With the development of digital medicine, online ophthalmology consultation has become an effective means to relieve the pressure of offline clinics. Although online consultation provides convenience for users, it still requires real-time participation of doctors and is limited by the speed of doctors' responses, resulting in low consultation efficiency. In addition, the cost of online consultation is relatively high due to the involvement of doctors and the commission of the platform, which limits the popularity of the service.

[0004] In order to improve consultation efficiency and reduce costs, many intelligent consultation systems based on artificial intelligence (AI) and natural language processing (NLP) technologies have emerged in the market. However, most of these systems lack deep customization and optimization for the field of ophthalmology, and the accuracy and personalization of disease consultation need to be improved. Although large language models (LLMs) such as ChatGPT have demonstrated excellent capabilities in natural language processing and human-computer interaction, and have a rich medical knowledge base, they still face challenges in handling ophthalmic consultations.

[0005] When ChatGPT receives user complaints, the information provided by the user is usually concise and limited, so it is difficult for the model to actively ask questions to obtain more detailed information about the condition. As a result, the consultation classification results given by ChatGPT often include multiple possible conditions, which is of limited help to users.

[0006] Therefore, there is an urgent need to build an efficient, convenient and cost-effective automatic ophthalmology consultation system to meet the growing demand for ophthalmology consultation. Summary of the invention

[0007] To this end, an embodiment of the present invention provides an automatic ophthalmic consultation system based on a large language model dynamic prompting project, which is used to solve the problems of low efficiency, waste of resources and lack of pertinence and personalization in the current ophthalmic consultation process.

[0008] In order to solve the above problems, an embodiment of the present invention provides an automatic ophthalmology consultation system based on a large language model dynamic prompting project, the system comprising: A chief complaint classifier, used to preliminarily classify the chief complaint input by the user; A dynamic prompt word generation module, used to select and splice dynamic prompt words from a prompt word database according to the classification result of the main complaint classifier; A question prompt word generation module, used to generate question prompt words including identity definition, dynamic prompt words and user complaints; The large language model interaction module is used to generate a question list based on the generated question prompt words, send the question list to the user and receive the user's answer, obtain analysis prompt words, and generate disease classification and medical advice based on the obtained analysis prompt words.

[0009] Preferably, the chief complaint classifier is used to perform preliminary classification on the chief complaint input by the user, specifically including: The chief complaint classifier first receives the chief complaint input by the user, and then performs character matching based on the disease description keywords contained in the chief complaint and the classification keywords in the prompt word database to obtain the category and complete the preliminary classification of the chief complaint.

[0010] Preferably, the prompt word database is constructed by arranging the real offline doctor-patient dialogue text data collected in the clinic into the prompt engineering sub-unit format.

[0011] Preferably, the prompt engineering subunit consists of four sections: the first section is prefixed with "user", and the content is the user's main complaint; the second section is prefixed with "assistant", and the content is a list of questions with an indefinite number of questions; the third section is prefixed with "user", and the content is the user's corresponding answers; the fourth section is prefixed with "assistant", and the content is the disease classification and medical advice.

[0012] Preferably, the dynamic prompt word generation module is used to select and splice dynamic prompt words from the prompt word database according to the classification result of the main complaint classifier, and specifically includes: The dynamic prompt word generation module selects N segments of prompt words from the prompt word database according to the classification results obtained by the main complaint classifier, and concatenates them to generate dynamic prompt words, where N is an integer greater than 10.

[0013] Preferably, the first part of the question prompt is prefixed with "system", which defines the identity of the large language model as an ophthalmologist and instructs it to ask targeted questions based on the chief complaint; the second part of the question prompt is a dynamic prompt generated by a dynamic prompt generation module; and the third part of the question prompt is the user's chief complaint.

[0014] Preferably, obtaining the analysis prompt word specifically includes: The analysis prompt words are obtained by integrating the user's answers to the question list with the previously generated question prompt words.

[0015] The embodiment of the present invention further provides an automatic ophthalmological diagnosis method based on a large language model dynamic prompting project, the method using the automatic ophthalmological diagnosis system based on a large language model dynamic prompting project described above, specifically comprising: The user enters the chief complaint; Perform preliminary classification of the chief complaint entered by the user; According to the classification results, dynamic prompt words are selected and spliced ​​from the prompt word database; Generate question prompts including identity definition, dynamic prompts and user complaints; A question list is generated based on the generated question prompt words, the question list is sent to the user and the user's answer is received, analysis prompt words are obtained, and disease classification and medical advice are generated based on the obtained analysis prompt words.

[0016] An embodiment of the present invention also provides an electronic device, which includes a processor, a memory and a bus system, wherein the processor and the memory are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the above-mentioned automatic ophthalmic consultation method based on the large language model dynamic prompt engineering.

[0017] An embodiment of the present invention also provides a computer storage medium, which stores a computer software product. The computer software product includes a number of instructions for enabling a computer device to execute the above-mentioned automatic ophthalmic consultation method based on the large language model dynamic prompt engineering.

[0018] It can be seen from the above technical solutions that the present invention has the following beneficial effects: (1) Improving the accuracy and personalization of medical advice: Through the dynamic prompt word generation module and the question prompt word generation module, the system can intelligently generate a list of questions based on the user's main complaint, guiding the user to provide more key symptom information and medical history. This solves the problem that traditional online consultations require manual participation from doctors and that large language models cannot actively ask questions, resulting in inaccurate and insufficiently personalized medical advice.

[0019] (2) Improve user medical experience and efficiency: Users can consult their medical conditions through the system anytime and anywhere, understand their own conditions, and then choose the triage department for on-site medical treatment in a targeted manner. This not only facilitates users, but also improves medical efficiency.

[0020] (3) Assist triage doctors to quickly understand the patient's condition: The system's medical records can help triage doctors understand the user's condition more quickly, provide strong reference for doctors, and thus provide more accurate and effective assistance in the treatment of the user's eye disease. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the implementation cases of the present invention or the technical solutions in the prior art, the following is a brief description of the drawings required for use in the embodiments. By referring to the drawings, the features and advantages of the present invention will be more clearly understood. The drawings are schematic and should not be understood as limiting the present invention in any way. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them: Figure 1 A block diagram of an automatic ophthalmology consultation system based on a large language model dynamic prompting project provided in an embodiment; Figure 2 It is a schematic diagram of the structure of the engineering subunit in the embodiment; Figure 3 It is a main flow chart of the medical consultation system proposed by the present invention in the embodiment; Figure 4 The present invention is a flowchart of an automatic ophthalmological consultation method based on a large language model dynamic prompting project provided in an embodiment. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Embodiment 1

[0023] In order to solve the problems of low efficiency, waste of resources and lack of pertinence and personalization in the current ophthalmology consultation process. Figure 1 As shown, the embodiment of the present invention proposes an automatic ophthalmology consultation system based on a large language model dynamic prompting project, the system comprising: A chief complaint classifier, used to preliminarily classify the chief complaint input by the user; A dynamic prompt word generation module, used to select and splice dynamic prompt words from a prompt word database according to the classification result of the main complaint classifier; A question prompt word generation module, used to generate question prompt words including identity definition, dynamic prompt words and user complaints; The large language model interaction module is used to generate a question list based on the generated question prompt words, send the question list to the user and receive the user's answer, obtain analysis prompt words, and generate disease classification and medical advice based on the obtained analysis prompt words.

[0024] In addition, the system also includes a user interaction interface for receiving the chief complaint input by the user, displaying a generated question list, receiving user answers, and displaying disease classification and medical advice.

[0025] It can be seen from the above technical solution that the present invention provides an automatic ophthalmic consultation system based on a large language model dynamic prompt engineering, which preliminarily screens the user input through the main complaint classifier, and then dynamically generates question prompts to guide the large language model to ask accurate questions, effectively making up for the lack of manual participation of doctors in traditional online consultations. At the same time, the system can intelligently generate a list of questions for the user's main complaint, collect user answers, and further generate disease classification and personalized medical advice, solving the problem that the medical advice is inaccurate and not personalized due to the inability of the large language model to actively ask questions. In addition, the system uses the contextual learning ability of the large language model to realize innovative dynamic prompt engineering technology, which can intelligently ask symptom information and medical history for the main complaint raised by the user, so as to more comprehensively understand the user's situation and provide more accurate and personalized diagnosis and treatment suggestions. This technology not only improves the efficiency of consultation, but also greatly improves the user's medical experience, enabling them to consult their condition anytime and anywhere, and select triage departments for on-site medical treatment in a targeted manner.

[0026] In the large language model, the entire text content of each conversation is stored in the prompt word, and participates in the model's reasoning process as context corpus, which in turn affects the subsequent output of the large language model. The text in the prompt word is divided into different identity categories based on different prefixes. Taking ChatGPT as an example, the text in its prompt word can be specifically divided into the following three categories: one is "system", which is located in the first line of the prompt word and is used to clearly specify the role or identity that ChatGPT needs to play; the second is "user", and the content of the suffix of this type of text represents the information sent by the user to ChatGPT; the third is "assistant", and the content of the suffix of this type of text is the information sent by ChatGPT to the client user after reasoning. Users can freely edit the prompt word before entering information. This feature makes it possible to guide the large language model to achieve specific functions through dynamic prompt engineering.

[0027] In order to realize an intelligent ophthalmic consultation system for user complaints, the present invention adopts an innovative dynamic prompt engineering technology. Prompt engineering is a method based on natural language processing and machine learning, which can fine-tune large language models for specific fields to improve their applicability in downstream tasks in the field. The core of the dynamic prompt engineering designed by the present invention is to effectively guide users to provide more informative answers by designing reasonable question prompts, thereby optimizing dialogue interactions and generating more accurate consultation results.

[0028] like Figure 2 As shown, the prompt engineering subunit proposed in the present invention consists of four sections: the first section is prefixed with "user", and the content is the user's main complaint; the second section is prefixed with "assistant", and the content is a list of questions, the number of questions is not fixed, usually 3-5; the third section is prefixed with "user", and the content is the user's corresponding answer; the fourth section is prefixed with "assistant", and the content is the disease classification and treatment advice. Based on 90 real offline medical consultation and doctor-patient dialogue text data collected clinically, the present invention organizes all these dialogue data into the format of prompt engineering subunits, thereby constructing a prompt word database, and designs an innovative dynamic prompt engineering structure and human-computer interaction steps (such as Figure 3 As shown in the figure), the function of intelligent ophthalmology consultation is realized. The specific structure and process are described as follows: In this embodiment, the chief complaint classifier is used to perform preliminary classification of the chief complaint input by the user, specifically including: The chief complaint classifier first receives the chief complaint input by the user, and then performs character matching based on the disease description keywords contained in the chief complaint and the classification keywords in the prompt word database to obtain the category and complete the preliminary classification of the chief complaint.

[0029] Specifically, the complaints were divided into ten categories according to the different disease description keywords contained in the chief complaint.

[0030] In this embodiment, the dynamic prompt word generation module is used to select and splice dynamic prompt words from the prompt word database according to the classification result of the main complaint classifier.

[0031] Specifically, the dynamic prompt word generation module selects N segments of prompt words from the prompt word database according to the classification results obtained by the main complaint classifier, and splices them to generate dynamic prompt words, where N is an integer greater than 10 (when N is an integer greater than 10, it can stably guide the generation format of the large language model). The main complaint in the dynamic prompt word should be highly similar to the main complaint input by the user, so the questions raised in the dynamic prompt word and the finally generated disease classification and treatment suggestions are also similar to the user's situation. Therefore, through the context learning ability of the large language model, the dynamic prompt word can provide targeted and personalized help to the user in the subsequent steps, and can guide the large language model to generate content with the same format as the prompt word, which is convenient for subsequent system analysis.

[0032] It should be noted here that the large language model of the present invention adopts ChatGPT, and a similar large language model can also be used, which has language understanding, generation and reasoning capabilities.

[0033] In this embodiment, the question prompt word generation module is used to generate question prompt words including identity definition, dynamic prompt words and user complaints.

[0034] Specifically, the first part of the question prompt is prefixed with "system", which defines the identity of the large language model as an ophthalmologist and instructs it to ask targeted questions based on the main complaint (the present invention defines ChatGPT as an AI chat software here - "You are an ophthalmologist, you need to ask targeted questions based on the main complaint I provide, and I will answer the questions, and you need to give medical advice for my possible diseases based on these answers."). The second part of the question prompt is the dynamic prompt generated by the dynamic prompt generation module. The third part of the question prompt is the user's main complaint. These three parts are spliced ​​together in succession to form a question prompt, and the generated question prompt is sent to the large language model interaction module.

[0035] In this embodiment, the large language model interaction module is used to generate a question list based on the generated question prompt words, send the question list to the user and receive the user's answer, obtain analysis prompt words, and generate disease classification and medical advice based on the obtained analysis prompt words.

[0036] Specifically, the large language model interaction module generates a question list based on the generated question prompt words, and the format of the question list is consistent with the format of the constructed prompt engineering sub-unit. The system will break down the questions one by one according to this format and send them to the user. After the user has answered all the questions, the system will integrate the user's answers again according to the format of the prompt engineering sub-unit. Subsequently, the system integrates the previously generated question prompt words and the user's answers to the question list to form analysis prompt words. The generated analysis prompt words are input into ChatGPT, and ChatGPT will generate personalized disease classification and medical advice based on this.

[0037] The technical solutions and advantages of the present invention are further described in detail below in conjunction with specific experimental cases.

[0038] (1) Dataset: The 90 medical consultation text data sets used in the present invention are all from the Affiliated Hospital of Eye, Ear, Nose and Throat of Fudan University. The 90 text data sets can be divided into eye tumors, optometry, trauma, eye fatigue, red eyes, itchy eyes, eye pain, dry eyes and other conditions. The present invention is divided into ten categories according to the different classification trigger words. Due to the imbalance of samples, a small number of prompt words will cause AI to be unable to generate stably. Therefore, for classes with fewer samples, data on red eyes will be used for data filling to ensure that each category has more than ten examples.

[0039] (2) Experimental setup: The experiment selected 1,277 users with eye discomfort to test the use of the system. It tested whether the system would generate questions based on the main complaints, and generate disease classification and medical treatment recommendations after the users answered the questions, and then counted the accuracy rate.

[0040] (3) Experimental results: Table 1 below shows the accuracy of the system's disease classification and department triage for the 1,277 users in the experiment. The experiment shows that the accuracy of this model in disease classification is 83.2%, and the accuracy of triage classification is 86.8%.

[0041] Table 1 Statistics on the accuracy of the system in classifying user conditions and triage classification in the experiment

[0042] The following scenarios 1 to 4 illustrate the specific situations in which the system of the present invention guides ChatGPT to generate medical inquiries and medical treatment recommendations.

[0043] Scenario 1 (chat record of disease interaction directly with ChatGPT without using the system proposed by the present invention): User: My right eye is red and swollen, and the corner of my eye is red. It is very painful when I turn my eyelids up. What is most likely causing this? ChatGPT: The right eye is red and swollen, the corner of the eye is red, and it is very painful to turn up the eyelid. These symptoms may be caused by a variety of reasons. The following are some of the common causes and treatments: 1. Oculopalmitis: Oculopalmitis refers to a disease caused by inflammation of the eyelid edge or facial glands. Symptoms include redness, swelling, pain, and red or yellow discharge in the corner of the eye. 2. Conjunctivitis: Conjunctivitis refers to a disease caused by inflammation of the conjunctiva. Symptoms include redness, swelling, pain, and red or yellow discharge in the corner of the eye. 3. Keratitis: Keratitis refers to a disease caused by inflammation of the cornea. Symptoms include redness, swelling, pain, and red or yellow discharge in the corner of the eye.

[0044] User: How can I treat it? ChatGPT: 1. Eyelid inflammation: Treatment includes using warm water compresses, cleaning the eyes, using antibiotic eye drops, etc. 2. Conjunctivitis: Treatment includes using antibiotic eye drops, avoiding contact with allergens. 3. Keratitis: Treatment includes using antibiotic eye drops, avoiding contact with allergens, etc.

[0045] User: Which ophthalmology department should I go to for treatment? ChatGPT: Based on the symptoms you describe, you may need to see an ocular surface specialist or an ophthalmology clinic. Ocular surface specialists usually focus on the treatment of the cornea and conjunctiva, while ophthalmology clinics more broadly cover all parts of the eye, including the ocular surface, sclera, optic nerve, lens, vitreous body, and eyelids.

[0046] It can be seen from scenario 1 that when the automatic ophthalmology consultation system based on the large language model dynamic prompt engineering proposed by the present invention is not used, the chat records directly consulted with ChatGPT will obtain AI results that are very broad, not personalized, and will not actively ask questions to help users understand their condition more deeply.

[0047] Scenario 2 (Case 1 of chat records using the system proposed in the present invention to interact with ChatGPT): User: My eyes feel blurry, swollen and painful, and occasionally a little stinging.

[0048] ChatGPT: How long have you been seeing things blurry? How blurry is it? User: After one month, the words are still unclear.

[0049] ChatGPT: Any headaches? User: Yes, I’ve had a headache for half a month.

[0050] ChatGPT: Are you nearsighted? Do you wear glasses or contact lenses? User: No.

[0051] ChatGPT: Is there redness, discharge, or foreign body sensation in the eye? User: Redness, discharge, and a foreign body sensation.

[0052] ChatGPT: Based on the information you provided, your symptoms may be related to ocular surface inflammation. Ocular surface inflammation may be caused by bacterial infection, allergies or dryness, resulting in symptoms such as redness, discharge, foreign body sensation and blurred vision. It is recommended to see a cornea specialist immediately for proper diagnosis and treatment.

[0053] Scenario 3 (Case 2 of chat records using the system proposed in the present invention to interact with ChatGPT): User: The vision in my left eye has been declining for three days, and I have had a foreign body sensation and fog for one month.

[0054] ChatGPT: Any pain or stinging in your left eye? User: No pain.

[0055] ChatGPT: Are there any redness, swelling, or tearing in your eyes? User: No redness or tearing.

[0056] ChatGPT: Did the vision loss occur suddenly or gradually? User: It dropped suddenly.

[0057] ChatGPT: Have you been exposed to dust, chemicals, or other substances that may cause irritation? User: No.

[0058] ChatGPT: Based on the information you provided, your diagnosis may be acute retinal injury, and it is recommended that you visit a retinal specialist or emergency ophthalmologist immediately. Acute retinal injury may cause decreased vision and blurred vision, and requires prompt treatment to prevent further damage. Please see a doctor as soon as possible for further examination and treatment.

[0059] Scenario 2 and Scenario 3 show that the system proposed in the present invention successfully generates chat records of questions and medical advice. ChatGPT can proactively ask users questions related to the chief complaint, and integrate all consultation chat records to obtain the final medical advice, thus realizing personalized AI intelligent consultation.

[0060] Scenario 4 (Case 3 of chat records using the system proposed in the present invention to interact with ChatGPT): User: My hyperopia is 850 degrees and my vision is 0.4 when I wear glasses. What should I do?

[0061] ChatGPT: Based on the information you provided, your diagnosis may be high hyperopia, and it is recommended to see a refractive specialist. Your vision is still not ideal after wearing glasses, and you may need further vision examination and glasses adjustment. When the refractive power is high, the lens processing accuracy and frame selection are very important. You can consult a professional refractor or ophthalmologist to adjust the appropriate lenses and frames to achieve better vision correction.

[0062] Scenario 4 shows the direct generation of chat records for medical consultations in the experiment. It was found that when the main complaint raised by the user is sufficient for ChatGPT to make medical recommendations, the system will not generate questions, but will skip the medical consultation process and directly provide personalized medical recommendations to the user. Embodiment 2

[0063] like Figure 4 As shown, the present invention provides an automatic ophthalmological consultation method based on a large language model dynamic prompting project. The method uses the automatic ophthalmological consultation system based on a large language model dynamic prompting project of the above-mentioned embodiment 1, and specifically includes: The user enters the chief complaint; Perform preliminary classification of the chief complaint entered by the user; According to the classification results, dynamic prompt words are selected and spliced ​​from the prompt word database; Generate question prompts including identity definition, dynamic prompts and user complaints; A question list is generated based on the generated question prompt words, the question list is sent to the user and the user's answer is received, analysis prompt words are obtained, and disease classification and medical advice are generated based on the obtained analysis prompt words.

[0064] The present embodiment is an automatic ophthalmic consultation method based on a large language model dynamic prompting project, which uses the aforementioned automatic ophthalmic consultation system based on a large language model dynamic prompting project. Therefore, the specific implementation method of the automatic ophthalmic consultation method based on a large language model dynamic prompting project can be seen in the embodiment section of the automatic ophthalmic consultation system based on a large language model dynamic prompting project in the preceding text. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part. In order to avoid redundancy, it will not be repeated here. Embodiment 3

[0065] An embodiment of the present invention provides an electronic device, which includes a processor, a memory and a bus system. The processor and the memory are connected through the bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to realize the above-mentioned automatic ophthalmic consultation method based on the large language model dynamic prompt engineering. Embodiment 4

[0066] An embodiment of the present invention provides a computer storage medium storing a computer software product. The computer software product includes a number of instructions for enabling a computer device to execute the above-mentioned automatic ophthalmic consultation method based on a large language model dynamic prompting project.

[0067] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the 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 codes.

[0068] The present application is 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 and / or block diagram. 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.

[0069] 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 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in 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.

[0070] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from them are still within the protection scope of the invention.

Claims

1. An automatic ophthalmology consultation system based on a large language model dynamic prompting project, characterized in that: include: A chief complaint classifier, used to preliminarily classify the chief complaint input by the user; A dynamic prompt word generation module, used to select and splice dynamic prompt words from a prompt word database according to the classification result of the main complaint classifier; A question prompt word generation module, used to generate question prompt words including identity definition, dynamic prompt words and user complaints; The large language model interaction module is used to generate a question list based on the generated question prompt words, send the question list to the user and receive the user's answer, obtain analysis prompt words, and generate disease classification and medical advice based on the obtained analysis prompt words.

2. The automatic ophthalmology consultation system based on large language model dynamic prompt engineering according to claim 1 is characterized in that: The chief complaint classifier is used to perform preliminary classification of the chief complaint input by the user, specifically including: The chief complaint classifier first receives the chief complaint input by the user, and then performs character matching based on the disease description keywords contained in the chief complaint and the classification keywords in the prompt word database to obtain the category and complete the preliminary classification of the chief complaint.

3. The automatic ophthalmology consultation system based on large language model dynamic prompt engineering according to claim 1 is characterized in that: The prompt word database is constructed by arranging the real offline doctor-patient dialogue text data collected in the clinic into the prompt engineering sub-unit format.

4. The automatic ophthalmology consultation system based on large language model dynamic prompt engineering according to claim 3 is characterized in that: The prompt engineering subunit consists of four sections: the first section is prefixed with "user" and contains the user's main complaint; the second section is prefixed with "assistant" and contains a list of questions with an indefinite number of questions; the third section is prefixed with "user" and contains the user's corresponding answers; the fourth section is prefixed with "assistant" and contains the disease classification and medical advice.

5. The automatic ophthalmology consultation system based on large language model dynamic prompt engineering according to claim 1 is characterized in that: The dynamic prompt word generation module is used to select and splice dynamic prompt words from the prompt word database according to the classification result of the main complaint classifier, and specifically includes: The dynamic prompt word generation module selects N segments of prompt words from the prompt word database according to the classification results obtained by the main complaint classifier, and concatenates them to generate dynamic prompt words, where N is an integer greater than 10.

6. The automatic ophthalmology consultation system based on large language model dynamic prompt engineering according to claim 1 is characterized in that: The first part of the question prompt word is prefixed with "system", which defines the identity of the large language model as an ophthalmologist and instructs it to ask targeted questions based on the main complaint; the second part of the question prompt word is the dynamic prompt word generated by the dynamic prompt word generation module; the third part of the question prompt word is the user's main complaint.

7. The automatic ophthalmology consultation system based on large language model dynamic prompt engineering according to claim 1 is characterized in that: The obtaining of the analysis prompt words specifically includes: The analysis prompt words are obtained by integrating the user's answers to the question list with the previously generated question prompt words.

8. An automatic ophthalmology consultation method based on a large language model dynamic prompting project, characterized in that: The method uses the automatic ophthalmology consultation system based on the large language model dynamic prompt engineering according to any one of claims 1 to 7, and specifically comprises: The user enters the chief complaint; Perform preliminary classification of the chief complaint entered by the user; According to the classification results, dynamic prompt words are selected and spliced ​​from the prompt word database; Generate question prompts including identity definition, dynamic prompts and user complaints; A question list is generated based on the generated question prompt words, the question list is sent to the user and the user's answer is received, analysis prompt words are obtained, and disease classification and medical advice are generated based on the obtained analysis prompt words.

9. An electronic device, characterized in that: The electronic device includes a processor, a memory and a bus system, the processor and the memory are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the automatic ophthalmic consultation method based on the large language model dynamic prompt engineering as described in claim 8.

10. A computer storage medium, characterized in that: The computer storage medium stores a computer software product, which includes a number of instructions for enabling a computer device to execute the automatic ophthalmic consultation method based on a large language model dynamic prompting project as described in claim 8.

Citation Information

Patent Citations

  • Active AI medical question-answering system, method and device and storage medium

    CN115982335A

  • Patient demand analysis method and system based on online inquiry man-machine interaction

    CN116469547A

  • Intelligent customer service question answering method and system based on large language model

    CN117648420A

  • Interrogation information processing method and related product

    CN118098642A

  • Prompt word updating method, device and system based on multi-dimensional large language model

    CN118132716A

Cited By

  • Electric power system master equipment defect diagnosis method and system based on large language model

    CN119622482A

  • Medical service system and method based on humanoid robot

    CN120748656A