Device and method for providing medical chat service based on generative artificial intelligence
A generative AI-based medical chat service addresses patient interpretation challenges by offering personalized and compliant responses to medical records, leveraging prompt engineering and persona customization for enhanced understanding.
Patent Information
- Application Number
- US19/482733
- Authority / Receiving Office
- US · United States
- Patent Type
- Applications(United States)
- Current Assignee / Owner
- Priority Date
- 2024-04-11
- Filing Date
- 2024-04-12
- Publication Date
- 2026-11-26
AI Technical Summary
Patients face difficulties in interpreting complex medical records due to low health literacy and the limitations of existing natural language processing algorithms, especially in understanding medical terminology and abbreviations, exacerbated by short outpatient consultation times.
A medical chat service utilizing generative artificial intelligence to provide chat-format responses to user questions about medical records, incorporating prompt engineering and persona customization, with training on evaluation indicators to ensure accurate and personalized answers.
Provides immediate, consistent, and customized responses to user questions about medical records, enhancing understanding and interpretation through generative AI, while ensuring compliance with personal information protection regulations.
Smart Images

Figure US20260378623A1-D00000_ABST
Abstract
Description
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to Korean Provisional Patent Application No. 10-2023-0061952, filed on May 12, 2023, and Korean Patent Application No. 10-2024-0048955, filed on Apr. 11, 2024, the disclosures of which are incorporated herein by reference.DESCRIPTION OF THE NATIONAL RESEARCH AND DEVELOPMENT PROJECT THAT SUPPORTED THIS INVENTION
[0002] This research was supported by [Project Unique Number: 1711181132, Project Number: 2021R1F1A1060787, Ministry: Ministry of Science and ICT, Project Management (Specialized) Institution: National Research Foundation of Korea, Research Program: Individual Basic Research (Ministry of Science and ICT), Research Project Title: Development and Practical Verification of Dementia Rapid Prediction Platform Using Healthcare Big Data, Project Implementation Institution: Medical AI Center of Seoul National University Bundang Hospital, Research Period: Jun. 1, 2021 to Feb. 29, 2024].
[0003] This research was supported by [Project Unique Number: 1711160533, Project Number: 2022-0-00184-001, Ministry: Ministry of Science and ICT, Project Management (Specialized) Institution: National Research Foundation of Korea, Research Program: Human-Centered AI Core Source Technology Development, Research Project Title: Development of Flexibly Evolving Artificial Intelligence Technology Research in Line with Gradually Strengthening Ethical Policies, Project Implementation Institution: Korea Advanced Institute of Science and Technology, Research Period: Apr. 1, 2022 to Dec. 31, 2026].TECHNICAL FIELD
[0004] The disclosed embodiments relate to a device and a method for providing a medical chat service based on generative artificial intelligence. Specifically, the disclosed embodiments relate to a technology that uses generative artificial intelligence to provide chat-format responses to users' questions about medical records.BACKGROUND ART
[0005] The “wellness-care” industry, which combines the healthcare sector with the artificial intelligence industry, is emerging, and several medical artificial intelligence (AI) solutions have been developed. However, utilization of such technology has been limited due to regulations such as the Personal Information Protection Act. Furthermore, with the advent of ChatGPT, the era of large-scale AI has arrived. Fine-tuning large-scale generative AI that understands human language with datasets based on precise specialized knowledge is expected to show higher performance than natural language processing algorithms that learn only specific domain knowledge.
[0006] Recently, patients' low health literacy has become an issue. The Korea Institute for Health and Social Affairs' Health and Welfare Forum report “Health Literacy Status and Policy Implications from the Korea Health Panel” indicates that 3 out of 10 people lack health literacy. Health literacy tends to be lower particularly among the elderly and those in vulnerable socioeconomic positions. In university hospitals, outpatient consultation time is very short at about 3 minutes, making it difficult for patients to receive detailed explanations from doctors.
[0007] Medical records include all records created when a patient visits a hospital for outpatient care, hospitalization, and the like, such as surgical records, initial examination records, follow-up examination records, admission and discharge records, imaging examination reports, and the like. They are mainly issued for submission as supporting documents to insurance companies or for use when transferring to other hospitals. They can be issued at the patient's direct request and without the need for a doctor's approval. Recently, several hospitals have been issuing copies of medical records online, and the number of such issuances is gradually increasing. Additionally, some hospitals have launched services for issuing copies of medical records via mobile devices.
[0008] Patients seek to interpret medical records to understand their own health status, but most medical records contain a mixture of English and Korean text with numerous medical terms that are difficult to understand. Moreover, even when searching on the Internet, medical abbreviations are not easy to look up, making interpretation of medical records often impossible. Existing natural language processing algorithms are often incapable of interpreting medical records and perform poorly.DETAILED DESCRIPTION OF THE INVENTIONTechnical Solution
[0009] The disclosed embodiments are directed to providing answers to user questions about medical records in a chat format using generative artificial intelligence.Summary of the Invention
[0010] A method for providing a medical chat service based on generative artificial intelligence according to one embodiment is performed by a device comprising one or more processors and a memory in which one or more programs executed by the one or more processors are stored, the method including: generating a prompt on the basis of a user input and a command; and inputting the prompt into a generative artificial intelligence model to output a corresponding response.
[0011] The user input may include at least one of text input and image input related to medical records including at least one of surgical records, examination results, hospitalization records, discharge records, initial examination records, follow-up examination records, nursing records, and prescriptions for persons or animals.
[0012] The command includes a first command, the prompt includes a first prompt, and the generating of the prompt includes generating the first prompt on the basis of the user input and the first command. The first command may be configured to request the generative artificial intelligence model to respond to medical records contained in the user input with a medical professional attitude, excluding personal information contained in the user input, wherein the personal information includes at least one of a patient name, a patient number, date of birth, a hospital name, a hospital address, an attending physician, and an attending physician's phone number.
[0013] The command includes a second command, the prompt includes a second prompt, and the generating of the prompt includes generating the second prompt on the basis of the user input and the second command. The second command may be configured to assign a defined role and characteristic for each persona, wherein the role includes a doctor, a veterinarian, a nurse, a parent, a child, or a friend, and the characteristic corresponding to the role includes a professional attitude, a gentle attitude, a sincere attitude, or a friendly attitude.
[0014] The command includes a third command, the prompt includes a third prompt, and the generating of the prompt includes generating a new user input by including, in the user input, previous chat history exchanged between the user and the generative artificial intelligence model, and generating the third prompt on the basis of the new user input and the third command. The third command may be configured to generate questions useful to the patient while maintaining the context of the previous chat history.
[0015] The command includes a fourth command, the prompt includes a fourth prompt, and the generating of the prompt comprises identifying whether the user input is a question and, when the user input is a question, generating the fourth prompt on the basis of the user input and the fourth command, wherein the fourth command may be configured to request the generative artificial intelligence model to output a response of a predefined length to the question.
[0016] The fourth command may be configured to request the generative artificial intelligence model to generate a response that excludes a specific type of response from the generated response, and the specific type of response may include a response that suggests a medical act or an equivalent act and / or a response containing duplicated content.
[0017] The method may include detecting personal information in the user input, and outputting a message and / or a warning signal instructing the user to exclude the personal information from the user input when the personal information is detected.
[0018] The generating of the second prompt may include displaying, on the display of the device, a menu for selecting an option of the persona, and upon receiving a selection for the option of the persona, generating the second prompt on the basis of the selected persona and the user input other than the selection for the option.
[0019] The generative artificial intelligence model may be trained by learning data labeled with evaluation indicators, and the learning data may be constructed by labeling the evaluation indicators for at least one of preference, accuracy, and controversiality recorded by medical professionals regarding prediction values output by the generative artificial intelligence model for input data containing medical records.
[0020] The outputting of the response may include outputting a supplementary response corresponding to the prompt using a retrieval-augmented generation (RAG) technique from a vector database in which medical information is constructed as a corpus, and providing a final response based on the response output using the generative artificial intelligence model and the supplementary response output using the RAG technique.
[0021] A device for providing a medical chat service based on generative artificial intelligence according to one embodiment comprises one or more processors, and a memory in which one or more programs executed by the one or more processors are stored, wherein the one or more processors generate a prompt on the basis of a user input and a command, and input the prompt into a generative artificial intelligence model to output a corresponding response.Advantageous Effects of the Invention
[0022] The disclosed embodiments may provide immediate responses to users' questions about their medical records by utilizing generative artificial intelligence.
[0023] The disclosed embodiments may provide consistent responses by more clearly transforming questions about users' medical records through prompt engineering.
[0024] The disclosed embodiments may provide customized responses by applying a user-specified persona to answers through prompt engineering.BRIEF DESCRIPTION OF THE DRAWINGS
[0025] FIG. 1 is a diagram of a system for providing a medical chat service based on generative artificial intelligence according to one embodiment.
[0026] FIG. 2 is a block diagram of a device for providing a medical chat service based on generative artificial intelligence according to one embodiment.
[0027] FIG. 3 is a diagram illustrating an example where a device for providing a medical chat service based on generative artificial intelligence provides a screen for a user input, according to one embodiment.
[0028] FIG. 4 is a diagram illustrating an example where a device for providing a medical chat service based on generative artificial intelligence provides a warning signal in response to a user input, according to one embodiment.
[0029] FIG. 5 is a diagram illustrating an example where a device for providing a medical chat service based on generative artificial intelligence applies a persona to provide responses, according to one embodiment.
[0030] FIG. 6 is a diagram illustrating an example where a device for providing a medical chat service based on generative artificial intelligence suggests recommended questions for a user question, according to one embodiment.
[0031] FIG. 7 is a diagram illustrating an example where a device for providing a medical chat service based on generative artificial intelligence sends chat records to an external device according to one embodiment.
[0032] FIG. 8 is a diagram illustrating an example where a device for providing a medical chat service based on generative artificial intelligence explains comparison results with a previous input, according to one embodiment.
[0033] FIG. 9 is a flowchart of a method for providing a medical chat service based on generative artificial intelligence according to one embodiment.DETAILED DESCRIPTION OF THE INVENTION
[0034] Hereinafter, specific embodiments will be described with reference to the drawings. The following detailed description is provided to assist in a comprehensive understanding of the invention described herein. However, this is merely an example and the present invention is not limited thereto.
[0035] In describing the embodiments, detailed descriptions of known techniques related to the present invention will be omitted when it is determined that such descriptions may unnecessarily obscure the gist of the embodiments. Furthermore, numbers used for describing the embodiments (e.g., first, second, etc.) are merely identifiers for distinguishing one component from another component.
[0036] The terms described below are defined in consideration of the functions in the present invention, and may vary depending on the intention or practice of users, operators, and the like. Therefore, the definitions should be made based on the content throughout this specification. The terms used in the detailed description are only for describing the embodiments and should not be limiting in any way. Unless clearly used otherwise, singular expressions include plural meanings. In this description, expressions such as “include” or “have” are intended to designate certain components, numbers, steps, operations, elements, parts thereof, or combinations thereof, and should not be construed to exclude the existence or possibility of one or more other components, numbers, steps, operations, elements, parts thereof, or combinations thereof.
[0037] In addition, the embodiments described herein may be entirely hardware, partly hardware and partly software, or entirely software. As used herein, “unit,”“device,”“module,”“device,”“server,” or “system” refers to a computer-related entity such as hardware, a combination of hardware and software, or software. For example, the unit, the device, the module, the device, the server, or the system may refer to hardware that constitutes part or all of a platform and / or software such as an application for operating the hardware. As a specific example, the unit, the device, the module, the device, the server, or the system may be implemented by a processor.Definition of Terms
[0038] In this specification, a user input may refer to information and / or requests provided by a user to interact with a generative artificial intelligence model. That is, the user input may refer to an initial input provided by a user to a generative artificial intelligence model prior to prompt generation.
[0039] In this specification, a command may refer to an additional instruction integrated into a prompt to guide a response of the generative artificial intelligence model in a desired direction. That is, the command may refer to an additional instruction included in a prompt to enable the generative artificial intelligence model to output desired information in a desired direction or in an optimized manner based on the user input.Description of Exemplary Embodiments of the Present Invention
[0040] FIG. 1 is a diagram of a system 10 for providing a medical chat service based on generative artificial intelligence according to one embodiment.
[0041] Referring to FIG. 1, the system 10 for providing a medical chat service based on generative artificial intelligence according to one embodiment may include a server 100 and a device 200.
[0042] The server 100 may represent a server computer (server 100) that provides a chat service to a device 200 over a communication network using a generative artificial intelligence model and manages the overall chat service.
[0043] The server 100 may receive a prompt containing input data and a command from the device 200. In this case, the input data may include at least one of text and images related to medical records. The server 100 may provide an explanation to the device 200 in response to an analysis request for the input data using the generative artificial intelligence model. In this case, the server 100 may provide the explanation in a chat format.
[0044] The device 200 may request the server 100 to process a prompt that appends the command to input data to aid understanding in the interaction between the server 100 and the user. In this case, the device 200 may include, in the prompt, a command which requests conciseness in the explanation corresponding to the user input to facilitate user understanding. As another example, the device 200 may include, in the prompt, a command which requests application of a persona to assign a role to be performed by the generative artificial intelligence model in the chat.
[0045] In this case, the device 200 may be implemented as various electronic devices such as mobile phones, tablet PCs, digital cameras, camcorders, laptop computers, desktops, e-book readers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, MP3 players, wearable devices, and the like.
[0046] Hereinafter, FIG. 2 describes a method of generating a prompt that enables the device 200 to facilitate more effective interaction between the generative artificial intelligence model and the user input.
[0047] FIG. 2 is a block diagram of a device 200 for providing a medical chat service based on generative artificial intelligence according to one embodiment.
[0048] Referring to FIG. 2, the device 200 includes a processor 210 and a memory 220.
[0049] The processor 210 generates a prompt on the basis of a user input and a command.
[0050] Specifically, the user input may include first input data which is analysis target data related to medical records and second input data which is analysis request data for the analysis target data.
[0051] For example, the first input data may include images generated by photographing printed medical records diagnosed by a medical professional. In another example, the first input data may include text transcribed or typed by a patient based on the issued medical records.
[0052] The second input data may include a user query which requests the generative artificial intelligence model to perform medical analysis of the first input data, wherein the second input data may exclude any items that can be interpreted as medical acts among the requests for medical analysis.
[0053] For example, the second input data may include a request for explanation of the first input data and / or a query regarding possible progress in the current health condition and / or guidance for preventing and managing existing diseases based on the first input data.
[0054] The medical records may include at least one of surgical records, examination results, admission records, discharge records, initial examination records, follow-up examination records, nursing records, and prescriptions for persons or animals.
[0055] The command may include an additional instruction requested of the generative artificial intelligence model to facilitate effective communication between the user and the generative artificial intelligence model. As a specific example, the command may include supplementary information for the user input to enable processing of the user's potential request.
[0056] That is, the processor 210 may generate a prompt to be input to the generative artificial intelligence model by appending the command to the user input.
[0057] For example, the processor 210 may generate a prompt to be input to the generative artificial intelligence model based on the user input and a first command.
[0058] The first command may be configured to request the generative artificial intelligence model to provide a medically professional response related to medical records while excluding personal information contained in the user input.
[0059] As a specific example, the first command may include a command, such as “Provide all responses without a hospital name, an address, a doctor name, and a phone number. Provide an answer to the question.”
[0060] The personal information may include at least one of a patient name, a patient number, a date of birth, a hospital name, a hospital address, an attending physician, and an attending physician's phone number, but this is an example and is not limited to those described above.
[0061] That is, the processor 210 may generate a prompt by supplementing items that are not shown in the user input but could have been potentially requested by the user (e.g., a request for personal information protection, a request for compliance with personal information processing regulations, and a request for focus on key content).
[0062] As another example, the processor 210 may generate a prompt to be input to the generative artificial intelligence model based on the user input and a second command.
[0063] The second command may be configured to request the generative artificial intelligence model to respond based on a role and a characteristic defined for each persona.
[0064] The role may include a doctor, a veterinarian, a nurse, a parent, a child, or a friend, and the characteristic corresponding to the role may include a professional attitude, a caring attitude, a sincere attitude, or a friendly attitude.
[0065] As a specific example, the second command may include a command, such as “Please respond professionally and kindly as if a doctor were speaking to a patient.”
[0066] In another example, the processor 210 may generate a prompt to be input into the generative artificial intelligence model based on a new user input and a third command.
[0067] The new user input may refer to input data including chat records exchanged between the previous user input and the corresponding generative artificial intelligence model.
[0068] The third command may be configured to request the generative artificial intelligence model to generate useful questions to the patient while maintaining the context of the previous chat records.
[0069] The useful questions may include questions that the user might be curious about in relation to the request in the user input. That is, the useful questions may include questions that the user would likely have asked if the user had known, in light of the user input.
[0070] For example, the useful questions may include questions that help understand the subject matter addressed by the question contained in the user input. As another example, the useful questions may include questions that help address the question in the user input.
[0071] As another example, the processor 210 may generate a prompt to be input into the generative artificial intelligence model based on the user input and a fourth command.
[0072] When the user input contains a question, the processor 210 may generate a fourth prompt on the basis of the user input and the fourth command.
[0073] In this case, the fourth command may be configured to request the generative artificial intelligence model to provide a response of a predefined length for a question in the user input.
[0074] For example, the processor 210 may request the generative artificial intelligence model to provide a response having, e.g., a length of one line to help provide a clear and concise explanation to the user.
[0075] Additionally, the fourth command may be configured to request the generative artificial intelligence model to exclude a specific type of response when providing a response. The specific type of response may include a response that suggests a medical act or an equivalent act and / or a response with duplicated content. This enables the processor 210 to cause the generative artificial intelligence model to avoid duplication. Additionally, the specific type of response may be excluded so that the response is not interpreted as a medical act or an equivalent act.
[0076] Furthermore, the processor 210 may further provide supplementary answers by utilizing not only the generative artificial intelligence model but also a database storing vectors embedded with medical domain information.
[0077] The processor 210 may generate supplementary answers from the database through a retrieval-augmented generation (RAG) technique.
[0078] That is, the processor 210 may provide a final response with enhanced medical accuracy based on the supplementary response generated using the database and the response generated using the generative artificial intelligence model.
[0079] The generative artificial intelligence model is preferably trained by learning data labeled with evaluation indicators.
[0080] In this case, the learning data may be constructed by labeling evaluation indicators for at least one of preference, accuracy, and controversiality recorded by medical professionals regarding prediction values output by the generative artificial intelligence model for sample data including medical records.
[0081] For example, the learning data may be constructed to assign a total of 18 labels to one medical record by measuring preference, accuracy, and controversiality for one description of medical records and five responses to questions presented in relation to the medical records.
[0082] In this case, the preference may be classified in proportion to an order determined by the medical professional as the most appropriate response for the corresponding explanation. The accuracy which is an index for determining whether the corresponding response is medically valid, invalid, or expresses another opinion, may be evaluated in three classes. The controversiality may be evaluated on a scale from 0 to 10 points. In this case, the controversiality may be assigned a high score to responses where no consensus is reached among medical professionals and various perspectives may exist.
[0083] Meanwhile, it is preferable to evaluate the accuracy and the controversiality with respect to the most highly ranked explanation and response output in a three-choice format.
[0084] The memory 220 stores commands executed by the processor 210.
[0085] FIG. 3 is a diagram illustrating an example where the device 200 for providing a medical chat service based on generative artificial intelligence provides a screen for a user input, according to one embodiment.
[0086] The processor 210 may transmit a user input received through an application linked with the server 100 to the server 100.
[0087] The processor 210 may receive the user input through a first UI of the application displayed on the display of the device 200. For example, the processor 210 may receive the user input obtained through a text input field as the first UI. The processor 210 may receive the user input through an image upload icon as the first UI.
[0088] When the user input is completed, the processor 210 may send an analysis request or transmission request to the server 100 according to the user's request. For example, when a second UI of the application displayed on the display of the device 200 is touched by the user, the processor 210 may request the server 100 to analyze or transmit medical records uploaded through the user input to another external device 200.
[0089] FIG. 4 is a diagram illustrating an example where the device 200 for providing a medical chat service based on generative artificial intelligence provides a warning signal in response to the user input, according to one embodiment.
[0090] The processor 210 may output a warning signal when the uploaded image contains inappropriate information.
[0091] As shown in the medical record image on the left side of FIG. 4, when personal information including at least one of the name, the ID, the age, the gender, and the date of birth is shown in the uploaded image, the processor 210 may recognize this and output a message instructing to exclude the personal information as a warning signal.
[0092] Conversely, the processor 210 may output a completion signal when the image does not contain inappropriate information.
[0093] As shown in the medical record image shown on the right side of FIG. 4, when personal information is not shown in the uploaded image, the processor 210 may provide information indicating that the image upload has been completed successfully by outputting the completion signal.
[0094] Although the warning signal and / or guidance signal is described as being visually output on the display of the device 200, this is merely an example. The signal may also be output audibly and tactilely, in addition to visually, and are not necessarily limited thereto.
[0095] FIG. 5 is a diagram illustrating an example where the device 200 for providing a medical chat service based on generative artificial intelligence applies a persona to provide responses, according to one embodiment.
[0096] The processor 210 may provide a response to the user input transmitted to the server 100 through the application linked with the server 100.
[0097] In FIG. 5, the processor 210 applies a “child” persona to provide responses. The processor 210 provides a prompt that requests a response using the “child” persona previously selected by the user or defined in the settings, and provides the chat message in a “sincere” tone.
[0098] The processor 210 may display a third UI for persona settings on the display of the device 200 for selecting a persona to be applied to the next response. The role and the characteristic of the persona are guided on the display to facilitate the user's persona modification.
[0099] When the third UI is touched by the user, the processor 210 may generate the next prompt by adding a command to the new user input that instructs the generative artificial intelligence model to provide a response where a newly selected persona is applied.
[0100] FIG. 6 is a diagram illustrating an example where the device 200 for providing a medical chat service based on generative artificial intelligence suggests recommended questions for a user question, according to one embodiment.
[0101] In FIG. 6, the processor 210 suggests useful questions to the user. In this case, the processor 210 may suggest useful questions to the user based on the conversation the user has had with the generative artificial intelligence model.
[0102] Specifically, the processor 210 may recommend useful questions to the user while maintaining the context of the conversation the user has previously had with the generative artificial intelligence model. In the example, since the user asks a question on the topic of “radiopaque stone”, the processor 210 may induce new questions as the next recommended questions to inform the user “which body part is the radiopaque stone located in?” and “is the condition of the radiopaque stone severe?” to obtain information about the user's radiopaque stone.
[0103] That is, the processor 210 may provide subsequent responses while maintaining a topic, a volume, a scope, background information, a purpose, objectives, relevance, a user's prior knowledge, experience, emotional context, cultural context, and the like from the conversation between the user and the generative artificial intelligence model.
[0104] FIG. 7 is a diagram illustrating an example where the device 200 for providing a medical chat service based on generative artificial intelligence sends chat records to an external device 200 according to one embodiment.
[0105] The processor 210 may transmit chat records to the external device 200 through the application.
[0106] First, the processor 210 may display, on the display of the device 200, a list of chat records that can be transmitted to the external device 200. Subsequently, the processor 210 may transmit the chat records selected by the user for external transmission to the external device 200. When data transmission is completed, the processor 210 may display, on the display, either a confirmation message indicating that the transmission was successful or an error message indicating that the transmission failed.
[0107] FIG. 8 is a diagram illustrating an example where the device 200 for providing a medical chat service based on generative artificial intelligence explains comparison results with a previous input, according to one embodiment.
[0108] To process a user query requesting a comparison, the processor 210 may provide, to the server 100, a query comparing a newly uploaded medical record with a previously uploaded medical record. The processor 210 may request the server 100 to perform comparison with a record corresponding to a desired date by storing the uploaded image and upload date together with metadata.
[0109] The processor 210 may provide, in response to the user query, the server 100 with a command requesting comparison items, such as changes in size and condition of the affected area of a disease. The processor 210 may provide the server 100 with a prompt including a command requesting additional recommendations beyond the corresponding user's query.
[0110] FIG. 9 is a flowchart of a method for providing a medical chat service based on generative artificial intelligence according to one embodiment.
[0111] The method of FIG. 9 may be performed by the device 200 for providing the generative medical chat service based on generative artificial intelligence described in FIG. 2.
[0112] First, the device 200 for providing the medical chat service based on generative artificial intelligence generates a prompt on the basis of a user input and a predefined command (910).
[0113] Subsequently, the device 200 for providing the medical chat service based on generative artificial intelligence inputs a prompt to the generative artificial intelligence model and outputs a corresponding response (920).
[0114] In FIG. 1, the device 200 was described as providing a chat service by communicating with the generative artificial intelligence model of the server 100. However, contrary to this description, the device 200 may alternatively provide a chat service independently through the generative artificial intelligence model embedded within the device 200.
[0115] FIG. 9 has been described with reference to the order presented in the drawing. For illustrative purposes, the method is shown and described as a series of blocks, but the present invention is not limited to the order of the blocks. Some of the blocks may occur in a different order or simultaneously with other blocks than those shown and described herein, and various other branches, flow paths, and block orders that achieve the same or similar results may be implemented. Moreover, not all of the blocks shown may be required for implementation of the method described herein.
[0116] Embodiments of the present invention may include a program for performing the methods described herein on a computer, and computer-readable recording media containing the program. The computer-readable recording media may include program commands, local data files, local data structures, and the like alone or in combination. The media may be those specially designed and configured for the present invention, or may be those commonly available in the field of computer software. Examples of the computer-readable recording media include magnetic media, such as hard disks, floppy disks, and magnetic tapes, optical recording media, such as CD-ROMs and DVDs, and hardware devices specially configured to store and execute program commands, such as ROM, RAM, flash memory, and the like. Examples of the program may include not only machine language code, such as that created by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
[0117] While representative embodiments of the present invention have been described in detail above, those skilled in the art to which the present invention pertains will understand that various modifications are possible within the scope of the present invention without departing from the scope thereof. Therefore, the scope of rights of the present invention should not be limited to the described embodiments, but should be determined by the following claims as well as equivalents thereof.Industrial Applicability
[0118] A device and a method for providing a medical chat service based on generative artificial intelligence according to one embodiment provides prompt engineering to help users effectively use a generative artificial intelligence model having medical information as its domain, and is applicable in the digital healthcare industry.
Claims
1. A method for providing a medical chat service based on generative artificial intelligence, performed by a device comprising one or more processors, and a memory in which one or more programs executed by the one or more processors are stored, the method comprising:generating a prompt on the basis of a user input and a command; andinputting the prompt into a generative artificial intelligence model and outputting a corresponding response.
2. The method of claim 1, wherein the user input comprises at least one of a text input and an image input related to medical records comprising at least one of surgical records, examination results, hospitalization records, discharge records, initial examination records, follow-up examination records, nursing records, and prescriptions for persons or animals.
3. The method of claim 1, wherein the command comprises a first command, the prompt comprises a first prompt, and the generating of the prompt comprises generating the first prompt on the basis of the user input and the first command, and wherein the first command is configured to request the generative artificial intelligence model to provide a response to medical records contained in the user input with a medically professional attitude, excluding personal information contained in the user input, the personal information including at least one of a patient name, a patient number, a date of birth, a hospital name, a hospital address, an attending physician, and an attending physician's phone number.
4. The method of claim 1, wherein the command comprises a second command, the prompt comprises a second prompt, and the generating of the prompt comprises generating the second prompt on the basis of the user input and the second command, and wherein the second command is configured to assign a defined role and characteristic for each persona, the role comprising a doctor, a veterinarian, a nurse, a parent, a child, or a friend, and the characteristic corresponding to the role comprising a professional attitude, a gentle attitude, a sincere attitude, or a friendly attitude.
5. The method of claim 1, wherein the command comprises a third command, the prompt comprises a third prompt, and the generating of the prompt comprises generating a new user input by including a previous chat record exchanged between a user and a generative artificial intelligence model in the user input, and generating the third prompt on the basis of the new user input and the third command, and wherein the third command is configured to generate questions that are useful to the patient while maintaining the context of the previous chat records.
6. The method of claim 1, wherein the command comprises a fourth command, the prompt comprises a fourth prompt, and the generating of the prompt comprises identifying whether the user input is a question, and generating the fourth prompt on the basis of the user input and the fourth command when the user input is a question, and wherein the fourth command is configured to request the generative artificial intelligence model to output a response of a predefined length for the question.
7. The method of claim 6, wherein the fourth command is configured to request the generative artificial intelligence model to provide a response without a specific type of response, and the specific type of response comprises a response that proposes a medical procedure or an equivalent procedure and / or a response with duplicated content.
8. The method of claim 1, wherein the method comprises: detecting personal information in the user input; and outputting a message and / or a warning signal which guides the user to exclude the personal information from the user input when the personal information is detected.
9. The method of claim 4, wherein the generating of the second prompt comprises: displaying a menu on a display of the device for selecting an option of the persona; and upon receiving a selection for the option of the persona, generating the second prompt on the basis of the selected persona and the user input other than the selection for the option.
10. The method of claim 1, wherein the generative artificial intelligence model is trained by learning data labeled with evaluation indicators, and the learning data is constructed by labeling the evaluation indicators for at least one of preference, accuracy, and controversiality recorded by a healthcare professional regarding prediction values output by the generative artificial intelligence model for input data containing medical records.
11. The method of claim 1, wherein the outputting of the response comprises:outputting a supplementary response corresponding to the prompt using a retrieval-augmented generation (RAG) technique from a vector database in which medical information is structured as a corpus; and providing a final response based on the response output using the generative artificial intelligence model and the supplementary response output using the RAG technique.
12. A device for providing a medical chat service based on generative artificial intelligence, the device comprising: one or more processors; and a memory in which one or more programs executed by the one or more processors are stored, wherein the one or more processors generate a prompt on the basis of a user input and a command, and input the prompt to the generative artificial intelligence model to output a corresponding response.
