The Method, System, and Computer-readable Storage Medium For Simulation-Based Evaluation Of Medical LLM Using Multi-Agents
The simulation-based medical LLM evaluation system using multi-agents addresses the limitations of existing methods by simulating clinical interactions to objectively evaluate LLMs, ensuring reliable and safe diagnostic support systems.
Patent Information
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- GACHON UNIV OF IND ACADEMIC COOPERATION FOUND
- Filing Date
- 2025-07-14
- Publication Date
- 2026-07-15
AI Technical Summary
Existing medical Large Language Models (LLMs) lack comprehensive evaluation methods that accurately reflect real-world clinical environments, failing to assess multifaceted factors such as reasoning process, information gathering ability, and naturalness of conversation, which can lead to unreliable diagnostic outcomes.
A simulation-based medical LLM evaluation system using multi-agents, where a medical LLM interacts with a patient agent to generate conversation records, which are analyzed by evaluation agents to derive an evaluation result based on scenario information and criteria, incorporating feedback and reliability adjustments.
The system provides an objective and comprehensive evaluation of medical LLMs, enhancing reliability and safety by simulating clinical interactions, improving diagnostic accuracy and communication abilities, and ensuring high objectivity and consistency in evaluations.
Smart Images

Figure 112025078932482-PAT00001_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to a simulation-based medical LLM evaluation method and system using multi-agents, and a computer-readable storage medium. More specifically, the invention relates to a simulation-based medical LLM evaluation method and system using multi-agents and a computer-readable storage medium in which, when a medical LLM to be evaluated and a patient agent exchange conversations and generate a conversation record including questions and answers, an evaluation agent and an evaluation supervisor agent derive an evaluation result for the medical LLM to be evaluated based on the conversation record, a scenario regarding symptoms and diagnosis, and evaluation criteria. Background Technology
[0003] Recently, the utilization of artificial intelligence (AI) technology in the medical field has become an essential element. In particular, Large Language Models (LLMs) trained on massive medical data are attracting attention for their potential applications in various medical service areas, including diagnosis, treatment, and clinical support. These medical LLMs are evolving into AI that internalizes medical expertise, capable of generating appropriate questions based on a patient's symptoms and situation, collecting relevant information, deriving diagnostic results, or supporting medical staff decision-making.
[0004] However, problems can arise in the judgment process of medical LLMs, such as deriving results without accurate grounds or generating hallucinations or biased information. Given the nature of the medical field, such errors in LLMs can lead to serious issues directly related to patients' lives, making it essential to ensure the reliability of medical LLMs.
[0005] At this time, existing technologies for evaluating medical LLMs are biased toward the verification of general medical knowledge, such as MedMCQA, MedQA, MMLU, and PubMedQA, which limits the ability to ensure reliability in situations requiring actual clinical judgment. Consequently, this approach may not adequately reflect complex clinical environments and may make it impossible to provide a sophisticated evaluation of multifaceted factors, such as the reasoning process, information gathering ability, naturalness of conversation, and patient interaction capabilities of the medical LLM.
[0006] Therefore, methods for evaluating medical LLMs through simulations that reflect real-world environments are emerging. When evaluating medical LLMs using a simulation environment involving agents acting as actual doctors and patients, the medical LLM collects information by engaging in natural conversations with the agent playing the patient role, and the evaluation agent can automatically perform an objective assessment based on the dialogue records generated during this process.
[0007] Under these circumstances, there is a need for a technology that can overcome the limitations of existing medical LLM evaluations and comprehensively evaluate multifaceted elements of medical LLM, including diagnostic ability, inference accuracy, appropriateness of information collection, and naturalness of conversation, by applying a simulation-based multi-agent structure. The problem to be solved
[0009] The present invention aims to provide a simulation-based medical LLM evaluation method and system using multi-agents, and a computer-readable storage medium, more specifically, a simulation-based medical LLM evaluation method and system using multi-agents and a computer-readable storage medium in which, when a medical LLM to be evaluated and a patient agent exchange conversations and generate a conversation record including questions and answers, the evaluation agent derives an evaluation result for the medical LLM to be evaluated based on the conversation record, a scenario regarding symptoms and diagnosis, and evaluation criteria. means of solving the problem
[0011] To solve the above-mentioned problem, in one embodiment of the present invention, a simulation-based medical LLM evaluation method using a multi-agent through a server system comprising one or more processors and one or more memories is provided, wherein when an LLM to be evaluated generates a question, a patient agent repeatedly performs a process of generating a response to the said question to generate conversation record information composed of questions and responses. A medical LLM evaluation method is provided, comprising: a conversation record information generation step; and a medical LLM evaluation step in which the conversation record information is input into an evaluation agent to derive an evaluation result for the LLM to be evaluated based on the conversation record information, previously stored scenario information, and previously set evaluation criteria; wherein the conversation record information generation step comprises: a question generation step in which the LLM to be evaluated generates a question; and a response generation step in which the patient agent generates a response to the question by referring to the patient's symptoms and situation among the previously stored scenario information; and wherein the LLM to be evaluated receives information including text from the patient, generates a question to be presented to the patient, and corresponds to a deep learning-based language model trained to predict the patient's disease based on a conversation record with the patient.
[0012] In one embodiment of the present invention, the scenario information includes patient information including the patient's symptoms and situation, and diagnostic information including a doctor's diagnosis result corresponding to the patient information, and a plurality of scenario information may be stored in a database.
[0013] In one embodiment of the present invention, the response generation step may, when the evaluation target LLM generates a first question, the patient agent extracts first patient information regarding the first question from the scenario information, and input the first question, the first patient information, and previous conversation record information into an LLM outside or inside the server system to generate a first response to the first question, and then transmit the first response to the evaluation target LLM.
[0014] In one embodiment of the present invention, the question generation step may involve the subject LLM generating a question capable of eliciting patient information, including the patient's symptoms and situation, from the patient agent, the subject LLM collecting patient information step by step according to the patient agent's response, and generating a conversation result including the derivation of a diagnosis name and a test suggestion based on the collected patient information.
[0015] In one embodiment of the present invention, the conversation record information generation step further includes a feedback derivation step in which the conversation record information is input into a critique agent to review problems regarding the inference of the LLM to be evaluated, derive feedback, and transmit it to the LLM to be evaluated, and the critique agent may include a medical LLM that assists in the inference of the LLM to be evaluated.
[0016] In one embodiment of the present invention, the medical LLM evaluation step may include: a conversation record information preprocessing step for inputting the conversation record information into an LLM outside or inside a server system to extract a conversation summary, a diagnosis result, and an inference process for the diagnosis result regarding the conversation record information; and an evaluation result derivation step for inputting the conversation record information, the conversation summary, the diagnosis result, and the inference process into an evaluation agent to derive an evaluation result for the LLM to be evaluated based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria.
[0017] In one embodiment of the present invention, the medical LLM evaluation step inputs the conversation record information to each of a plurality of evaluation agents to derive a plurality of evaluation results, and an evaluation supervisory agent can derive a final evaluation result based on the plurality of evaluation results.
[0018] In one embodiment of the present invention, the medical LLM evaluation step inputs the conversation record information to each of a plurality of evaluation agents to derive a plurality of evaluation results, and an evaluation supervisory agent can derive a final evaluation result based on the conversation record information, the scenario information, the evaluation criteria, and the plurality of evaluation results.
[0019] In one embodiment of the present invention, the medical LLM evaluation step inputs the conversation record information to each of a plurality of evaluation agents to derive a plurality of evaluation results, generates an evaluation vector for each of the plurality of evaluation results for each evaluation item, calculates the cosine similarity between the evaluation vectors to quantitatively derive the degree of discrepancy, and if the degree of discrepancy exceeds a preset threshold, lowers the reliability of the evaluation agent that generated the evaluation result by a preset ratio, and then the evaluation supervisor agent applies a weight according to the reliability to the plurality of evaluation results to derive a final evaluation result.
[0020] To solve the above-mentioned problem, in one embodiment of the present invention, a server system comprising one or more processors and one or more memories, which performs a simulation-based medical LLM evaluation method using a multi-agent, wherein when an LLM to be evaluated generates a question, a patient agent repeatedly performs a process of generating a response to the said question to generate conversation record information composed of questions and responses. The present invention provides a server system comprising: a conversation record information generation unit; and a medical LLM evaluation unit that inputs the conversation record information into an evaluation agent and derives an evaluation result for the LLM subject to evaluation based on the conversation record information, previously stored scenario information, and previously set evaluation criteria; wherein the conversation record information generation unit includes a question generation unit in which the LLM subject to evaluation generates a question; and a response generation unit in which the patient agent generates a response to the question by referring to the patient's symptoms and situation among the previously stored scenario information; and wherein the LLM subject to evaluation receives information including text from the patient, generates a question to be presented to the patient, and corresponds to a deep learning-based language model trained to predict the patient's disease based on a conversation record with the patient.
[0021] In one embodiment of the present invention, the scenario information includes patient information including the patient's symptoms and situation, and diagnostic information including a doctor's diagnosis result corresponding to the patient information, and a plurality of scenario information may be stored in a database.
[0022] In one embodiment of the present invention, when the LLM to be evaluated generates a first question, the patient agent extracts first patient information regarding the first question from the scenario information, and the patient agent inputs the first question, the first patient information, and previous conversation record information into an LLM outside or inside the server system to generate a first response to the first question, and then transmits the first response to the LLM to be evaluated.
[0023] In one embodiment of the present invention, the question generation unit may generate a question that elicits patient information, including the patient's symptoms and situation, from the patient agent, and the evaluation target LLM may collect patient information step by step according to the patient agent's response, and generate a conversation result including the derivation of a diagnosis name and a test suggestion based on the collected patient information.
[0024] In one embodiment of the present invention, the conversation record information generation unit further includes a feedback derivation unit that inputs the conversation record information to a critique agent to review problems regarding the inference of the LLM to be evaluated, derives feedback, and transmits it to the LLM to be evaluated, and the critique agent may include a medical LLM that assists in the inference of the LLM to be evaluated.
[0025] In one embodiment of the present invention, the medical LLM evaluation unit may include: a conversation record information preprocessing unit that inputs the conversation record information into an LLM outside or inside a server system to extract a conversation summary, a diagnosis result, and an inference process for the diagnosis result regarding the conversation record information; and an evaluation result derivation unit that inputs the conversation record information, the conversation summary, the diagnosis result, and the inference process into an evaluation agent to derive an evaluation result for the LLM to be evaluated based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria.
[0026] In one embodiment of the present invention, the medical LLM evaluation unit inputs the conversation record information to each of a plurality of evaluation agents to derive a plurality of evaluation results, and an evaluation supervision agent can derive a final evaluation result based on the plurality of evaluation results.
[0027] In one embodiment of the present invention, the medical LLM evaluation unit inputs the conversation record information to each of the plurality of evaluation agents to derive a plurality of evaluation results, and the evaluation supervisor agent can derive a final evaluation result based on the conversation record information, the scenario information, the evaluation criteria, and the plurality of evaluation results.
[0028] In one embodiment of the present invention, the medical LLM evaluation unit inputs the conversation record information to each of a plurality of evaluation agents to derive a plurality of evaluation results, generates an evaluation vector for each of the plurality of evaluation results for each evaluation item, calculates the cosine similarity between the evaluation vectors to quantitatively derive the degree of discrepancy, and if the degree of discrepancy exceeds a preset threshold, lowers the reliability of the evaluation agent that generated the evaluation result by a preset ratio, and then the evaluation supervisory agent applies a weight according to the reliability to the plurality of evaluation results to derive a final evaluation result.
[0029] To solve the above-mentioned problem, in one embodiment of the present invention, a computer-readable storage medium for implementing a simulation-based medical LLM evaluation method using a multi-agent, which is executed in a server system comprising one or more processors and one or more memories, wherein the computer-readable storage medium comprises computer-executable instructions that cause the server system to perform the following steps, and the following steps are: repeatedly performing a process in which, when an LLM to be evaluated generates a question, a patient agent generates a response to the said question, thereby generating conversation record information composed of a question and a response. The present invention provides a computer-readable storage medium that includes: a conversation record information generation step; and a medical LLM evaluation step in which the conversation record information is input into an evaluation agent to derive an evaluation result for the LLM subject to evaluation based on the conversation record information, previously stored scenario information, and previously set evaluation criteria; wherein the conversation record information generation step includes: a question generation step in which the LLM subject to evaluation generates a question; and a response generation step in which the patient agent generates a response to the question by referring to the patient's symptoms and situation among the previously stored scenario information; and wherein the LLM subject to evaluation receives information including text from the patient, generates a question to be presented to the patient, and corresponds to a deep learning-based language model trained to predict the patient's disease based on a conversation record with the patient.
[0030] In one embodiment of the present invention, the medical LLM evaluation step may include: a conversation record information preprocessing step for inputting the conversation record information into an LLM outside or inside a server system to extract a conversation summary, a diagnosis result, and an inference process for the diagnosis result regarding the conversation record information; and an evaluation result derivation step for inputting the conversation record information, the conversation summary, the diagnosis result, and the inference process into an evaluation agent to derive an evaluation result for the LLM to be evaluated based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria. Effects of the invention
[0032] According to one embodiment of the present invention, the effect of generating conversation record information that can evaluate the subject LLM can be achieved through a simulation in which the subject LLM and the patient agent play the roles of doctor and patient.
[0033] According to one embodiment of the present invention, the effect of automatically evaluating the subject LLM according to evaluation criteria through an evaluation agent can be achieved.
[0034] According to one embodiment of the present invention, by generating a response to a question based on scenario information, a patient agent can achieve the effect of enabling a simulation that reflects the actual environment.
[0035] According to one embodiment of the present invention, the effect of objectively evaluating the overall performance of medical LLM can be achieved through dynamic interactive simulation that reflects an actual clinical environment.
[0036] According to one embodiment of the present invention, by utilizing conversation record information generated through repeated interaction between a patient agent and a medical LLM based on the patient's symptoms and situation, it is possible to achieve the effect of comprehensively evaluating the medical LLM's questioning ability, information gathering ability, reasoning logic, diagnostic accuracy, and communication ability with the patient.
[0037] According to one embodiment of the present invention, by extracting conversation summaries, diagnostic results, and inference results from conversation record information and processing them into structured information, it is possible to achieve the effect of deeply analyzing and evaluating the thought flow and inference process of medical LLM.
[0038] According to one embodiment of the present invention, by utilizing a plurality of evaluation agents and comparing evaluation results to dynamically adjust the reliability of the evaluation, the reliability, objectivity, and consistency of the evaluation can be improved.
[0039] According to one embodiment of the present invention, the performance of medical LLM can be verified accurately and quantitatively, and high reliability and objectivity in the evaluation can be secured, thereby enabling the effect of contributing to the development of a safe AI-based diagnostic and decision support system in the medical field.
[0040] According to one embodiment of the present invention, by ensuring the reliability and safety of the AI model, risks such as initial development and operation costs are minimized, thereby maximizing the effectiveness of AI adoption and contributing to cost reduction and improved profitability of the hospital. Brief explanation of the drawing
[0042] FIG. 1 schematically illustrates the internal configuration of a server system according to one embodiment of the present invention. FIG. 2 schematically illustrates the connection configuration of a multi-agent according to one embodiment of the present invention. FIG. 3 schematically illustrates the steps of a medical LLM evaluation method according to one embodiment of the present invention. FIG. 4 schematically illustrates the process of performing the conversation record information generation step according to one embodiment of the present invention. FIG. 5 schematically illustrates scenario information according to one embodiment of the present invention. FIG. 6 schematically illustrates conversation record information according to one embodiment of the present invention. FIG. 7 schematically illustrates the process of performing the step of a patient agent generating a response according to one embodiment of the present invention. FIG. 8 schematically illustrates the process of performing a medical LLM evaluation step according to one embodiment of the present invention. FIG. 9 schematically illustrates the process of performing a medical LLM evaluation step according to one embodiment of the present invention. FIG. 10 illustrates the internal configuration of a computing device according to one embodiment of the present invention. Specific details for implementing the invention
[0043] Hereinafter, various embodiments and / or aspects are disclosed with reference to the drawings. For illustrative purposes, numerous specific details are disclosed in the following description to aid in a general understanding of one or more aspects. However, it will also be recognized by those skilled in the art that these aspects may be practiced without such specific details. The following description and the accompanying drawings describe specific exemplary aspects of one or more aspects in detail. However, these aspects are exemplary, and some of the various methods in the principles of the various aspects may be used, and the description is intended to include all such aspects and their equivalents.
[0044] Additionally, terms including ordinal numbers, such as first, second, etc., may be used to describe various components, but said components are not limited by said terms. Such terms are used solely for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be named the second component, and similarly, the second component may be named the first component. The term "and / or" includes a combination of a plurality of related described items or any of a plurality of related described items.
[0045] Furthermore, in the embodiments of the present invention, all terms used herein, including technical or scientific terms, unless otherwise defined, have the same meaning as generally understood by those skilled in the art to which the present invention pertains. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an ideal or overly formal sense unless explicitly defined in the embodiments of the present invention.
[0046] The "user terminal" mentioned below may be implemented as a computer or portable terminal capable of connecting to a server or other terminal via a network. Here, the computer includes, for example, a notebook, desktop, or laptop equipped with a web browser, and the portable terminal may include, for example, all types of handheld-based wireless communication devices that ensure portability and mobility, such as smartphones, PCS (Personal Communication System), GSM (Global System for Mobile communications), PDC (Personal Digital Cellular), PHS (Personal Handyphone System), PDA (Personal Digital Assistant), IMT (International Mobile Telecommunication)-2000, CDMA (Code Division Multiple Access)-2000, W-CDMA (W-Code Division Multiple Access), Wibro (Wireless Broadband Internet), and BLE Beacon (Bluetooth Low Energy Beacon) terminals. In addition, the “network” can be implemented as a wired network such as a Local Area Network (LAN), Wide Area Network (WAN), or Value Added Network (VAN), or as any type of wireless network such as a mobile radio communication network or a satellite communication network.
[0048] FIG. 1 schematically illustrates the internal configuration of a server system (1000) according to one embodiment of the present invention.
[0050] As illustrated in FIG. 1, the server system (1000) comprises: a conversation record information generation unit (1100) that performs a conversation record information generation step in which a patient agent (200) repeatedly performs a process of generating a response to a question when an LLM (100) to be evaluated generates a question, thereby generating conversation record information composed of a question and a response; and a medical LLM evaluation unit (1200) that performs a medical LLM evaluation step in which the conversation record information is input to an evaluation agent (300) to derive an evaluation result for the LLM (100) to be evaluated based on the conversation record information, previously stored scenario information, and previously set evaluation criteria.
[0052] Specifically, each component included in the server system (1000) illustrated in FIG. 1 performs the role of controlling the operation of the server system (1000) that performs the medical LLM evaluation method of the present invention.
[0053] More specifically, the conversation record information generation unit (1100) of the server system (1000) can generate conversation record information consisting of questions and answers by repeatedly performing the process in which the patient agent (200) generates a response to the question when the evaluation target LLM (100) generates a question.
[0054] In one embodiment of the present invention, the conversation record information generation step may include: a question generation step in which the subject LLM (100) generates a question; a response generation step in which the patient agent (200) generates a response to the question by referring to the patient's symptoms and situation among the previously stored scenario information; and a feedback derivation step in which the conversation record information is input to the critique agent (500) to review problems regarding the inference of the subject LLM (100), derive feedback, and transmit it to the subject LLM (100).
[0055] At this time, the question generation step may involve the evaluation target LLM (100) generating a question that can elicit patient information, including the patient's symptoms and situation, from the patient agent (200), and the evaluation target LLM (100) collecting patient information step by step according to the response of the patient agent (200), and generating a conversation result including the derivation of a diagnosis name and a test suggestion based on the collected patient information.
[0056] For example, in the response generation step, when the evaluation target LLM (100) generates a first question, the patient agent (200) extracts first patient information regarding the first question from the scenario information, and the patient agent (200) inputs the first question, the first patient information, and previous conversation record information into an LLM outside or inside the server system (1000) to generate a first response to the first question, and then transmits the first response to the evaluation target LLM (100).
[0057] Preferably, the critique agent (500) may include a medical LLM that assists in the reasoning of the LLM under evaluation (100).
[0059] The medical LLM evaluation unit (1200) of the above server system (1000) can input the above conversation record information into the evaluation agent (300) and derive an evaluation result for the LLM (100) to be evaluated based on the corresponding conversation record information, previously stored scenario information, and previously set evaluation criteria.
[0060] In one embodiment of the present invention, the medical LLM evaluation step may include: a conversation record information preprocessing step for inputting the conversation record information into an LLM outside or inside the server system (1000) to extract a conversation summary, a diagnosis result, and an inference process for the diagnosis result regarding the conversation record information; and an evaluation result derivation step for inputting the conversation record information, the conversation summary, the diagnosis result, and the inference process into the evaluation agent (300) to derive an evaluation result for the LLM (100) to be evaluated based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria.
[0061] Preferably, the scenario information includes patient information including the patient's symptoms and situation, and diagnostic information including a doctor's diagnosis result corresponding to the patient information, and a plurality of scenario information is stored in the database.
[0062] At this time, the medical LLM evaluation step may input the conversation record information into each of the plurality of evaluation agents (300) to derive a plurality of evaluation results, and then the evaluation supervisory agent (400) may derive a final evaluation result based on the plurality of evaluation results, or the medical LLM evaluation step may input the conversation record information into each of the plurality of evaluation agents (300) to derive a plurality of evaluation results, and then the evaluation supervisory agent (400) may derive a final evaluation result based on the conversation record information, the scenario information, the evaluation criteria, and the plurality of evaluation results.
[0063] In another embodiment of the present invention, the medical LLM evaluation step may input the conversation record information into each of the plurality of evaluation agents (300) to derive a plurality of evaluation results, generate an evaluation vector for each of the plurality of evaluation results, calculate the cosine similarity between the evaluation vectors to quantitatively derive the degree of discrepancy, and if the degree of discrepancy exceeds a preset threshold, lower the reliability of the evaluation agent (300) that generated the evaluation result by a preset ratio, and then the evaluation supervisor agent (400) may derive a final evaluation result by applying a weight according to the reliability to the plurality of evaluation results.
[0065] FIG. 2 schematically illustrates the connection configuration of a multi-agent according to one embodiment of the present invention.
[0067] As illustrated in FIG. 2, the server system (1000) may include a patient agent (200), an evaluation agent (300), an evaluation supervision agent (400), and a critique agent (500), and the multi-agent of the present invention may include the patient agent (200), the evaluation agent (300), the evaluation supervision agent (400), and the critique agent (500).
[0069] Specifically, in the present invention, each agent includes a large language model or is connected to a large language model, and in one embodiment of the present invention, each agent can perform different roles by referencing different large language models.
[0070] The above patient agent (200) is an agent that, when the subject LLM (100) generates a question, extracts patient information from scenario information and then generates a response to the question based on the question, patient information, and previous conversation record information, and the above critique agent (500) may include a medical LLM that assists in the reasoning of the subject LLM (100), and may be an agent that, when conversation record information is input, reviews problems regarding the reasoning of the subject LLM (100) from the conversation record information, derives feedback, and transmits it to the subject LLM (100).
[0071] The evaluation agent (300) is an agent that derives an evaluation result for the LLM (100) subject to evaluation based on the conversation record information, previously stored scenario information, and previously set evaluation criteria when conversation record information is input, and the evaluation supervision agent (400) may be an agent that derives a final evaluation result by collecting and organizing multiple evaluation results derived from each of the multiple evaluation agents (300).
[0073] In one embodiment of the present invention, the medical LLM evaluation method may be performed using the patient agent (200), the evaluation agent (300), the evaluation supervision agent (400), and the critique agent (500). When the medical LLM evaluation method begins to be performed, the patient agent (200) first performs a step on the LLM (100) to be evaluated, the critique agent (500) performs a step, the evaluation agent (300) performs a step, and the evaluation supervision agent (400) performs a step, after which the medical LLM evaluation method may be terminated.
[0074] At this time, the steps performed by the patient agent (200) and the subject LLM (100) can be performed repeatedly, and the steps performed by the evaluation agent (300) can be performed by a plurality of evaluation agents (300).
[0076] More specifically, when the above medical LLM evaluation method is performed, first, a patient agent (200) can generate conversation record information by exchanging questions and answers with the LLM (100) to be evaluated, a critic agent (500) can review problems regarding the inference of the LLM (100) to be evaluated based on the conversation record information and derive feedback, an evaluation agent (300) can derive an evaluation result for the LLM (100) to be evaluated based on the conversation record information, and an evaluation supervisor agent (400) can evaluate the LLM (100) to be evaluated by deriving a final evaluation result based on multiple evaluation results.
[0077] At this time, the patient agent (200) can generate conversation record information by repeatedly exchanging questions and answers with the LLM to be evaluated (100), and the medical LLM evaluation method of the present invention can be performed through the interaction between the multi-agents without human intervention.
[0079] Preferably, the evaluation target LLM (100) corresponds to a deep learning-based language model that receives information including text from a patient, generates questions to be presented to the patient, and is trained to predict the patient's disease based on a conversation record with the patient. That is, the evaluation target LLM (100) corresponds to a medical LLM located outside the server system (1000) and subject to evaluation through the medical LLM evaluation method of the present invention.
[0081] FIG. 3 schematically illustrates the steps of a medical LLM evaluation method according to one embodiment of the present invention.
[0083] As illustrated in FIG. 3, the medical LLM evaluation method can be such that when the LLM to be evaluated (100) generates a question (S10), the patient agent (200) extracts patient information regarding the question from the scenario information, inputs the question, the patient information, and previous conversation record information into an LLM outside or inside the server system (1000) to generate a response to the question, and then transmits the response to the LLM to be evaluated (S11).
[0084] Preferably, when the subject LLM (100) generates a question, the patient agent (200) generates a response to the question, and when the subject LLM (100) generates a question regarding the response, the patient agent (200) generates a response to the question. This process is repeated to generate conversation record information consisting of questions and responses.
[0086] At this time, the generated conversation record information can be input into an external or internal LLM of the server system (1000) to extract a conversation summary, a diagnosis result, and an inference process regarding the diagnosis result for the conversation record information (S12), and when the conversation record information, the conversation summary, the diagnosis result, and the inference process are input into an evaluation agent (300), the evaluation agent (300) can derive an evaluation result for the LLM (100) to be evaluated based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria (S13).
[0087] Additionally, when the above conversation record information is input to each of the plurality of evaluation agents (300) and a plurality of evaluation results are derived, the evaluation supervision agent (400) can derive a final evaluation result (S14) based on the above conversation record information, the above scenario information, the above evaluation criteria, and the above plurality of evaluation results.
[0089] FIG. 4 schematically illustrates the process of performing the conversation record information generation step according to one embodiment of the present invention.
[0091] In summary, FIG. 4(a) illustrates the process of performing the step of generating conversation record information through the subject LLM (100) and the patient agent (200), and FIG. 4(b) illustrates the process of performing the step of generating conversation record information through the subject LLM (100), the patient agent (200), and the critic agent (500).
[0093] Specifically, the conversation record information generation step can generate conversation record information consisting of questions and answers by repeatedly performing the process in which the patient agent (200) generates a response to the question when the evaluation target LLM (100) generates a question.
[0094] The above conversation record information generation step may include: a question generation step in which the subject LLM (100) generates a question; a response generation step in which the patient agent (200) generates a response to the question by referring to the patient's symptoms and situation among the stored scenario information; and a feedback derivation step in which the conversation record information is input to the critique agent (500) to review problems regarding the inference of the subject LLM (100), derive feedback, and transmit it to the subject LLM (100).
[0096] As illustrated in FIG. 4(a), when the subject LLM (100) generates a question, the patient agent (200) can generate a response to the question by referring to the patient's symptoms and situation among the stored scenario information.
[0097] At this time, multiple scenario information is stored in the database, and the scenario information may include patient information including the patient's symptoms and situation, and diagnostic information including a doctor's diagnosis result corresponding to the patient information. When the LLM to be evaluated (100) generates a question, the patient agent (200) extracts one piece of patient information regarding the question from the scenario information, and the patient agent (200) inputs the question, the patient information, and previous conversation record information into an LLM outside or inside the server system (1000) to generate a response to the question, and then transmits the response to the LLM to be evaluated (100).
[0098] Preferably, when the subject LLM (100) generates a question, the patient agent (200) can repeatedly perform the process of generating a response to the question to generate conversation record information consisting of questions and responses. Accordingly, the subject LLM (100) and the patient agent (200) can generate conversation record information by conducting a conversation simulation of the medical environment in the roles of doctor and patient, respectively, and evaluate the subject LLM (100) based on the conversation record information.
[0100] In one embodiment of the present invention, a patient agent (200) can randomly extract one patient information from the scenario information, and by repeatedly performing the process of generating a response to a question based on the patient information, conversation record information reflecting the patient information can be generated.
[0101] That is, one conversation record information may include information based on one of the patient information among the above scenario information, and when evaluating the target LLM (100) based on multiple scenario information stored in a database, conversation record information based on each of the multiple scenario information may be generated, and then the target LLM (100) may be evaluated based on each conversation record information.
[0103] As illustrated in FIG. 4(b), when the subject LLM (100) generates a question, the patient agent (200) can generate a response to the question by referring to the patient's symptoms and situation among the stored scenario information, and can repeat this process to generate conversation record information consisting of questions and responses. Afterwards, the conversation record information can be input into the critique agent (500) to review problems with the subject LLM (100)'s reasoning and derive feedback, which can then be transmitted to the subject LLM (100).
[0104] Accordingly, the critique agent (500) can perform the role of assisting the reasoning of the subject LLM (100), and the subject LLM (100) can generate questions by reflecting the feedback. Accordingly, conversation record information including questions reflecting the feedback of the critique agent (500) can be generated.
[0106] FIG. 5 schematically illustrates scenario information according to one embodiment of the present invention.
[0108] Generally, scenario information includes patient information including the patient's symptoms and situation, and diagnostic information including the doctor's diagnosis result corresponding to the patient information, and multiple scenario information is stored in the database.
[0110] As illustrated in FIG. 5, a plurality of scenario information is stored in the database of the server system (1000), and one scenario information may include patient information and diagnostic information. At this time, the patient information may include text describing the patient's symptoms or situation, and various formats of test result files such as text including CT images or examination results, and the diagnostic information may include text describing the actual doctor's diagnosis results for the patient. The diagnostic information may include a diagnosis name and a test name.
[0111] In one embodiment of the present invention, the scenario information includes patient information including patient symptoms and situation, and diagnostic information including a doctor's diagnosis result corresponding to the patient information, and may include information collected and secured based on clinical evidence through the participation of an advisory expert group composed of medical, IT, and legal experts.
[0112] Additionally, the above scenario information may be composed of a dataset specialized for multi-faceted reliability evaluation indicators including hallucinations, biases, and explainability of the above-mentioned LLM (100), and the database may be structured to reflect quantitative and qualitative criteria for the above-mentioned multi-faceted reliability evaluation indicators and may be updated through continuous qualitative improvement and expansion.
[0114] At this time, when the subject LLM (100) generates a question during the conversation record information generation step, the patient agent (200) can randomly extract one patient information from the scenario information and generate a response to the question based on the corresponding patient information. Accordingly, the patient agent (200) can generate a response to the subject LLM (100)'s question by reflecting only the patient information and not the diagnostic information among the scenario information.
[0115] If the scenario information contains patient information including patient information #1 to patient information #n, and diagnostic information including diagnostic information #1 to diagnostic information #n corresponding to each patient information, the patient agent (200) can generate a response based on one patient information randomly extracted from among patient information #1 to patient information #n.
[0117] For example, when the subject LLM (100) generates question #1, the patient agent (200) extracts patient information #3 regarding question #1 from the scenario information, and the patient agent (200) inputs question #1, patient information #3, and previous conversation record information into an external or internal LLM of the server system (1000) to generate response #1 for question #1, and then transmits the response #1 to the subject LLM (100).
[0118] At this time, the previous conversation record information includes a record of questions and answers exchanged between the subject LLM (100) and the patient agent (200), and the text of each question and answer, and the previous conversation record information may include the conversation record information.
[0120] Additionally, when the conversation record information is input into the evaluation agent (300) during the medical LLM evaluation stage, an evaluation result for the LLM (100) to be evaluated can be derived based on the conversation record information, previously stored scenario information, and previously set evaluation criteria. Accordingly, the evaluation agent (300) can derive an evaluation result for the LLM (100) to be evaluated by reflecting all patient information and diagnostic information included in the scenario information.
[0121] If the scenario information contains patient information including patient information #1 to patient information #n, and diagnostic information including diagnostic information #1 to diagnostic information #n corresponding to each patient information, the evaluation agent (300) can derive an evaluation result for the LLM (100) to be evaluated based on the patient information and diagnostic information corresponding to one patient information reflected in the conversation record information.
[0123] In one embodiment of the present invention, when a plurality of evaluation results derived from a plurality of evaluation agents (300) are input to an evaluation supervisory agent (400) during the medical LLM evaluation stage, a final evaluation result for the LLM subject to evaluation (100) can be derived based on the conversation record information, previously stored scenario information, previously set evaluation criteria, and the plurality of evaluation results. Accordingly, the evaluation supervisory agent (400) can derive a final evaluation result for the LLM subject to evaluation (100) by reflecting all patient information and diagnostic information included in the scenario information.
[0124] If the scenario information contains patient information including patient information #1 to patient information #n, and diagnostic information including diagnostic information #1 to diagnostic information #n corresponding to each patient information, the evaluation supervisor agent (400) can derive a final evaluation result for the evaluation target LLM (100) based on the patient information and diagnostic information corresponding to one patient information reflected in the evaluation result.
[0126] Accordingly, the patient agent (200) can generate a response to a question by reflecting (1) corresponding to patient information among the above scenario information, and the evaluation agent (300) and the evaluation supervisory agent (400) can derive an evaluation result and a final evaluation result by reflecting (2) corresponding to patient information and diagnosis information among the above scenario information.
[0128] In another embodiment of the present invention, when evaluating an LLM (100) for various diseases and symptoms, if the LLM (100) for evaluation generates a question in the conversation record information generation step, the patient agent (200) may randomly extract one patient information from the scenario information and generate a response to the question based on the patient information.
[0129] After one conversation record information is generated by repeatedly performing this process, when the next conversation is started, the evaluation target LLM (100) generates a new question and the patient agent (200) can randomly extract one patient information from the above scenario information. At this time, the remaining patient information is compared with each other excluding the patient information that has already been extracted from the scenario information, and patient information whose similarity to the already extracted patient information is greater than or equal to a preset exclusion criterion is excluded, and one patient information is randomly extracted from the remaining patient information.
[0130] By repeatedly performing the above process, multiple conversation record information for various diseases can be generated, and by deriving an evaluation result for the LLM (100) to be evaluated based on the multiple conversation record information, the LLM (100) to be evaluated can be evaluated in combination with various diseases and symptoms.
[0132] At this time, a vector can be derived by embedding text regarding patient information that has already been extracted from the scenario information and diagnostic information corresponding to that patient information, and a vector can be derived by embedding text regarding the remaining patient information and diagnostic information from the scenario information.
[0133] Afterwards, patient information and diagnostic information that have a similarity to previously extracted patient information and diagnostic information that is greater than or equal to a preset exclusion criterion can be extracted using cosine similarity, and after excluding such information, one patient information can be randomly extracted and reflected in the response of the patient agent (200).
[0135] If, in the scenario information, patient information including patient information #1 to patient information #n and diagnostic information including diagnostic information #1 to diagnostic information #n corresponding to each patient information are stored, the patient agent (200) may first randomly extract patient information #2 from among patient information #1 to patient information #n and generate a response based on patient information #2. At this time, as the subject LLM (100) and the patient agent (200) repeatedly exchange questions and answers, conversation record information #1 reflecting patient information #2 may be generated.
[0136] Subsequently, the patient agent (200) can, secondly, exclude patient information #2 from the patient information #1 to patient information #n and compare the remaining patient information with each other, and exclude patient information #3 and patient information #4 whose similarity to patient information #2 is greater than or equal to a preset exclusion criterion, and randomly extract patient information #10 from the remaining. Accordingly, the patient agent (200) can generate a response based on patient information #10, and at this time, as the subject LLM (100) and the patient agent (200) repeatedly exchange questions and answers, conversation record information #2 reflecting patient information #10 can be generated.
[0137] The above process can be repeated m times to generate conversation record information #1 to conversation record information #m, and based on the conversation record information, the evaluation target LLM (100) can be evaluated for various diseases and various situations. At this time, n and m correspond to natural numbers greater than or equal to 1.
[0139] FIG. 6 schematically illustrates conversation record information according to one embodiment of the present invention.
[0141] Generally, the conversation record information corresponds to text-based information consisting of questions and answers, and may include questions generated by the subject LLM (100) and responses generated by the patient agent (200) for each question.
[0143] As illustrated in FIG. 6, one conversation record information may include (1) to (8), where (1), (3), (5), and (7) may correspond to questions generated by the subject LLM (100), and (2), (4), (6), and (8) may correspond to responses generated by the patient agent (200) for each question.
[0144] For example, when the subject LLM (100) presents the question "Hello. What symptoms can I help you with?", the patient agent (200) can generate a response to the question "Hello. I have had a sore throat and a persistent low-grade fever for the past few days. I also cough sometimes." by referring to one patient information randomly extracted from the stored scenario information.
[0145] Preferably, the patient agent (200) can input the question, the randomly extracted patient information, and the previous conversation record information into an LLM outside or inside the server system (1000) to generate a response to the question, and then transmit the response to the evaluation target LLM (100).
[0147] Accordingly, in the above conversation record information, the subject LLM (100) performs the role of a doctor and may include questions that the doctor can present to the patient, and the patient agent (200) performs the role of a patient and may include responses that can answer the doctor's questions as a patient with a disease.
[0148] Therefore, since one conversation record information includes only the response generated by the patient agent (200) based on one patient information, one conversation record information may include the conversation exchanged between a patient with one disease and a doctor.
[0150] At this time, the evaluation target LLM (100) can generate questions that elicit patient information, including the patient's symptoms and situation, from the patient agent (200), and the evaluation target LLM (100) can collect patient information step by step according to the response of the patient agent (200) and generate a conversation result including the derivation of a diagnosis name and a test suggestion based on the collected patient information. That is, the conversation record information may include the diagnosis name and test name finally derived by the evaluation target LLM (100) according to the response of the patient agent (200).
[0151] For example, as the subject LLM (100) in Fig. 6 presents a question and receives a response from the patient agent (200), the subject LLM (100) derives the diagnosis of ‘viral pharyngitis’ in (5), and can suggest a solution and hospital examination as in (7).
[0152] In one embodiment of the present invention, an operation based on CoT (Chain of Thought) can be set to extract medical reasoning of the subject LLM (100) from conversation record information.
[0154] Previously, LLMs were evaluated by inputting questions into the LLM to be evaluated in the form of benchmark data and then evaluating the responses derived from the LLM. However, this method had limitations in evaluating LLMs because most responses were derived as multiple-choice questions. Therefore, the present invention applies a method for deriving conversational data to construct a simulation environment in which an agent engages in a conversation with a medical LLM to be evaluated, and applies a method for evaluating the medical LLM based on the entire conversation. That is, a dataset containing scenario information was created so that the agent engaging in a conversation with the medical LLM could participate in the conversation based on actual scenarios.
[0155] Therefore, the medical LLM can be evaluated on whether it can derive a thought flow leading to an accurate diagnosis by collecting information provided by the patient and whether it can effectively generate questions so that the patient can respond appropriately. Additionally, the patient agent (200) can perform the role of explaining their symptoms or situation as a patient based on the scenario information in the database, and can perform the role of responding faithfully and accurately when the medical LLM presents questions. => Therefore, a conversational evaluation set including the above conversation record information can be generated to derive a complex evaluation result for the medical LLM.
[0157] FIG. 7 schematically illustrates the process of performing the step of generating a response by a patient agent (200) according to one embodiment of the present invention.
[0159] In summary, in the response generation step, when the LLM (100) to be evaluated generates a question, the patient agent (200) extracts patient information regarding the question from the scenario information, and the patient agent (200) inputs the question, the patient information, and previous conversation record information into an LLM outside or inside the server system (1000) to generate a response to the question, and then transmits the response to the LLM to be evaluated (100).
[0161] As illustrated in FIG. 7, when the evaluation target LLM (100) generates a first question, the patient agent (200) randomly extracts one first patient information from the scenario information, and the patient agent (200) inputs the first question, the first patient information, and previous conversation record information into an LLM outside or inside the server system (1000) to generate a first response to the first question, and then transmits the first response to the evaluation target LLM (100).
[0162] At this time, the above scenario information includes patient information including the patient's symptoms and situation, and diagnostic information including a doctor's diagnosis result corresponding to the patient information, and a plurality of scenario information may be stored in the database.
[0163] Preferably, the LLM in FIG. 7 is a text-based language model, and when the patient agent (200) inputs a question, patient information, and previous conversation record information into the LLM, a request to generate a response to the question presented by the doctor from the perspective of the patient corresponding to the patient information based on the patient information and previous conversation record information may be input together.
[0165] FIG. 8 schematically illustrates the process of performing a medical LLM evaluation step according to one embodiment of the present invention.
[0167] In summary, the medical LLM evaluation stage can derive an evaluation result for the LLM (100) to be evaluated by inputting the conversation record information into the evaluation agent (300) and based on the conversation record information, previously stored scenario information, and previously set evaluation criteria.
[0169] Specifically, the medical LLM evaluation step may include: a conversation record information preprocessing step in which the conversation record information is input into an external or internal LLM of the server system (1000) to extract a conversation summary, a diagnosis result, and an inference process for the diagnosis result regarding the conversation record information; and an evaluation result derivation step in which the conversation record information, the conversation summary, the diagnosis result, and the inference process are input into the evaluation agent (300) to derive an evaluation result for the LLM (100) to be evaluated based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria.
[0171] As illustrated in FIG. 8, the conversation record information can be input into an external or internal LLM of the server system (1000) to extract a conversation summary, a diagnosis result, and an inference process regarding the diagnosis result. The conversation summary may correspond to text summarizing the conversation content included in the conversation record information, and the diagnosis result may correspond to a diagnosis name and a test name finally derived by the subject LLM (100) from the conversation record information. The inference process may include the conversation text between the subject LLM (100) and the patient agent (200) up to the point of deriving the diagnosis result.
[0172] Accordingly, the above diagnostic result may correspond to the above conversation result including a diagnosis name and test suggestion, and the above inference process may include a medical thought flow performed to derive a diagnostic result based on patient information collected by the evaluation target LLM (100).
[0173] That is, the evaluation agent (300) evaluates the above-mentioned diagnosis result to determine whether the subject LLM (100) has derived an accurate diagnosis, and evaluates the above-mentioned reasoning process to determine the logicality, consistency, and clinical validity of the reasoning of the subject LLM (100), thereby enabling the derivation of a complex and objective evaluation result for the subject LLM (100) that includes not only an evaluation of the result but also an evaluation of the reasoning process.
[0175] Preferably, thereafter, the conversation record information, the conversation summary, the diagnosis result, and the inference process are input into the evaluation agent (300) to derive an evaluation result for the evaluation target LLM (100) based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria.
[0176] At this time, each of the plurality of evaluation agents (300) can derive an evaluation result for the LLM (100) subject to evaluation, and the evaluation supervisor agent (400) can derive a final evaluation result based on the conversation record information, the scenario information, the evaluation criteria, and the plurality of evaluation results.
[0178] Through the steps described above, the present invention can extract conversation summaries, diagnostic results, and inference processes by preprocessing conversation record information to reflect a complex medical clinical environment beyond multiple choice, and can derive more systematic and complex evaluation results for medical LLM by evaluating each of them.
[0180] Preferably, the LLM in FIG. 8 is a text-based language model, and when inputting conversation record information into the LLM, a request may be input to summarize the conversation included in the conversation record information, derive a diagnosis result that is finally derived from the conversation record information, and derive an inference process for deriving the diagnosis result.
[0181] At this time, the LLM that generates a first response when the first question, first patient information, and previous conversation record information are input in Fig. 7 and the LLM that extracts the conversation summary, diagnosis result, and inference process from the conversation record information in Fig. 8 may correspond to different LLMs.
[0183] FIG. 9 schematically illustrates the process of performing a medical LLM evaluation step according to one embodiment of the present invention.
[0185] In summary, FIG. 9(a) illustrates the process of performing the step of evaluating the LLM (100) to be evaluated through an evaluation agent (300) and an evaluation supervision agent (400), and FIG. 9(b) illustrates the process of performing the step of evaluating the LLM (100) to be evaluated through a plurality of evaluation agents (300) and evaluation supervision agents (400).
[0187] Specifically, in the medical LLM evaluation stage, the conversation record information is input to each of the plurality of evaluation agents (300) to derive a plurality of evaluation results, and then the evaluation supervisory agent (400) can derive a final evaluation result based on the plurality of evaluation results, or the conversation record information is input to each of the plurality of evaluation agents (300) to derive a plurality of evaluation results, and then the evaluation supervisory agent (400) can derive a final evaluation result based on the conversation record information, the scenario information, the evaluation criteria, and the plurality of evaluation results.
[0189] In one embodiment of the present invention, the medical LLM evaluation step inputs the conversation record information to each of the plurality of evaluation agents (300) to derive a plurality of evaluation results, generates an evaluation vector for each of the plurality of evaluation results, calculates the cosine similarity between the evaluation vectors to quantitatively derive the degree of discrepancy, and if the degree of discrepancy exceeds a preset threshold, lowers the reliability of the evaluation agent (300) that generated the evaluation result by a preset ratio, and then the evaluation supervisor agent (400) applies a weight according to the reliability to the plurality of evaluation results to derive a final evaluation result.
[0191] As illustrated in FIG. 9(a), when the evaluation agent (300) derives an evaluation result, the evaluation supervisory agent (400) can derive a final evaluation result for the LLM (100) subject to evaluation based on the evaluation result. At this time, the evaluation supervisory agent (400) can derive a final evaluation result based on conversation record information, scenario information, evaluation criteria, and evaluation result.
[0193] As illustrated in FIG. 9(b), when each of the multiple evaluation agents (300) derives multiple evaluation results, the evaluation supervisory agent (400) can derive a final evaluation result for the LLM (100) subject to evaluation based on the multiple evaluation results.
[0194] At this time, the evaluation supervisor agent (400) can derive a final evaluation result based on the above multiple evaluation results, or the evaluation supervisor agent (400) can derive a final evaluation result based on conversation record information, scenario information, evaluation criteria, and multiple evaluation results.
[0195] Accordingly, based on the above multiple evaluation results, the consistency, reliability, response diversity, and error patterns of the LLM (100) to be evaluated can be analyzed multidimensionally to derive a final evaluation result including a comprehensive evaluation.
[0197] In one embodiment of the present invention, the conversation record information is input to each of the plurality of evaluation agents (300) to derive a plurality of evaluation results, and then an evaluation vector for each evaluation item can be generated for each of the plurality of evaluation results. At this time, an evaluation vector for each evaluation item can be generated for each of the plurality of evaluation results according to the evaluation criteria, and for example, each evaluation vector can be derived by embedding text for the plurality of evaluation results.
[0198] Afterwards, the degree of discrepancy is quantitatively derived by calculating the cosine similarity between the evaluation vectors, and if the degree of discrepancy exceeds a preset threshold, the reliability of the evaluation agent (300) that generated the evaluation result is lowered by a preset ratio, and then the evaluation supervisory agent (400) can derive a final evaluation result by applying a weight according to the reliability to the plurality of evaluation results.
[0200] For example, the same conversation record information can be input into evaluation agent #1 (300.1) and evaluation agent #2 (300.2), respectively, to derive evaluation result #1 and evaluation result #2, and then evaluation vector #1 and evaluation vector #2 can be generated for each evaluation item for evaluation result #1 and evaluation result #2, respectively. Subsequently, the cosine similarity between evaluation vector #1 and evaluation vector #2 is calculated to quantitatively derive the degree of discrepancy, and if the degree of discrepancy exceeds a preset threshold, the reliability of evaluation agent #1 (300.1) and evaluation agent #2 (300.2) that generated evaluation result #1 and evaluation result #2 is lowered by a preset ratio, and then the evaluation supervisor agent (400) can derive the final evaluation result by applying a weight according to the reliability to evaluation result #1 and evaluation result #2.
[0201] At this time, as the number of evaluation agents (300) increases, the reliability based on the degree of inconsistency between evaluation agents (300) can be applied more accurately.
[0202] Therefore, since the final evaluation result is derived by applying weights based on the reliability of the evaluation agent (300) in real time, the reliability of the final evaluation result for the LLM (100) to be evaluated can be managed, so that the medical LLM corresponding to the LLM (100) to be evaluated can be evaluated accurately and reliably.
[0204] Preferably, the evaluation agent (300) and the evaluation supervision agent (400) may know the scenario information stored in the database in advance and derive an evaluation result for the LLM (100) to be evaluated based on the said scenario information, or may derive an evaluation result for the LLM (100) to be evaluated based on said scenario information by inputting the said scenario information to the evaluation agent (300) and the evaluation supervision agent (400).
[0205] At this time, since evaluation criteria are required for the evaluation agent (300) to derive evaluation results for medical LLM, the evaluation agent (300) can be trained in advance through prompt engineering, and to save time and cost, the evaluation agent (300) rather than a person evaluates the medical LLM, but to overcome the reliability of the evaluation, multiple evaluation agents (300) can perform the same task simultaneously for cross-verification.
[0206] Afterwards, the evaluation supervisor (400) can derive the final evaluation results for the medical LLM by playing a role of finally compiling and concluding the evaluation results.
[0208] The medical LLM evaluation method of the present invention overcomes the limitations of conventional methods for evaluating LLMs, which are composed mainly of performance indicators, and can provide an evaluation system that ensures the reliability and safety of medical LLMs in actual medical settings. By ensuring the reliability and safety of medical LLMs, risks such as initial development and operation costs can be minimized, and by maximizing the effectiveness of medical LLM adoption, it can contribute to cost reduction and improved profitability for hospitals.
[0209] In particular, the present invention quantifies the evaluation results into a multidimensional evaluation vector and objectively calculates the degree of discrepancy between evaluation results through mathematical methods such as cosine similarity, thereby reflecting the reliability of the evaluation agent (300) in real time to derive the final evaluation result, which can effectively resolve the problem of the reliability of evaluation results that was difficult to solve in the existing LLM evaluation method.
[0211] At this time, the medical LLM evaluation method of the present invention can evaluate various aspects of the actual role of a doctor, such as smoothly leading a conversation with a patient and accurately deriving a conversation result including a diagnosis name and test suggestion, going beyond merely determining whether the evaluation target LLM (100) corresponding to the medical LLM accurately derives a diagnosis.
[0213] In particular, if the reasoning process of the medical LLM is incorrect but the diagnosis result is accurately derived, it may be evaluated as the correct answer even though it corresponds to a hallucination of the LLM. Therefore, if the dataset is not interactive, it may not reflect reality and thus may not yield accurate evaluation results. Consequently, a method is required to evaluate the LLM comprehensively, including the reasoning process and diagnosis results, based on interactive and open datasets regarding the subject of evaluation. Accordingly, these limitations can be overcome through a simulation environment in which the subject LLM (100) acting as a doctor and the patient agent (200) acting as a patient are used, as in the present invention.
[0215] FIG. 10 illustrates, in an exemplary manner, the internal configuration of a computing device (11000) according to one embodiment of the present invention.
[0217] The server system (1000) mentioned in the description of FIG. 1 may include components of the computing device (11000) illustrated in FIG. 10, which will be described later.
[0219] As illustrated in FIG. 10, the computing device (11000) may include at least one processor (11100), memory (11200), peripheral interface (11300), input / output subsystem (I / O subsystem) (11400), power circuit (11500), and communication circuit (11600).
[0221] Specifically, the memory (11200) may include, for example, high-speed random access memory, magnetic disk, SRAM, DRAM, ROM, flash memory, or non-volatile memory. The memory (11200) may include software modules, instruction sets, or various other data required for the operation of the computing device (11000).
[0222] At this time, access to the memory (11200) from other components, such as the processor (11100) or the peripheral device interface (11300), can be controlled by the processor (11100). The processor (11100) may be composed of a single or multiple units and may include processors in the form of GPUs and TPUs to improve computational processing speed.
[0223] The above peripheral device interface (11300) can connect input and / or output peripheral devices of the computing device (11000) to the processor (11100) and the memory (11200). The processor (11100) can perform various functions for the computing device (11000) and process data by executing a software module or instruction set stored in the memory (11200).
[0224] The input / output subsystem (11400) may connect various input / output peripheral devices to the peripheral device interface (11300). For example, the input / output subsystem (11400) may include a controller for connecting peripheral devices such as a monitor, keyboard, mouse, printer, or, if necessary, a touchscreen or sensor to the peripheral device interface (11300). According to another aspect, the input / output peripheral devices may be connected to the peripheral device interface (11300) without passing through the input / output subsystem (11400).
[0225] The power circuit (11500) may supply power to all or part of the components of the terminal. For example, the power circuit (11500) may include one or more power sources such as a power management system, a battery or alternating current (AC), a charging system, a power failure detection circuit, a power converter or inverter, a power status indicator, or any other components for power generation, management, and distribution.
[0226] The communication circuit (11600) may enable communication with another computing device using at least one external port. Alternatively, as described above, the communication circuit (11600) may enable communication with another computing device by including an RF circuit and transmitting and receiving an RF signal, also known as an electromagnetic signal, as needed.
[0228] The embodiment of FIG. 10 is merely an example of the computing device (11000), and the computing device (11000) may have some components shown in FIG. 10 omitted, additional components not shown in FIG. 10 added, or a configuration or arrangement that combines two or more components. For example, a computing device for a communication terminal in a mobile environment may include a touchscreen or sensors in addition to the components shown in FIG. 10, and the communication circuit (1160) may include a circuit for RF communication of various communication methods (Wi-Fi, 3G, LTE, 5G, 6G, Bluetooth, NFC, Zigbee, etc.). The components that can be included in the computing device (11000) may be implemented as hardware, software, or a combination of both hardware and software, including one or more integrated circuits specialized for signal processing or applications.
[0229] Methods according to embodiments of the present invention may be implemented in the form of program instructions that can be executed through various computing devices and recorded on a computer-readable medium. In particular, the program according to the present embodiment may be configured as a PC-based program or an application dedicated to a mobile terminal. An application to which the present invention is applied may be installed on a user terminal through a file provided by a file distribution system. For example, the file distribution system may include a file transmission unit (not shown) that transmits the file upon a request from the user terminal.
[0231] The device described above may be implemented as a hardware component, a software component, and / or a combination of a hardware component and a software component. For example, the device and components described in the embodiments may be implemented using one or more general-purpose or special-purpose computers, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing unit may execute an operating system (OS) and one or more software applications executed on said operating system. Additionally, the processing unit may access, store, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, the processing unit may be described as being used as a single unit, but those skilled in the art will understand that the processing unit may include multiple processing elements and / or multiple types of processing elements. For example, the processing unit may include multiple processors or one processor and one controller. In addition, other processing configurations, such as parallel processors, are also possible.
[0232] Software may include computer programs, code, instructions, or a combination of one or more of these, and may configure a processing unit to operate as desired or command the processing unit independently or collectively. Software and / or data may be permanently or temporarily embodied in any type of machine, component, physical device, virtual equipment, computer storage medium or device, or transmitted signal wave in order to be interpreted by the processing unit or to provide instructions or data to the processing unit. Software may be standardized and stored or executed in a standardized manner on a networked computing device. Software and data may be stored on one or more computer-readable recording media.
[0233] The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc., either alone or in combination. The program instructions recorded on the medium may be those specifically designed and configured for the embodiment, or they may be those known and available to those skilled in the art of computer software. Examples of 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; magneto-optical media such as floptical disks; and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, and flash memory. Examples of program instructions include machine code, such as that generated by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc. The hardware devices described above may be configured to operate as one or more software modules to perform the operation of the embodiment, and vice versa.
[0235] According to one embodiment of the present invention, the effect of generating conversation record information that can evaluate the subject LLM can be achieved through a simulation in which the subject LLM and the patient agent play the roles of doctor and patient.
[0236] According to one embodiment of the present invention, the effect of automatically evaluating the subject LLM according to evaluation criteria through an evaluation agent can be achieved.
[0237] According to one embodiment of the present invention, by generating a response to a question based on scenario information, a patient agent can achieve the effect of enabling a simulation that reflects the actual environment.
[0238] According to one embodiment of the present invention, the effect of objectively evaluating the overall performance of medical LLM can be achieved through dynamic interactive simulation that reflects an actual clinical environment.
[0239] According to one embodiment of the present invention, by utilizing conversation record information generated through repeated interaction between a patient agent and a medical LLM based on the patient's symptoms and situation, it is possible to achieve the effect of comprehensively evaluating the medical LLM's questioning ability, information gathering ability, reasoning logic, diagnostic accuracy, and communication ability with the patient.
[0240] According to one embodiment of the present invention, by extracting conversation summaries, diagnostic results, and inference results from conversation record information and processing them into structured information, it is possible to achieve the effect of deeply analyzing and evaluating the thought flow and inference process of medical LLM.
[0241] According to one embodiment of the present invention, by utilizing a plurality of evaluation agents and comparing evaluation results to dynamically adjust the reliability of the evaluation, the reliability, objectivity, and consistency of the evaluation can be improved.
[0242] According to one embodiment of the present invention, the performance of medical LLM can be verified accurately and quantitatively, and high reliability and objectivity in the evaluation can be secured, thereby enabling the effect of contributing to the development of a safe AI-based diagnostic and decision support system in the medical field.
[0243] According to one embodiment of the present invention, by ensuring the reliability and safety of the AI model, risks such as initial development and operation costs are minimized, thereby maximizing the effectiveness of AI adoption and contributing to cost reduction and improved profitability of the hospital.
[0245] Although the embodiments have been described above with reference to limited examples and drawings, those skilled in the art can make various modifications and variations from the description above. For example, suitable results may be achieved even if the described techniques are performed in a different order than described, and / or if the components of the described system, structure, device, circuit, etc. are combined or assembled in a form different from described, or replaced or substituted by other components or equivalents. Therefore, other implementations, other embodiments, and equivalents to the claims below are also within the scope of the claims.
Claims
Claim 1 A simulation-based medical LLM evaluation method using a multi-agent system comprising one or more processors and one or more memories, comprising: a conversation record information generation step in which a patient agent repeatedly performs a process of generating a response to a question when the LLM to be evaluated generates a question, thereby generating conversation record information composed of a question and a response; and a medical LLM evaluation step in which the conversation record information is input to each of a plurality of evaluation agents to derive a plurality of evaluation results for the LLM to be evaluated based on the corresponding conversation record information, previously stored scenario information, and previously set evaluation criteria, and an evaluation supervisor agent derives a final evaluation result based on the plurality of evaluation results; wherein the conversation record information generation step comprises: a question generation step in which the LLM to be evaluated generates a question; and a response generation step in which the patient agent randomly extracts one patient information from among a plurality of scenario information previously stored in a database and generates a response to the question by referencing the corresponding patient information, wherein the scenario information includes patient information including the patient's symptoms and situation, and diagnostic information including a doctor's diagnosis result corresponding to the corresponding patient information. A feedback derivation step for a critique agent including a medical LLM that assists in the reasoning of the LLM to be evaluated, wherein the critique agent inputs the conversation record information to examine problems regarding the reasoning of the LLM to be evaluated, derives feedback, and transmits it to the LLM to be evaluated;...including, in the question generation step, the LLM subject to evaluation generates the question by reflecting the feedback, and the patient information referenced in the response generation step is randomly extracted after excluding information where the similarity exceeds a preset exclusion criterion by calculating the cosine similarity between a first vector derived by embedding previously extracted patient information and diagnostic information corresponding to that patient information among the plurality of scenario information, and each second vector derived by embedding the remaining patient information and diagnostic information among the plurality of scenario information, and the medical LLM evaluation step generates an evaluation vector for each evaluation item for each of the plurality of evaluation results, calculates the cosine similarity between the evaluation vectors to quantitatively derive the degree of discrepancy, and if the degree of discrepancy exceeds a preset threshold, lowers the reliability of the evaluation agent who generated the evaluation result by a preset ratio, and then the evaluation supervisory agent derives the final evaluation result by applying a weight based on the reliability to the plurality of evaluation results, and the LLM subject to evaluation receives information including text from the patient, generates a question to be presented to the patient, and in the conversation record with the patient A medical LLM evaluation method corresponding to a deep learning-based language model trained to predict a patient's disease based on. Claim 2 delete Claim 3 A medical LLM evaluation method according to claim 1, wherein the response generation step comprises: when the LLM to be evaluated generates a first question, the patient agent extracts first patient information regarding the first question from the scenario information; and the patient agent inputs the first question, the first patient information, and previous conversation record information into an LLM outside or inside the server system to generate a first response to the first question, and then transmits the first response to the LLM to be evaluated. Claim 4 A medical LLM evaluation method according to claim 1, wherein the question generation step comprises: the subject LLM generating a question capable of eliciting patient information including the patient's symptoms and situation from the patient agent; the subject LLM collecting patient information stepwise according to the patient agent's response; and generating a conversation result including deriving a diagnosis name and suggesting tests based on the collected patient information. Claim 5 delete Claim 6 A medical LLM evaluation method according to claim 1, wherein the medical LLM evaluation step comprises: a conversation record information preprocessing step of inputting the conversation record information into an LLM outside or inside a server system to extract a conversation summary, a diagnosis result, and an inference process for the diagnosis result regarding the conversation record information; and an evaluation result derivation step of inputting the conversation record information, the conversation summary, the diagnosis result, and the inference process into an evaluation agent to derive an evaluation result for the LLM to be evaluated based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria. Claim 7 A medical LLM evaluation method according to claim 1, wherein the medical LLM evaluation step inputs the conversation record information to each of a plurality of evaluation agents to derive a plurality of evaluation results, and an evaluation supervision agent derives a final evaluation result based on the plurality of evaluation results. Claim 8 A medical LLM evaluation method according to claim 1, wherein the medical LLM evaluation step inputs the conversation record information to each of a plurality of evaluation agents to derive a plurality of evaluation results, and an evaluation supervisory agent derives a final evaluation result based on the conversation record information, the scenario information, the evaluation criteria, and the plurality of evaluation results. Claim 9 delete Claim 10 A server system comprising one or more processors and one or more memories, and performing a simulation-based medical LLM evaluation method using a multi-agent, comprising: a conversation record information generation unit that generates conversation record information composed of questions and answers by repeatedly performing a process in which a patient agent generates a response to a question when an LLM to be evaluated generates a question; and a medical LLM evaluation unit that inputs the conversation record information to each of a plurality of evaluation agents to derive a plurality of evaluation results for the LLM to be evaluated based on the corresponding conversation record information, previously stored scenario information, and previously set evaluation criteria, and then an evaluation supervisor agent derives a final evaluation result based on the plurality of evaluation results; wherein the conversation record information generation unit comprises: a question generation unit in which the LLM to be evaluated generates a question; and a response generation unit in which the patient agent randomly extracts one patient information from among a plurality of scenario information previously stored in a database and generates a response to the question by referencing the corresponding patient information, wherein the scenario information includes patient information including the patient's symptoms and situation, and diagnostic information including a doctor's diagnosis result corresponding to the corresponding patient information. A feedback derivation unit for a critique agent including a medical LLM that assists in the inference of the LLM to be evaluated, inputting the conversation record information into the critique agent to review problems regarding the inference of the LLM to be evaluated, deriving feedback, and transmitting it to the LLM to be evaluated;It includes, wherein in the question generation unit, the LLM subject to evaluation generates the question by reflecting the feedback, and the patient information referenced in the response generation unit is randomly extracted after excluding information whose similarity exceeds a preset exclusion criterion by calculating the cosine similarity between a first vector derived by embedding previously extracted patient information and diagnostic information corresponding to that patient information among the plurality of scenario information, and each second vector derived by embedding the remaining patient information and diagnostic information among the plurality of scenario information, and the medical LLM evaluation unit generates an evaluation vector for each evaluation item for each of the plurality of evaluation results, calculates the cosine similarity between the evaluation vectors to quantitatively derive the degree of discrepancy, and if the degree of discrepancy exceeds a preset threshold, lowers the reliability of the evaluation agent who generated the evaluation result by a preset ratio, and then the evaluation supervisory agent derives the final evaluation result by applying a weight based on the reliability to the plurality of evaluation results, and the LLM subject to evaluation receives information including text from the patient, generates a question to be presented to the patient, and based on the conversation record with the patient A server system corresponding to a deep learning-based language model trained to predict a patient's disease.; Claim 11 delete Claim 12 A server system according to claim 10, wherein the response generation unit, when the LLM subject to evaluation generates a first question, the patient agent extracts first patient information regarding the first question from the scenario information, and the patient agent inputs the first question, the first patient information, and previous conversation record information into an LLM outside or inside the server system to generate a first response to the first question, and then transmits the first response to the LLM subject to evaluation. Claim 13 A server system according to claim 10, wherein the question generation unit generates a question that can elicit patient information including the patient's symptoms and situation from the patient agent, the evaluation target LLM collects patient information step by step according to the patient agent's response, and generates a conversation result including derivation of a diagnosis name and a test suggestion based on the collected patient information. Claim 14 delete Claim 15 A server system according to claim 10, wherein the medical LLM evaluation unit comprises: a conversation record information preprocessing unit that inputs the conversation record information into an LLM outside or inside the server system to extract a conversation summary, a diagnosis result, and an inference process for the diagnosis result regarding the conversation record information; and an evaluation result derivation unit that inputs the conversation record information, the conversation summary, the diagnosis result, and the inference process into the evaluation agent to derive an evaluation result for the LLM to be evaluated based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria. Claim 16 A server system according to claim 10, wherein the medical LLM evaluation unit inputs the conversation record information to each of a plurality of evaluation agents to derive a plurality of evaluation results, and an evaluation supervision agent derives a final evaluation result based on the plurality of evaluation results. Claim 17 A server system according to claim 10, wherein the medical LLM evaluation unit inputs the conversation record information to each of the plurality of evaluation agents to derive a plurality of evaluation results, and an evaluation supervision agent derives a final evaluation result based on the conversation record information, the scenario information, the evaluation criteria, and the plurality of evaluation results. Claim 18 delete Claim 19 A computer-readable storage medium for implementing a simulation-based medical LLM evaluation method using a multi-agent, performed on a server system comprising one or more processors and one or more memories, wherein the computer-readable storage medium comprises computer-executable instructions that cause the server system to perform the following steps, and the following steps include: a conversation record information generation step in which, when an LLM to be evaluated generates a question, a patient agent repeatedly performs a process of generating an answer to the said question to generate conversation record information consisting of a question and an answer; The method includes a medical LLM evaluation step in which the conversation record information is input to each of a plurality of evaluation agents to derive a plurality of evaluation results for the LLM subject to evaluation based on the corresponding conversation record information, previously stored scenario information, and previously set evaluation criteria, and an evaluation supervisory agent derives a final evaluation result based on the plurality of evaluation results; wherein the conversation record information generation step comprises: a question generation step in which the LLM subject to evaluation generates a question; a response generation step in which the patient agent randomly extracts one of the patient information among a plurality of scenario information previously stored in a database and generates a response to the question by referencing the corresponding patient information, wherein the scenario information includes patient information including the patient's symptoms and situation, and diagnostic information including a doctor's diagnosis result corresponding to the corresponding patient information; and a feedback derivation step in which, for a critique agent including a medical LLM that assists in the inference of the LLM subject to evaluation, the conversation record information is input to the critique agent to review problems regarding the inference of the LLM subject to evaluation, derive feedback, and transmit it to the LLM subject to evaluation....including, in the question generation step, the LLM subject to evaluation generates the question by reflecting the feedback, and the patient information referenced in the response generation step is randomly extracted after excluding information where the similarity exceeds a preset exclusion criterion by calculating the cosine similarity between a first vector derived by embedding previously extracted patient information and diagnostic information corresponding to that patient information among the plurality of scenario information, and each second vector derived by embedding the remaining patient information and diagnostic information among the plurality of scenario information, and the medical LLM evaluation step generates an evaluation vector for each evaluation item for each of the plurality of evaluation results, calculates the cosine similarity between the evaluation vectors to quantitatively derive the degree of discrepancy, and if the degree of discrepancy exceeds a preset threshold, lowers the reliability of the evaluation agent who generated the evaluation result by a preset ratio, and then the evaluation supervisory agent derives the final evaluation result by applying a weight based on the reliability to the plurality of evaluation results, and the LLM subject to evaluation receives information including text from the patient, generates a question to be presented to the patient, and in the conversation record with the patient A computer-readable storage medium corresponding to a deep learning-based language model trained to predict a patient's disease based on. Claim 20 A computer-readable storage medium according to claim 19, wherein the medical LLM evaluation step comprises: a conversation record information preprocessing step of inputting the conversation record information into an LLM outside or inside a server system to extract a conversation summary, a diagnosis result, and an inference process for the diagnosis result regarding the conversation record information; and an evaluation result derivation step of inputting the conversation record information, the conversation summary, the diagnosis result, and the inference process into an evaluation agent to derive an evaluation result for the LLM to be evaluated based on the conversation record information, the conversation summary, the diagnosis result, the inference process, the previously stored scenario information, and the previously set evaluation criteria.