Method and apparatus for obtaining analysis result for medical data using large language model
The integration of Retrieval Augmented Generation technology with LLMs and a reference medical database addresses the issue of outdated data in LLMs, improving the accuracy and reliability of medical data analysis.
Patent Information
- Application Number
- PCT/KR2025/009492
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-08
- Filing Date
- 2025-07-03
- Publication Date
- 2026-01-15
AI Technical Summary
Large-scale language models (LLMs) lack access to up-to-date information not included in their training data, limiting their ability to provide accurate and reliable analysis results for medical data.
A method utilizing Retrieval Augmented Generation (RAG) technology to connect LLMs with a reference medical database, enabling the retrieval and utilization of relevant information to generate more accurate analysis results for medical data.
Enhances the accuracy and reliability of medical data analysis by incorporating up-to-date information, addressing the limitations of LLMs in accessing current data.
Smart Images

Figure KR2025009492_15012026_PF_FP_ABST
Abstract
Description
Method and device for obtaining analysis results for medical data using a large-scale language model
[0001] The present disclosure relates to a method and device for analyzing medical data, and more particularly, to a method and device for obtaining analysis results for medical data using a large-scale language model.
[0002] Large Language Models (LLMs) are arguably the pinnacle of Natural Language Processing (NLP), a branch of artificial intelligence. They possess the ability to understand and generate human language by learning massive amounts of text data. Recent advances in deep learning and increased computing power have led to dramatic performance improvements in LLMs, surpassing existing language models in terms of scale and complexity. Beyond text generation, LLMs demonstrate exceptional performance in a variety of Natural Language Processing (NLP) tasks, including translation, summarization, question-answering, and sentiment analysis, opening up new possibilities in data analysis. They excel in analyzing unstructured data, contributing to the discovery of complex patterns and insights previously difficult to process with conventional analysis methods. Consequently, LLMs are gaining recognition as a key technology that expands the scope of data analysis and enhances the efficiency and accuracy of data-driven decision-making.
[0003] While LLMs are trained on vast amounts of text data and can perform a variety of tasks, they face limitations: they lack access to up-to-date information not included in the training data. Retrieval Augmented Generation (RAG) technology connects LLMs with databases, enabling them to retrieve and utilize relevant information when generating responses to user queries. Applying RAG technology to LLMs can overcome these limitations and generate more accurate and reliable answers that reflect up-to-date information.
[0004] Korean Patent Publication No. 10-2023-0007926 (published on January 13, 2023) discloses a method for analyzing medical data.
[0005] This disclosure, developed in response to the aforementioned background technology, addresses the problem of analyzing medical data using a large-scale language model. For example, the present disclosure addresses the problem of acquiring target medical data from a target medical data group selected as an analysis target and obtaining analysis results for the target medical data using a large-scale language model.
[0006] Meanwhile, the technical task to be achieved by the present disclosure is not limited to the technical task mentioned above, and may include various technical tasks within a scope obvious to a person skilled in the art from the contents described below.
[0007] According to one aspect of the present disclosure for achieving the aforementioned task, a method for obtaining analysis results for medical data using a large-scale language model, which is performed by a computing device, is provided. The method may include the steps of: determining a first target medical data group to be analyzed from among a plurality of medical data groups; receiving a natural language question text from a user; obtaining reference medical information related to the natural language question text from a reference medical database; generating a first structured query text corresponding to the natural language question text from a first prompt including the reference medical information and the natural language question text using a first large language model (LLM); obtaining first target medical data corresponding to the first structured query text from the first target medical data group using the first structured query text; and generating an analysis result for the first target medical data from a second prompt including the natural language question text and the first target medical data using a second large language model.
[0008] In one embodiment, the first target medical data group may have at least one of a data structure in the form of a data frame, a data structure of a relational database (RDB), or a data structure of a common data model.
[0009] In one embodiment, the reference medical database may store at least one of a plurality of reference medical information or a plurality of reference embedding vectors corresponding to the plurality of reference medical information, and may receive updated medical information at a preset period and store the received updated medical information or the embedding vector corresponding to the received updated medical information.
[0010] In one embodiment, the reference medical database corresponds to a vector database that implements a vector-based search environment, and the step of obtaining the reference medical information may include: converting the natural language question text into a natural language question vector corresponding to the natural language question text; obtaining a reference embedding vector corresponding to the natural language question vector from the reference medical database based on vector similarity between the natural language question vector and a plurality of reference embedding vectors included in the reference medical database; and obtaining the reference medical information related to the natural language question text by converting the reference embedding vector into text.
[0011] In one embodiment, the step of obtaining the reference medical information includes: extracting at least one medical keyword from the natural language question text; and obtaining the reference medical information including the at least one medical keyword from the reference medical database, wherein the at least one medical keyword may include at least one of drug information or disease information.
[0012] In one embodiment, the step of obtaining the reference medical information may include: if the first text included in the natural language question text violates a predefined security rule, changing or deleting the first text from the natural language question text; and obtaining reference medical information related to the natural language question text in which the first text is changed or deleted from a reference medical database.
[0013] In one embodiment, the first prompt may further include structure information of the first target medical data group and instruction text that instructs to generate the first structured query text corresponding to the first target medical data group.
[0014] In one embodiment, the step of generating the first structured query text may include: generating an augmented natural language question text by reflecting the reference medical information into the natural language question text; and generating the first structured query text from the first prompt including the augmented natural language question text using the first large-scale language model.
[0015] In one embodiment, the second prompt may include the augmented natural language question text and the first target medical data.
[0016] In one embodiment, the step of generating the first structured query text includes the step of outputting the first structured query text and an augmented natural language question text from the first prompt using the first large-scale language model, wherein the augmented natural language question text is a text in which the reference medical information is reflected in the natural language question text, and the second prompt may include the augmented natural language question text and the first target medical data.
[0017] In one embodiment, the step of acquiring the first target medical data may include: executing the first structured query text for the first target medical data group to determine whether an error occurs in the first structured query text; correcting an error in the first structured query text when an error occurs in the first structured query text; and repeating the process of executing and correcting an error in the first structured query text within a preset number of repetitions to acquire the first target medical data corresponding to the first structured query text in the first target medical data group.
[0018] In one embodiment, the step of generating an analysis result for the first target medical data may include: if the first target medical data includes personal information, a step of de-identifying the personal information; and a step of generating an analysis result for the first target medical data from the second prompt including the natural language question text and the first target medical data with the personal information de-identified using the second large-scale language model.
[0019] In one embodiment, the first large-scale language model may correspond to a large-scale language model that is fine-tuned to take natural language question text as input and output structured query text through a first learning data set including natural language question text and structured query text.
[0020] In one embodiment, the second large-scale language model may correspond to a large-scale language model that is fine-tuned to take natural language question text and medical data as input and output analysis results for the medical data through a second learning data set including natural language question text, medical data, and analysis results for the medical data.
[0021] In one embodiment, the method may further include: determining a second target medical data group to be analyzed from among the plurality of medical data groups; generating a second structured query text corresponding to the natural language question text from a third prompt including the reference medical information, the natural language question text, and structure information of the second target medical data group using the first large-scale language model; obtaining second target medical data corresponding to the second structured query text from the second target medical data group using the second structured query text; generating an analysis result for the second target medical data from a fourth prompt including the natural language question text and the second target medical data using the second large-scale language model; and generating a comparison result by comparing the analysis result for the first target medical data with the analysis result for the second target medical data.
[0022] In one embodiment, the method may further include: determining a second target medical data group to be analyzed from among the plurality of medical data groups; generating a second structured query text corresponding to the natural language question text from a third prompt including the reference medical information, the natural language question text, and structure information of the second target medical data group using the first large-scale language model; obtaining second target medical data corresponding to the second structured query text from the second target medical data group using the second structured query text; and generating an integrated analysis result for the first target medical data and the second target medical data from a fifth prompt including the natural language question text, the first target medical data, and the second target medical data using the second large-scale language model.
[0023] In one embodiment, the reference medical information has a data format other than text format, and the first large-scale language model may correspond to a pre-trained multimodal large-scale language model that processes the data format of the reference medical information.
[0024] In one embodiment, the first target medical data has a data format other than text format, and the second large-scale language model may correspond to a pre-trained multimodal large-scale language model that processes the data format of the first target medical data.
[0025] According to one aspect of the present disclosure, a computing device for obtaining analysis results for medical data using a large-scale language model is provided. The computing device includes a processor including at least one core; a memory storing a computer program executable by the processor; and a network unit, wherein the processor determines a first target medical data group to be analyzed from among a plurality of medical data groups, receives a natural language question text from a user, obtains reference medical information related to the natural language question text from a reference medical database, generates a first structured query text corresponding to the natural language question text from a first prompt including the reference medical information and the natural language question text using a first large language model (LLM), obtains first target medical data corresponding to the first structured query text from the first target medical data group using the first structured query text, and generates an analysis result for the first target medical data from a second prompt including the natural language question text and the first target medical data using a second large language model.
[0026] According to one aspect of the present disclosure, a computer program stored in a computer-readable storage medium is provided. The computer program causes a processor of a computing device to perform a method for obtaining analysis results for medical data using a large-scale language model, the method including: determining a first target medical data group to be analyzed from among a plurality of medical data groups; receiving a natural language question text from a user; obtaining reference medical information related to the natural language question text from a reference medical database; generating a first structured query text corresponding to the natural language question text from a first prompt including the reference medical information and the natural language question text using a first large language model (LLM); obtaining first target medical data corresponding to the first structured query text from the first target medical data group using the first structured query text; and generating an analysis result for the first target medical data from a second prompt including the natural language question text and the first target medical data using a second large language model.
[0027] According to some embodiments of the present disclosure, analysis results for medical data can be obtained using a large-scale language model.
[0028] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the description below.
[0029] Various aspects are now described with reference to the drawings, wherein like reference numerals are used to refer to similar elements throughout. In the following examples, for purposes of explanation, numerous specific details are set forth to provide a thorough understanding of one or more aspects. However, it will be apparent that such aspects may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form to facilitate the description of one or more aspects.
[0030] FIG. 1 is a block diagram of a computing device that obtains analysis results for medical data using a large-scale language model according to one embodiment of the present disclosure.
[0031] FIG. 2 is a schematic diagram illustrating a network function according to one embodiment of the present disclosure.
[0032] FIG. 3 is a flowchart illustrating a method for a computing device to obtain analysis results for medical data according to one embodiment of the present disclosure.
[0033] FIG. 4 is a block diagram illustrating a plurality of modules included in a medical data analysis system implemented by a computing device according to one embodiment of the present disclosure.
[0034] FIG. 5 is a schematic diagram illustrating operations performed by a system environment setting module included in a computing device according to one embodiment of the present disclosure.
[0035] FIG. 6 is a schematic diagram illustrating operations performed by a question preprocessing module included in a computing device according to one embodiment of the present disclosure.
[0036] FIG. 7 is a schematic diagram illustrating operations performed by a medical data acquisition module included in a computing device according to one embodiment of the present disclosure.
[0037] FIG. 8 is a schematic diagram illustrating operations performed by an analysis result generation module included in a computing device according to one embodiment of the present disclosure.
[0038] FIG. 9 is a simplified, general schematic diagram of an exemplary computing environment in which embodiments of the present disclosure may be implemented.
[0039] Various embodiments are now described with reference to the drawings. In this specification, various descriptions are provided to facilitate understanding of the present disclosure. However, it will be apparent that these embodiments may be practiced without these specific details.
[0040] As used herein, the terms "component," "module," "system," and the like refer to computer-related entities, hardware, firmware, software, a combination of software and hardware, or an execution of software. For example, a component may be, but is not limited to, a procedure running on a processor, a processor, an object, a thread of execution, a program, and / or a computer. For example, both an application running on a computing device and the computing device may be a component. One or more components may reside within a processor and / or a thread of execution. A component may be localized within a single computer. A component may be distributed between two or more computers. Furthermore, these components may execute from various computer-readable media having various data structures stored therein. Components may communicate via local and / or remote processes, for example, by signals comprising one or more data packets (e.g., data from one component interacting with another component in a local system, a distributed system, and / or data transmitted to another system via a network such as the Internet via signals).
[0041] Furthermore, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or." That is, unless otherwise specified or clear from context, "X employs A or B" is intended to mean either of the natural inclusive permutations. That is, if X employs A; X employs B; or X employs both A and B, "X employs A or B" can apply to any of these cases. Furthermore, the terms "or" and "and / or" as used herein should be understood to refer to and include all possible combinations of one or more of the associated items listed.
[0042] Additionally, the terms "comprises" and / or "comprising" should be understood to imply the presence of the features and / or components in question. However, it should be understood that the terms "comprises" and / or "comprising" do not exclude the presence or addition of one or more other features, components, and / or groups thereof. Furthermore, unless otherwise specified or clear from the context to refer to the singular form, the singular in the specification and claims should generally be construed to mean "one or more."
[0043] And, the term "at least one of A or B" should be interpreted to mean "if it includes only A", "if it includes only B", or "if it is combined in the composition of A and B".
[0044] Those skilled in the art should further appreciate that the various illustrative logical blocks, configurations, modules, circuits, means, logics, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, blocks, configurations, means, logics, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application. However, such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
[0045] The description of the disclosed embodiments is provided to enable a person skilled in the art to make or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art. The general principles defined herein may be applied to other embodiments without departing from the scope of the present disclosure. Therefore, the present invention is not limited to the embodiments disclosed herein. The present invention is to be construed in the widest scope consistent with the principles and novel features disclosed herein.
[0046] In the present disclosure, terms expressed as N, such as first, second, or third, are used to distinguish at least one entity. For example, entities expressed as first and second may be the same or different from each other.
[0047] FIG. 1 is a block diagram of a computing device that obtains analysis results for medical data using a large-scale language model according to one embodiment of the present disclosure.
[0048] The configuration of the computing device (100) illustrated in FIG. 1 is merely a simplified example. In one embodiment of the present disclosure, the computing device (100) may include other configurations for performing the computing environment of the computing device (100), and only some of the disclosed configurations may constitute the computing device (100).
[0049] A computing device (100) according to some embodiments of the present disclosure may be a device for obtaining analysis results for medical data using a large-scale language model. The computing device (100) may include any type of server and / or any type of device. The server may include any type of computer system or computer device, such as a microprocessor, a mainframe computer, a digital processor, a portable device, or a device controller.
[0050] A computing device (100) may include a processor (110), memory (130), and network unit (150).
[0051] The processor (110) may be configured with one or more cores and may include a processor for performing operations related to data processing, such as a central processing unit (CPU), a general purpose graphics processing unit (GPGPU), and a tensor processing unit (TPU) of the computing device (100). The processor (110) may read a computer program stored in the memory (130) and perform operations for obtaining an analysis result for medical data according to an embodiment of the present disclosure. That is, the computer program stored in a computer-readable storage medium (e.g., the memory (130)) may cause the processor (110) to perform a method for obtaining an analysis result for medical data according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, the processor (110) may perform calculations for obtaining an analysis result for medical data.
[0052] According to one embodiment of the present disclosure, the processor (110) may perform operations for learning a neural network. For example, the processor (110) may perform calculations for learning a neural network, such as processing input data for learning in deep learning (DL), extracting features from the input data, calculating errors, and updating weights of the neural network using backpropagation. At least one of the CPU, GPGPU, and TPU of the processor (110) may process learning of a network function. For example, the CPU and GPGPU may together process learning of a network function and classification of data using the network function. Furthermore, in one embodiment of the present disclosure, processors of a plurality of computing devices may be used together to process learning of a network function and classification of data using the network function.
[0053] The processor (110) can typically control the overall operation of the computing device (100). The processor (110) can process signals, data, information, etc. input or output through components included in the computing device (100) or run application programs stored in the memory (130), thereby providing or processing appropriate information or functions to the user.
[0054] In one embodiment, the processor (110) may determine a first target medical data group to be analyzed from among a plurality of medical data groups. The processor (110) may receive a natural language question text from a user. The processor (110) may obtain reference medical information related to the user's natural language question text from a reference medical database. The processor (110) may generate a first structured query text corresponding to the natural language question text from a first prompt including the reference medical information and the user's natural language question text using a first large-scale language model. The processor (110) may obtain first target medical data corresponding to the first structured query text from the first target medical data group using the first structured query text. The processor (110) may generate an analysis result for the first target medical data from a second prompt including the user's natural language question text and the first target medical data using a second large-scale language model.
[0055] In one embodiment of the present disclosure, the memory (130) may store any form of information generated or determined by the processor (110) and / or any form of information received by the network unit (150). In one embodiment, the memory (130) may store a reference medical database and / or a plurality of medical data groups. The database may be a collection of data stored in a form that can be processed by the computing device (100). The reference medical database may store a plurality of reference medical information. A medical data group in the present disclosure may mean a collection of a plurality of medical data. Each of the plurality of medical data groups may include a plurality of medical data. The plurality of medical data groups may be generated from different medical institutions.
[0056] In one embodiment of the present disclosure, the memory (130) may include at least one type of storage medium among a flash memory type, a hard disk type, a multimedia card micro type, a card type memory (e.g., SD or XD memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, and / or an optical disk. The computing device (100) may also operate in relation to web storage that performs the storage function of the memory (130) on the Internet. The description of the memory described above is merely an example, and the present disclosure is not limited thereto. The memory (130) may be operated by the processor (110).
[0057] According to one embodiment of the present disclosure, the network unit (150) may include any wired or wireless communication network capable of transmitting and receiving any type of data and signals, etc., as represented in the network of the present disclosure. The technologies described herein may be used not only in the networks mentioned above, but also in other networks.
[0058] FIG. 2 is a diagram illustrating a network function according to one embodiment of the present disclosure.
[0059] Throughout this specification, the terms artificial intelligence-based model, computational model, neural network, network function, and neural network may be used interchangeably.
[0060] A neural network can be composed of a set of interconnected computational units, generally referred to as nodes. These nodes can also be referred to as neurons. A neural network consists of at least one node. The nodes (or neurons) that make up a neural network can be interconnected by one or more links.
[0061] Within a neural network, one or more nodes connected via links can form a relationship between input nodes and output nodes. The concept of input nodes and output nodes is relative, meaning that any node that is in an output node relationship with one node can also be in an input node relationship with another node, and vice versa. As described above, the relationship between input nodes and output nodes can be created based on links. One input node can be connected to one or more output nodes via links, and vice versa.
[0062] In a relationship between input nodes and output nodes connected through a single link, the data of the output node can have its value determined based on the data input to the input node. Here, the link interconnecting the input nodes and output nodes can have a weight. The weight can be variable and can be varied by the user or an algorithm so that the neural network can perform a desired function. For example, when one or more input nodes are interconnected to one output node through each link, the output node can determine the output node value based on the values input to the input nodes connected to the output node and the weight set on the link corresponding to each input node.
[0063] As described above, a neural network is a network in which one or more nodes are interconnected through one or more links, forming input and output node relationships within the network. The characteristics of a neural network can be determined based on the number of nodes and links within the network, the relationships between the nodes and links, and the weights assigned to each link. For example, if two neural networks have the same number of nodes and links but different weight values for the links, the two neural networks can be perceived as different from each other.
[0064] A neural network can be composed of a set of one or more nodes. A subset of the nodes comprising the neural network can form a layer. Some of the nodes comprising the neural network can form a layer based on their distances from the initial input node. For example, a set of nodes that are n distances from the initial input node can form n layers. The distance from the initial input node can be defined by the minimum number of links required to reach the node from the initial input node. However, this definition of a layer is arbitrary for illustrative purposes, and the degree of a layer within a neural network can be defined in a different way than described above. For example, a layer of nodes can be defined by its distance from the final output node.
[0065] In one embodiment of the present disclosure, a set of neurons or nodes may be defined as a layer.
[0066] An initial input node may refer to one or more nodes within a neural network into which data is directly input without going through links with other nodes. Alternatively, within a neural network, it may refer to nodes that do not have other input nodes connected by links in the relationship between nodes based on links. Similarly, a final output node may refer to one or more nodes within a neural network that do not have output nodes in their relationship with other nodes. Furthermore, a hidden node may refer to nodes that constitute a neural network other than the initial input node and the final output node.
[0067] A neural network according to one embodiment of the present disclosure may be a neural network in which the number of nodes in an input layer may be the same as the number of nodes in an output layer, and the number of nodes decreases and then increases as it progresses from the input layer to a hidden layer. In addition, a neural network according to another embodiment of the present disclosure may be a neural network in which the number of nodes in an input layer may be less than the number of nodes in an output layer, and the number of nodes decreases as it progresses from the input layer to the hidden layer. In addition, a neural network according to another embodiment of the present disclosure may be a neural network in which the number of nodes in an input layer may be greater than the number of nodes in an output layer, and the number of nodes increases as it progresses from the input layer to the hidden layer. A neural network according to another embodiment of the present disclosure may be a neural network in a combined form of the neural networks described above.
[0068] A deep neural network (DNN) can refer to a neural network that includes multiple hidden layers in addition to input and output layers. Using a deep neural network, one can identify latent structures in data. A deep neural network can include a convolutional neural network (CNN), a recurrent neural network (RNN), an autoencoder, a generative adversarial network (GAN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a Q network, a U network, a Siamese network, and the like. The description of the above-described deep neural network is merely an example, and the present disclosure is not limited thereto.
[0069] The artificial intelligence-based model of the present disclosure can be represented by a network structure of any structure described above, including an input layer, a hidden layer, and an output layer.
[0070] The neural network that can be used in the artificial intelligence-based model of the present disclosure may be trained using at least one of supervised learning, unsupervised learning, semi-supervised learning, reinforcement learning, federated learning for distributed deep learning, and incremental learning. Training of the neural network may be a process of applying knowledge to the neural network to perform a specific operation.
[0071] Neural networks can be trained to minimize output errors. This process involves repeatedly inputting training data into the neural network, calculating the neural network output and target error for the training data, and backpropagating the neural network error from the output layer to the input layer to update the weights of each node in the neural network to reduce the error. In supervised learning, training data with the correct answer for each training data is used (i.e., labeled training data). In unsupervised learning, the correct answer may not be labeled for each training data. For example, in supervised learning for data classification, the training data may be data with each category labeled. Labeled training data is input into the neural network, and the error can be calculated by comparing the output (category) of the neural network with the labels of the training data.
[0072] As another example, in unsupervised learning for data classification, errors can be calculated by comparing input training data with the output of a neural network. The calculated errors are backpropagated through the neural network (i.e., from the output layer to the input layer), and the connection weights of each node in each layer of the neural network can be updated based on the learning rate. The amount of change in the updated connection weights of each node can be determined by the learning rate. The neural network's calculation of the input data and backpropagation of the error can constitute a learning cycle (epoch). The learning rate can be applied differently depending on the number of iterations of the neural network's learning cycle. For example, a high learning rate can be used early in the neural network's training process to quickly achieve a certain level of performance, thereby improving efficiency. A lower learning rate can be used later in the training process to improve accuracy.
[0073] In neural network training, training data can typically be a subset of real-world data (i.e., the data to be processed using the trained neural network). Therefore, there can be a learning cycle where errors on the training data decrease but errors on the real-world data increase. Overfitting is a phenomenon where excessive training on the training data leads to increased errors on the real-world data. For example, a neural network trained on yellow cats may fail to recognize cats when shown non-yellow colors, a type of overfitting. Overfitting can increase errors in machine learning algorithms. Various optimization methods can be used to prevent overfitting. These methods include increasing the training data, regularization, dropout, which disables some nodes in the network during the learning process, and utilizing batch normalization layers.
[0074] An AI-based model according to one embodiment of the present disclosure may include a Large Language Model (LLM). A large language model in the present disclosure may refer to an AI-based model trained using a massive amount of training data to perform natural language processing (NLP). The large language model may include a transformer, a model of the encoder family of transformers, and / or a model of the decoder family of transformers. A model of the encoder family of transformers may correspond to an AI model that uses the encoder structure of a transformer. A model of the decoder family of transformers may correspond to an AI model that uses the decoder structure of a transformer. For example, the AI-based model of the present disclosure may include a large language model of the GPT family, a large language model of the BERT (Bidirectional Encoder Representations from Transformers) family, etc.
[0075] In one embodiment, a transformer may be composed of an encoder that encodes input data and a decoder that decodes the encoded data. The transformer may have a structure that takes a series of input data as input, performs encoding and decoding steps, and outputs a series of output data. In one embodiment, the series of input data may be processed into a form that the transformer can compute. The process of processing the series of input data into a form that the transformer can compute may include a tokenizing process and an embedding process. The tokenizing process may refer to a process of dividing a series of input data into tokens of a certain unit. For example, the unit may include a word unit. The embedding process may refer to a process of converting at least one token tokenized from a series of input data into an embedding vector.
[0076] In one embodiment, the transformer can obtain an embedding vector to be input to the encoder by combining a token embedding vector embedding at least one token corresponding to a series of input data, a segment embedding vector distinguishing a sentence containing each token, and a position embedding vector reflecting the position of the token. Models in the encoder series and models in the decoder series of the transformer can also obtain an embedding vector by performing the same method.
[0077] In one embodiment, the encoder and decoder within the transformer may utilize an attention algorithm to encode and decode a series of input data. The attention algorithm may refer to an algorithm that, for a given query, calculates a similarity by applying a softmax function to the attention score obtained by multiplying the query by a key by a matrix, and then calculates an attention value for the query by multiplying the calculated similarity by a value by a matrix.
[0078] In one embodiment, a self-attention algorithm may refer to an attention algorithm that utilizes queries, keys, and values generated by multiplying a query weight, a key weight, and a value weight respectively by the same embedding vector. A cross-attention algorithm may refer to an attention algorithm that utilizes a query generated by multiplying a first embedding vector by a query weight, and a key and value generated by multiplying a second embedding vector by a key weight and a value weight respectively. The query weight, key weight, and value weight may be trainable parameters that are updated through a large-scale language model learning process.
[0079] In one embodiment, the encoder of the transformer may include an embedding layer, a self-attention layer that applies a self-attention algorithm to the embedding vector, a normalization layer, and a feed-forward neural network (FFN). In addition, the encoder may have a form in which N unit structures including the self-attention layer, the normalization layer, and the feed-forward neural network are connected. The decoder of the transformer may include an embedding layer, a masked self-attention layer, a normalization layer, a cross-attention layer that applies a cross-attention algorithm, and a feed-forward neural network. In addition, the decoder may have a form in which N unit structures including the masked self-attention layer, the normalization layer, the cross-attention layer, and the feed-forward neural network are connected. The masked self-attention layer may correspond to a layer that obtains an attention value for each of sequences sequentially including words among a plurality of words included in a series of input data.
[0080] Transformers may include additional components such as linear layers and softmax layers in addition to encoders and decoders. Transformer encoder and decoder models may also include the aforementioned additional components in addition to encoders and decoders, respectively. Methods for constructing transformers using attention algorithms may include methods disclosed in Vaswani et al., Attention Is All You Need, 2017 NIPS, which is incorporated herein by reference.
[0081] In one embodiment, an attention layer such as a self-attention layer, a masked self-attention layer, or a cross-attention layer may correspond to a multi-head attention layer that includes multiple attention layers in parallel. The multi-head attention layer may concatenate attention values output from each of the multiple attention layers into a matrix, and output an output attention value by multiplying the output weight by the concatenated matrix. The output attention value output from the multi-head attention layer may have the same size as an attention value output from a single attention layer.
[0082] In one embodiment, the Transformer may be trained through a Masked Language Model (MLM) process, a Next Sentence Prediction (NSP) process, or the like. The MLM process may refer to a learning process that predicts masked words from a set of training data in which some words are masked. The NSP process may refer to a learning process that determines whether two sentences are connected sentences from a set of training data containing arbitrary sentences.
[0083] In one embodiment, a large-scale language model can process various data formats, such as natural language text, image data, audio data, and video data. The large-scale language model can embed data in order to convert data of various data formats into a computable series of data. The large-scale language model can process additional data representing the relative positional relationship or topological relationship between a series of input data. Alternatively, vectors representing the relative positional relationship or topological relationship between the input data can be additionally reflected in the series of input data to embed the series of input data. In one example, the relative positional relationship between the series of input data may include, but is not limited to, word order within a natural language sentence, the relative positional relationship between each segmented image, and the temporal order of segmented audio waveforms. The process of adding information representing the relative positional relationship or topological relationship between a series of input data may be referred to as positional encoding.
[0084] An example of a large-scale language model for processing image data (Vision Transformer, ViT) is disclosed in Dosovitskiy, et al., AN IMAGE IS WORTH 16X16 WORDS: TRANSFORMERS FOR IMAGE RECOGNITION AT SCALE, which is incorporated herein by reference.
[0085] An artificial intelligence model according to one embodiment of the present disclosure may include a multimodal large-scale language model. A multimodal large-scale language model may refer to a large-scale language model capable of understanding and processing relationships between different data formats, such as natural language text data, image data, audio data, and video data. The multimodal language model may include a plurality of encoders that encode input data corresponding to each data format. The multimodal language model may be trained to calculate similarity between embedding vectors encoded from encoders of each data format through training data including data of different data formats, and to calculate higher similarity for identical pairs and lower similarity for different pairs.
[0086] An example of a multimodal large-scale language model that understands and processes relationships between image data and natural language text data (Contrastive Language-Image Pre-training, CLIP) is described in Alec Radford, et al., LEARNING TRANSFERABLE VISUAL MODELS FROM NATURAL LANGUAGE SUPERVISION, which is incorporated herein by reference.
[0087] Hereinafter, a method for obtaining analysis results for medical data by a computing device (100) according to one embodiment of the present disclosure is disclosed. Hereinafter, operations performed by the processor (110) of the computing device (100) will be expressed as being performed by the computing device (100).
[0088] FIG. 3 is a flowchart illustrating a method for a computing device to obtain analysis results for medical data according to one embodiment of the present disclosure.
[0089] In step S310, the computing device (100) according to one embodiment may determine a first target medical data group to be analyzed from among a plurality of medical data groups. By way of example, and not limitation, the target medical data group may refer to raw data or a set of raw data to be used in a technique according to one embodiment of the present disclosure. For example, the technique according to one embodiment of the present disclosure may involve a process of connecting the target medical data group to be analyzed with the computing device (100). For example, if the target medical data group to be analyzed has a file format (e.g., a data frame), the corresponding file may be uploaded to the computing device (100). For example, if the target medical data group to be analyzed has a relational database format or a common data model format, a connection may be made between the database and the computing device (100). In one embodiment, after the connection process of determining the target medical data group is performed, an operation (e.g., learning and / or inference) of a large-scale language model may be performed using information included in the target medical data group.
[0090] In one embodiment, the plurality of medical data groups are groups including a plurality of medical data, and may have at least one of a data structure in the form of a data frame, a data structure of a relational database (RDB), or a data structure of a common data model (CDM). That is, the first target medical data group may have at least one of a data structure in the form of a data frame, a data structure of a relational database (RDB), or a data structure of a common data model (CDM).
[0091] In one embodiment, the data structure of the common data model may refer to a data model that establishes the same data structure and specifications for medical datasets with different data structures held by multiple medical institutions. This allows for the simultaneous processing of medical datasets from multiple medical institutions.
[0092] For example, if the first target medical data group is a data structure in the form of a data frame, the computing device (100) can store the first target medical data group in the memory (130). For another example, if the first target medical data group corresponds to a data structure of a relational database or a data structure of a common data model, the computing device (100) can access the external first target medical data group and obtain the first target medical data.
[0093] In one embodiment, medical data may include information related to a specific individual's medical care. For example, medical data may include variables related to at least one disease in the medical field. For example, medical data may include data that includes a specific individual's physical information, health information, and treatment information, and may include a specific individual's medical records, CT scan data, MRI test results, electrocardiogram (ECG) measurement results, and Electronic Medical Record (EMR) data. Health information may include information about an individual's disease, such as the presence or absence of a specific individual's disease, the name of the disease, and the stage of the disease. Medical information may include information about an individual's medical records, such as the presence or absence of a specific individual's prescribed medication, the name of the prescribed medication, the duration of the prescribed medication, the dosage of the prescribed medication, whether or not the individual has undergone surgery, the name of the surgery, and the details of the surgery. Furthermore, medical data may include genomic data.
[0094] In one embodiment, medical data may include variables related to a specific individual's physical information, health information, and medical treatment information. Furthermore, medical data may include disease-related variables such as lifestyle habits (e.g., drinking, smoking), family history, age, gender, cholesterol levels, and genetic variables. In one embodiment, medical data may include independent and dependent variables. An independent variable may refer to a causal variable, and a dependent variable may refer to a variable whose value is determined by the independent variable. Each of the independent and dependent variables may include at least one variable.
[0095] In step S320, the computing device (100) according to one embodiment may receive a natural language question text from the user. For example, the natural language question text may include questions related to medicine, such as drugs, diseases, etc. The computing device (100) may receive the natural language question text from the user through an external user device and / or user input. For example, the natural language question text may include an analysis request regarding medical data including a target medical data group. In the present disclosure, natural language question text is used as an example for convenience of explanation, but depending on the implementation aspect, question information in the form of an image, question information in the form of a video, and / or question information in the form of a voice may also be included within the scope of the question information of the present disclosure. In such examples, a large-scale language model configured to process multimodal input may be utilized.
[0096] In step S330, a computing device (100) according to an embodiment may obtain reference medical information related to a user's natural language question text from a reference medical database. The reference medical database may store a plurality of reference medical information. The computing device (100) may retrieve reference medical information related to the user's natural language question text from the reference medical database through Retrieval Augmented Generation technology, and may augment the user's natural language text using the reference medical information. The computing device (100) may obtain reference medical information from the reference medical database contained in the memory (130), or may receive reference medical information by communicating with an external reference medical database.
[0097] The reference medical information in this disclosure may refer to medical information that is referenced to help a large-scale language model better understand a user's natural language query text. For example, the reference medical information may include drug information (e.g., drug name, drug code information, etc.), up-to-date medical information, disease information (e.g., disease name, symptoms, treatment, etc.), etc.
[0098] In one embodiment, the reference medical database may store at least one of a plurality of reference medical information or a plurality of reference embedding vectors corresponding to the plurality of reference medical information. The plurality of reference embedding vectors may correspond to a plurality of embedding vectors in which the plurality of reference medical information is embedded through a pre-trained artificial intelligence-based embedding model. For example, the reference medical database may correspond to a vector database that implements a vector-based search environment. The reference medical database may receive updated medical information at a preset interval and store the received updated medical information or an embedding vector corresponding to the received updated medical information.
[0099] In one embodiment, the computing device (100) can convert a user's natural language question text into a natural language question vector corresponding to the natural language question text. For example, the computing device (100) can convert the natural language question text into the natural language question vector using a pre-trained embedding model used when converting reference medical information into a reference embedding vector on a reference medical database. The computing device (100) can obtain a reference embedding vector corresponding to the natural language question vector from the reference medical database based on vector similarity between the natural language question vector and a plurality of reference embedding vectors included in the reference medical database. The computing device (100) can convert the reference embedding vector into text to obtain reference medical information related to the natural language question text. For example, the computing device (100) can convert the reference embedding vector into reference medical information using a pre-trained embedding model.
[0100] For example, the embedding model in the present disclosure may correspond to a natural language processing (NLP) model operable to output the meaning, keywords, and / or context of a natural language question text. The computing device (100) may extract keywords and / or meanings corresponding to the natural language question text using the NLP model. Based on the extracted keywords and / or meanings, the computing device (100) may search for related documents and / or related data in a reference medical database. For example, a search model such as TF-IDF, BM25, and / or Dense Retrieval may be used for the search.
[0101] In additional embodiments, the reference medical information may represent customized information grouped by individual, group, region, and age. Accordingly, the computing device (100) may be operated to provide personalized medical information (e.g., an individual's health status or medical history) to a specific user or group using a technique according to one embodiment of the present disclosure.
[0102] In additional embodiments, the reference medical information may include information updated in real time or at predetermined time intervals. Accordingly, the computing device (100) may be operated to provide medical analysis information that reflects the updated medical information (i.e., reflects the latest medical information) using a technique according to one embodiment of the present disclosure.
[0103] In step S340, the computing device (100) according to one embodiment may generate a first structured query text corresponding to a natural language question text from a first prompt including reference medical information and a natural language question text of a user using a first large-scale language model. The computing device (100) may generate the first prompt including the reference medical information and the natural language question text of the user. The structured query text in the present disclosure refers to a structured query text for extracting medical data from a medical data group, and may include a Structured Query Language (SQL) query, a query of the Pandas library, etc. The first structured query text may correspond to the structure information of the first target medical data group. For example, the grammar of the first structured query text may be determined based on the data structure of the first target medical data group. By way of example, and not limitation, the prompt may represent input data (e.g., text data) that a user inputs to cause the large-scale language model to perform a task. The form of a prompt may vary depending on the implementation, and may, for example, be in the form of a question, a command, a format specification, and / or a description.
[0104] In one embodiment, the first large-scale language model may correspond to a pre-trained artificial intelligence-based large-scale language model. The first large-scale language model may correspond to a large-scale language model that is fine-tuned to input a natural language question text and output a structured query text through a first training dataset including natural language question text and structured query text. For example, the computing device (100) may train (e.g., fine-tune) the large-scale language model using parameters corresponding to the first training dataset while keeping the parameters of the pre-trained large-scale language model fixed. Since the parameters corresponding to the first training dataset are expressed as low-rank and training is performed while keeping the existing large-scale parameters fixed, the memory usage and computational amount during the fine-tuning process of the large-scale language model may be reduced.
[0105] In one embodiment, the first prompt may further include structure information of the first target medical data group and instruction text that instructs to generate a first structured query text corresponding to the first target medical data group. In the present disclosure, the structure information of the medical data group is information necessary for generating a structured query text corresponding to the medical data group, and may include data structure information of the medical data group, data summary information, and the like. For example, when the medical data group has a data structure in the form of a data frame, the structure information of the medical data group may include data structure information, types of variables, basic statistical distributions, and the like. For another example, when the medical data group has a data structure of a relational database, the structure information of the medical data group may include data structure information, information on a schema of the database, the number of tables included in the database, types of variables for each table, basic statistical distributions for each table, the number of columns or rows for each table, and the like.
[0106] In one embodiment, the computing device (100) can determine whether a natural language question text violates a predefined security rule. For example, the predefined security rules may include rules regarding the risk of leakage of personal information and / or sensitive information. For example, the computing device (100) can determine whether the natural language question text violates a security rule by comparing the natural language question text with the predefined security rule. If the first text included in the natural language question text violates the predefined security rule, the computing device (100) can change or delete the first text from the natural language question text. The computing device (100) can mask the first text from the natural language question text, change it to a second text that does not violate the security rule, or delete the first text.
[0107] For example, the computing device (100) may change or delete a first text corresponding to at least one preset security violation keyword if the natural language question text includes at least one preset security violation keyword based on a rule. The computing device (100) may set at least one security violation keyword based on a predefined security rule. As another example, the computing device (100) may input a prompt including a natural language question text and a predefined security rule to a pre-trained artificial intelligence model (e.g., a large-scale language model, etc.), thereby obtaining a natural language question text in which the first text that violates the security rule is changed or deleted. The computing device (100) may obtain reference medical information related to the natural language question text in which the first text is changed or deleted from a reference medical database.
[0108] In one embodiment, the computing device (100) may include data encryption or anonymization. For example, if the first text that violates a security rule contains information that can identify a patient, the first text may be modified by encrypting or anonymizing the patient's identifying information. Examples of data anonymization include methods such as including false information in the data, changing the information by shuffling the data, changing specific information by categorizing, grouping, or generalizing the data, and / or masking methods that obscure or delete the data.
[0109] In one embodiment, the computing device (100) can extract at least one medical keyword from a natural language question text. The computing device (100) can obtain reference medical information including at least one medical keyword from a reference medical database. The at least one medical keyword may include at least one of drug information and disease information. For example, the medical keyword may include information related to a disease name, a diagnosis code, a disease symptom, a drug name, a treatment method, and / or a medical procedure.
[0110] In one embodiment, the computing device (100) can generate augmented natural language question text by reflecting reference medical information into the natural language question text. The computing device (100) can generate a first structured query text from a first prompt including the augmented natural language question text using a first large-scale language model. Through this, the computing device (100) can achieve the technical effect of generating a more accurate first structured query text by inputting the augmented natural language question text into the first large-scale language model. For example, the computing device (100) can evaluate the relevance of documents and / or data searched in relation to the natural language question text, extract additional information necessary for augmentation from documents and / or data whose relevance exceeds a predetermined standard, and reflect the extracted additional information into the natural language question text, thereby converting the natural language question text into augmented natural language question text.
[0111] In step S350, the computing device (100) according to one embodiment can obtain first target medical data corresponding to the first structured query text from the first target medical data group using the first structured query text. For example, when the first target medical data group has a data structure of a relational database or a data structure of a common data model, the computing device (100) can execute the first structured query text on the first target medical data group to obtain the first target medical data in response to the first structured query text.
[0112] In one embodiment, the computing device (100) may execute a first structured query text against a first target medical data group to determine whether an error occurs in the first structured query text. For example, errors in the first structured query text may include syntax errors, runtime errors, logical errors, etc. For example, if no result value is obtained as a result of executing the first structured query text against the first target medical data group, the computing device (100) may determine that an error has occurred in the first structured query text. If an error occurs in the first structured query text, the computing device (100) may correct the error in the first structured query text. For example, the computing device (100) may detect errors in the first structured query text through an integrated development environment (IDE), a code analysis tool, etc., and correct the detected errors. Alternatively, the computing device (100) may input the first prompt again into the first large-scale language model to generate a new first structured query text. The computing device (100) may repeat the process of executing and correcting errors in the first structured query text within a preset number of repetitions, thereby obtaining first target medical data corresponding to the first structured query text from the first target medical data group.
[0113] In step S360, the computing device (100) according to one embodiment may generate an analysis result for the first target medical data from a second prompt including a natural language question text and the first target medical data using a second large-scale language model. In one embodiment, the second prompt may include an augmented natural language question text and the first target medical data. In addition, the second prompt may further include an instruction text that instructs to generate an analysis result for the first target medical data. The analysis result for the first target medical data may include a response to the user's natural language question text. The analysis result for the first target medical data may include information on a correlation between an independent variable and a dependent variable included in the first target medical data.
[0114] In one embodiment, the second large-scale language model may correspond to a pre-trained AI-based large-scale language model. For example, the second large-scale language model may be the same large-scale language model as the first large-scale language model. In another example, the second large-scale language model may correspond to a large-scale language model that is fine-tuned to take natural language question text and medical data as input and output analysis results for the medical data through a second training dataset that includes natural language question text, medical data, and analysis results for the medical data. The first large-scale language model and the second large-scale language model may each have different weights through fine-tuning using the first or second training dataset.
[0115] In one embodiment, the computing device (100) may output a first structured query text and an augmented natural language question text from a first prompt using a first large-scale language model. For example, the computing device (100) may add an instruction text instructing to output the first structured query text to the first prompt to be input to the first large-scale language model, as well as an instruction text instructing to output an augmented natural language question text that reflects reference medical information in the user's natural language question text. The augmented natural language question text may be text in which the reference medical information is reflected in the natural language question text. The second prompt may include the augmented natural language question text output from the first large-scale language model and the first target medical data.
[0116] In one embodiment, if the first target medical data contains personal information, the computing device (100) may de-identify the personal information. For example, the computing device (100) may change a name contained in the first target medical data to a pseudonym. In another example, the computing device (100) may mask or delete personal information contained in the first target medical data. The computing device (100) may use a second large-scale language model to generate analysis results for the first target medical data from a second prompt containing a natural language question text and the first target medical data with de-identified personal information.
[0117] In one embodiment, the computing device (100) may determine a second target medical data group to be analyzed from among a plurality of medical data groups. The computing device (100) may determine a second target medical data group to be additionally analyzed in addition to the first target medical data group. The computing device (100) may generate a second structured query text corresponding to a natural language question text from a third prompt including reference medical information, a natural language question text, and structure information of the second target medical data group using a first large-scale language model. The computing device (100) may obtain second target medical data corresponding to the second structured query text from the second target medical data group using the second structured query text.
[0118] In one embodiment, the computing device (100) may generate an analysis result for the second target medical data from a fourth prompt including a natural language question text and the second target medical data using a second large-scale language model. The computing device (100) may compare the analysis result for the first target medical data with the analysis result for the second target medical data to generate a comparison result. For example, the comparison result may include content that differs between the analysis result for the first target medical data and the analysis result for the second target medical data. For example, the comparison result may include content about the difference in the correlation between the independent variable and the dependent variable in the analysis result for the first target medical data and the analysis result for the second target medical data, respectively. Through this, the technical effect of selecting the first target medical data group and the second target medical data group as the subject of the comparative analysis and obtaining the comparison result using the large-scale language model can be achieved.
[0119] In one embodiment, the computing device (100) can generate an integrated analysis result for the first target medical data and the second target medical data from a fifth prompt including a natural language question text, the first target medical data, and the second target medical data using a second large-scale language model. For example, the integrated analysis result may correspond to an analysis result for integrated target medical data that combines the first target medical data and the second target medical data. Through this, the technical effect of selecting multiple target medical data groups to be analyzed and obtaining an integrated analysis result using a large-scale language model can be achieved.
[0120] In one embodiment, the reference medical information may have a data format other than text. For example, the reference medical information may have an image format, an audio format, a video format, etc., in addition to text. The reference medical database may store reference medical information in various data formats. Furthermore, the reference medical database may store the reference medical information by converting it into a reference embedding vector through an embedding transformation method corresponding to each modality. The first large-scale language model may correspond to a pre-trained multimodal large-scale language model that processes the data format of the reference medical information. For example, the first large-scale language model may generate a first structured query text by inputting a user's natural language question text and reference medical information other than text format. At least one of the first prompt or the third prompt may include reference medical information other than text format.
[0121] In one embodiment, the first target medical data may have a data format other than text. For example, the first target medical data may have an image format, an audio format, a video format, etc., in addition to text. Similarly, the second target medical data may have a data format other than text (e.g., an image format, an audio format, a video format, etc.). The multiple medical data groups may store medical data in various data formats. For example, the multiple medical data groups may store the medical data itself in various data formats or store storage paths of externally stored medical data. The second large-scale language model may correspond to a pre-trained multimodal large-scale language model that processes the data format of the first target medical data. For example, the second large-scale language model may input a user's natural language question text and the first target medical data other than text, and generate an analysis result for the first target medical data. At least one of the second prompt, the fourth prompt, or the fifth prompt may include target medical data other than text.
[0122] The embodiments disclosed in this disclosure utilize RAG technology to generate more accurate prompts by incorporating reference medical information into a user's natural language questions, and to automatically analyze medical data using a large-scale language model. Furthermore, this technology can reduce the time and cost required for data analysis by medical professionals or researchers, allowing more time to focus on patient diagnosis and treatment planning. Furthermore, it can identify data patterns relatively quickly and accurately, aiding in the prediction of potential risk factors and diseases.
[0123] Furthermore, the embodiments disclosed in this disclosure can achieve the technical benefit of contributing to resolving the problem of knowledge imbalance in the medical market. A medical data analysis system according to one embodiment of this disclosure can provide advanced analysis results even to regions or medical professionals lacking medical expertise. This allows patients to receive high-quality medical services regardless of their residential location or the level of the medical institution. Furthermore, the computing device (100) can continuously train a large-scale language model with medical data to improve analysis accuracy and provide analysis results that reflect the latest medical information. This can achieve the technical benefit of contributing to the improvement of the quality of medical services.
[0124] FIG. 4 is a block diagram illustrating a plurality of modules included in a medical data analysis system implemented by a computing device according to one embodiment of the present disclosure.
[0125] In one embodiment, the computing device (100) can implement a medical data analysis system according to one embodiment of the present disclosure through a system environment setting module (410), a question preprocessing module (420), a medical data acquisition module (430), and an analysis result generation module (440). The computing device (100) can control each module to implement the medical data analysis system according to one embodiment of the present disclosure. That is, it should be understood that the operations performed in each module are performed by the computing device (100). A detailed description of each module will be described below with reference to FIGS. 5 to 8. As each module operates, the operations and / or steps described above in the present disclosure can be implemented. In addition, in the descriptions of each module below, descriptions that overlap with the above-described descriptions will be omitted to prevent unnecessary duplication of descriptions.
[0126] FIG. 5 is a schematic diagram illustrating operations performed by a system environment setting module included in a computing device according to one embodiment of the present disclosure.
[0127] In one embodiment, the system environment configuration module (410) may determine a target medical data group (520) to be analyzed. The system environment configuration module (410) may connect the target medical data group (520) to the medical data analysis system (510). For example, the target medical data group (520) may include a first target medical data group and / or a second target medical data group.
[0128] In one embodiment, the system configuration module (410) may determine a large-scale language model (530) that will generate analysis results for structured query text and / or medical data. For example, the large-scale language model (530) may include a first large-scale language model and / or a second large-scale language model. The first large-scale language model and the second large-scale language model may have identical or different weights.
[0129] FIG. 6 is a schematic diagram illustrating operations performed by a question preprocessing module included in a computing device according to one embodiment of the present disclosure.
[0130] In one embodiment, the question preprocessing module (420) may receive a user's natural language question text (610). The question preprocessing module (420) may reflect predefined security rules in the user's natural language question text (610) to generate a natural language question text (620) with the security rules reflected therein. The natural language question text (620) with the security rules reflected therein may be text in which a security violation text is changed or deleted in the natural language question text (610). The question preprocessing module (420) may obtain reference medical information related to the natural language question text (610) from a reference medical database, and generate an augmented natural language question text (630) with the reference medical information reflected in the natural language question text (610). The question preprocessing module (420) may generate a structured query text (650) from the augmented natural language question text (630) using a first large-scale language model (640).
[0131] FIG. 7 is a schematic diagram illustrating operations performed by a medical data acquisition module included in a computing device according to one embodiment of the present disclosure.
[0132] In one embodiment, the medical data acquisition module (430) may acquire target medical data (720) from the target medical data group (710) using the structured query text (650) generated by the question preprocessing module (420). For example, the medical data acquisition module (430) may acquire target medical data (720) by executing the structured query text (650) on the target medical data group (710).
[0133] FIG. 8 is a schematic diagram illustrating operations performed by an analysis result generation module included in a computing device according to one embodiment of the present disclosure.
[0134] In one embodiment, the analysis result generation module (440) can obtain an analysis result (820) for the target medical data (720) from the natural language question text (610) received from the question preprocessing module (420) and the target medical data (720) obtained by the medical data acquisition module (430) using the second large-scale language model (810). The analysis result generation module (440) can obtain an analysis result for the target medical data (720) by inputting the augmented natural language question text (630) of FIG. 6 and the target medical data (720) into the second large-scale language model (810) instead of the natural language question text (610).
[0135] FIG. 9 is a simplified, general schematic diagram of an exemplary computing environment in which embodiments of the present disclosure may be implemented.
[0136] Although the present disclosure has been described above as being generally implemented by a computing device (100), those skilled in the art will appreciate that the present disclosure may be implemented in combination with computer-executable instructions and / or other program modules that may be executed on one or more computers and / or as a combination of hardware and software.
[0137] Generally, program modules include routines, programs, components, data structures, and the like that perform specific tasks or implement specific abstract data types. Furthermore, those skilled in the art will appreciate that the methods of the present disclosure can be implemented with other computer system configurations, including single-processor or multiprocessor computer systems, minicomputers, mainframe computers, as well as personal computers, handheld computing devices, microprocessor-based or programmable consumer electronics, and the like, each of which may be operatively connected to one or more associated devices.
[0138] The described embodiments of the present disclosure can also be practiced in distributed computing environments, where certain tasks are performed by remote processing devices that are connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
[0139] Computers typically include a variety of computer-readable media. Computer-readable media can be any media that can be accessed by a computer, and includes both volatile and nonvolatile media, transitory and non-transitory media, removable and non-removable media. By way of example, and not limitation, computer-readable media can include computer-readable storage media and computer-readable transmission media. Computer-readable storage media includes both volatile and nonvolatile media, transitory and non-transitory media, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer-readable storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital video disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be accessed by a computer and used to store the desired information.
[0140] Computer-readable transmission media typically includes any information delivery media that embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism. The term modulated data signal means a signal that has one or more of its characteristics set or changed so as to encode information in the signal. By way of example, and not limitation, computer-readable transmission media includes wired media, such as a wired network or direct-wired connection, and wireless media, such as acoustic, RF, infrared, or other wireless media. Combinations of any of the above are also intended to be included within the scope of computer-readable transmission media.
[0141] An exemplary environment (1100) implementing various aspects of the present disclosure is illustrated, including a computer (1102) comprising a processing unit (1104), system memory (1106), and a system bus (1108). The system bus (1108) connects system components, including but not limited to the system memory (1106), to the processing unit (1104). The processing unit (1104) may be any of a variety of commercially available processors. Dual processors and other multiprocessor architectures may also be utilized as the processing unit (1104).
[0142] The system bus (1108) may be any of several types of bus structures that may be additionally interconnected to a memory bus, a peripheral bus, and a local bus using any of a variety of commercial bus architectures. The system memory (1106) includes read-only memory (ROM) (1110) and random access memory (RAM) (1112). A basic input / output system (BIOS) is stored in non-volatile memory (1110), such as ROM, EPROM, or EEPROM, and includes basic routines that help transfer information between components within the computer (1102), such as during start-up. The RAM (1112) may also include high-speed RAM, such as static RAM, for caching data.
[0143] The computer (1102) also includes an internal hard disk drive (HDD) (1114) (e.g., EIDE, SATA) - which may also be configured for external use within a suitable chassis (not shown), a magnetic floppy disk drive (FDD) (1116) (e.g., for reading from or writing to a removable diskette (1118)), and an optical disk drive (1120) (e.g., for reading from or writing to a CD-ROM disk (1122) or other high-capacity optical media such as a DVD). The hard disk drive (1114), the magnetic disk drive (1116), and the optical disk drive (1120) may be connected to the system bus (1108) by a hard disk drive interface (1124), a magnetic disk drive interface (1126), and an optical drive interface (1128), respectively. The interface (1124) for implementing an external drive includes at least one or both of Universal Serial Bus (USB) and IEEE 1394 interface technologies.
[0144] These drives and their associated computer-readable media provide non-volatile storage of data, data structures, computer-executable instructions, and the like. In the case of the computer (1102), the drives and media correspond to storing any data in a suitable digital format. While the description of computer-readable media above refers to HDDs, removable magnetic disks, and removable optical media such as CDs or DVDs, those of ordinary skill in the art will appreciate that other types of computer-readable media, such as zip drives, magnetic cassettes, flash memory cards, cartridges, and the like, may also be used in the exemplary operating environment, and that any such media may contain computer-executable instructions for performing the methods of the present disclosure.
[0145] A number of program modules, including an operating system (1130), one or more application programs (1132), other program modules (1134), and program data (1136), may be stored in the drive and RAM (1112). All or portions of the operating system, applications, modules, and / or data may also be cached in RAM (1112). It will be appreciated that the present disclosure may be implemented in various commercially available operating systems or combinations of operating systems.
[0146] A user may enter commands and information into the computer (1102) via one or more wired / wireless input devices, such as a keyboard (1138) and a pointing device such as a mouse (1140). Other input devices (not shown) may include a microphone, an IR remote control, a joystick, a game pad, a stylus pen, a touch screen, and the like. These and other input devices are often connected to the processing unit (1104) via an input device interface (1142) that is connected to the system bus (1108), but may be connected by other interfaces such as a parallel port, an IEEE 1394 serial port, a game port, a USB port, an IR interface, and the like.
[0147] A monitor (1144) or other type of display device is also connected to the system bus (1108) via an interface, such as a video adapter (1146). In addition to the monitor (1144), the computer typically includes other peripheral output devices (not shown), such as speakers, a printer, and so on.
[0148] The computer (1102) may operate in a networked environment using logical connections to one or more remote computers, such as remote computer(s) (1148), via wired and / or wireless communications. The remote computer(s) (1148) may be a workstation, a computing device computer, a router, a personal computer, a portable computer, a microprocessor-based entertainment device, a peer device, or other conventional network node, and generally include many or all of the components described for the computer (1102), although for simplicity, only the memory storage device (1150) is shown. The logical connections shown include wired / wireless connections to a local area network (LAN) (1152) and / or a larger network, such as a wide area network (WAN) (1154). Such LAN and WAN networking environments are common in offices and companies and facilitate enterprise-wide computer networks, such as intranets, all of which may be connected to a worldwide computer network, such as the Internet.
[0149] When used in a LAN networking environment, the computer (1102) is connected to a local network (1152) via a wired and / or wireless communication network interface or adapter (1156). The adapter (1156) may facilitate wired or wireless communications to the LAN (1152), which may also include a wireless access point installed therein for communicating with the wireless adapter (1156). When used in a WAN networking environment, the computer (1102) may include a modem (1158), be connected to a communications computing device on the WAN (1154), or have other means of establishing communications over the WAN (1154), such as via the Internet. The modem (1158), which may be internal or external and wired or wireless, is connected to the system bus (1108) via a serial port interface (1142). In a networked environment, program modules or portions thereof described for the computer (1102) may be stored in a remote memory / storage device (1150). It will be appreciated that the network connections depicted are exemplary and other means of establishing a communications link between the computers may be used.
[0150] The computer (1102) operates to communicate with any wireless device or object that is arranged and operates via wireless communication, such as a printer, a scanner, a desktop and / or portable computer, a portable data assistant (PDA), a communication satellite, any equipment or location associated with a radio-detectable tag, and a telephone. This includes at least Wi-Fi and Bluetooth wireless technologies. Accordingly, the communication may be a predefined structure as in a conventional network, or may simply be an ad hoc communication between at least two devices.
[0151] Wi-Fi (Wireless Fidelity) enables connections to the Internet and other devices without wires. Wi-Fi is a wireless technology that allows devices, such as computers, to send and receive data anywhere within the coverage area of a base station, both indoors and outdoors, similar to cell phones. Wi-Fi networks use wireless technologies called IEEE 802.11 (a, b, g, etc.) to provide secure, reliable, and high-speed wireless connections. Wi-Fi can be used to connect computers to each other, to the Internet, and to wired networks (using IEEE 802.3 or Ethernet). Wi-Fi networks can operate in the unlicensed 2.4 and 5 GHz radio bands, at data rates of, for example, 11 Mbps (802.11a) or 54 Mbps (802.11b), or in products that include both bands (dual-band).
[0152] Those skilled in the art will appreciate that information and signals may be represented using any of a variety of different technologies and techniques. For example, the data, instructions, commands, information, signals, bits, symbols, and chips referenced in the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
[0153] Those skilled in the art will appreciate that the various illustrative logical blocks, modules, processors, means, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, various forms of programs or design code (referred to herein, for convenience, as software), or a combination of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Those skilled in the art may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
[0154] The various embodiments presented herein can be implemented as a method, apparatus, or article of manufacture using standard programming and / or engineering techniques. The term article of manufacture includes a computer program, carrier, or media accessible from any computer-readable storage device. For example, computer-readable storage media include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, magnetic strips, etc.), optical disks (e.g., CDs, DVDs, etc.), smart cards, and flash memory devices (e.g., EEPROMs, cards, sticks, key drives, etc.). Furthermore, various storage media presented herein include one or more devices and / or other machine-readable media for storing information.
[0155] It should be understood that the specific order or hierarchy of steps in the presented processes is merely an example of exemplary approaches. It should be understood that the specific order or hierarchy of steps in the processes may be rearranged within the scope of the present disclosure based on design priorities. The appended method claims provide elements of various steps in a sample order, but are not intended to be limited to the specific order or hierarchy presented.
[0156] The description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments disclosed herein, but is to be construed in the broadest scope consistent with the principles and novel features disclosed herein.
[0157] As described above, the relevant contents have been described in the best form for carrying out the invention.
[0158] It can be used in devices and systems that obtain analysis results for medical data by utilizing large-scale language models and reference medical databases.
Claims
1. A method for obtaining analysis results for medical data using a large-scale language model performed by a computing device. A step of determining a first target medical data group to be analyzed among multiple medical data groups; A step of receiving a user's natural language question text; A step of obtaining reference medical information related to the natural language question text from a reference medical database; A step of generating a first structured query text corresponding to the natural language question text from a first prompt including the reference medical information and the natural language question text using a first large language model (LLM); A step of obtaining first target medical data corresponding to the first structured query text from the first target medical data group using the first structured query text; A step of generating an analysis result for the first target medical data from a second prompt including the natural language question text and the first target medical data using a second large-scale language model; A step of determining a second target medical data group to be analyzed among the plurality of medical data groups; A step of generating a second structured query text corresponding to the natural language question text from a third prompt including the reference medical information, the natural language question text, and the structural information of the second target medical data group using the first large-scale language model; A step of obtaining second target medical data corresponding to the second structured query text from the second target medical data group using the second structured query text; A step of generating an analysis result for the second target medical data from a fourth prompt including the natural language question text and the second target medical data using the second large-scale language model; and A step of generating a comparison result by comparing the analysis result for the first target medical data with the analysis result for the second target medical data; including, method.
2. In paragraph 1, The above first target medical data group has at least one of a data structure in the form of a data frame, a data structure of a relational database (RDB), or a data structure of a common data model. method.
3. In paragraph 1, The above reference medical database is, Store at least one of a plurality of reference medical information or a plurality of reference embedding vectors corresponding to the plurality of reference medical information, and Receive updated medical information at a preset interval and store the received updated medical information or an embedding vector corresponding to the received updated medical information. method.
4. In paragraph 1, The above reference medical database corresponds to a vector database that implements a vector-based search environment, and The steps to obtain the above reference medical information are: A step of converting the above natural language question text into a natural language question vector corresponding to the above natural language question text; A step of obtaining a reference embedding vector corresponding to the natural language question vector from the reference medical database based on vector similarity between the natural language question vector and a plurality of reference embedding vectors included in the reference medical database; and A step of converting the above reference embedding vector into text to obtain the above reference medical information related to the above natural language question text; including, method.
5. In paragraph 1, The steps to obtain the above reference medical information are: A step of extracting at least one medical keyword from the natural language question text; and A step of obtaining the reference medical information including the at least one medical keyword from the reference medical database; Including, wherein said at least one medical keyword comprises at least one of drug information or disease information, method.
6. In paragraph 1, The steps to obtain the above reference medical information are: A step of changing or deleting the first text in the natural language question text when the first text included in the natural language question text violates a predefined security rule; and A step of obtaining reference medical information related to the natural language question text in which the first text has been changed or deleted from a reference medical database; including, method.
7. In paragraph 1, The first prompt further includes structure information of the first target medical data group and instruction text that instructs to generate the first structured query text corresponding to the first target medical data group. method.
8. In paragraph 1, The steps for generating the first structured query text are: A step of generating an augmented natural language question text by reflecting the reference medical information into the natural language question text; and A step of generating the first structured query text from the first prompt including the augmented natural language question text using the first large-scale language model; including, method.
9. In paragraph 8, The second prompt includes the augmented natural language question text and the first target medical data. method.
10. In paragraph 1, The step of generating the first structured query text is: A step of outputting the first structured query text and the augmented natural language question text from the first prompt using the first large-scale language model, wherein the augmented natural language question text is a text in which the reference medical information is reflected in the natural language question text; Including, The second prompt includes the augmented natural language question text and the first target medical data. method.
11. In paragraph 1, The steps for obtaining the first target medical data are: A step of executing the first structured query text for the first target medical data group to determine whether an error occurs in the first structured query text; If an error occurs in the first structured query text, a step of correcting the error in the first structured query text; and A step of obtaining first target medical data corresponding to the first structured query text from the first target medical data group by repeating the execution and error correction process of the first structured query text within a preset number of repetitions; including, method.
12. In paragraph 1, The steps for generating analysis results for the above first target medical data are: If the first target medical data above contains personal information, a step of de-identifying the personal information; and A step of generating an analysis result for the first target medical data from the second prompt including the natural language question text and the first target medical data in which the personal information is de-identified, using the second large-scale language model; including, method.
13. In paragraph 1, The first large-scale language model corresponds to a large-scale language model that is fine-tuned to take natural language question text as input and output structured query text through a first learning data set including natural language question text and structured query text. method.
14. In paragraph 1, The second large-scale language model corresponds to a large-scale language model that is fine-tuned to output analysis results for medical data by taking natural language question text and medical data as input through a second learning data set that includes natural language question text, medical data, and analysis results for medical data. method.
15. In paragraph 1, A step of generating an integrated analysis result for the first target medical data and the second target medical data from a fifth prompt including the natural language question text, the first target medical data, and the second target medical data using the second large-scale language model; including more, method.
16. In paragraph 1, The above reference medical information has a data format other than text format, and The above first large-scale language model corresponds to a pre-trained multimodal large-scale language model that processes the data format of the above reference medical information. method.
17. In paragraph 1, The above first target medical data has a data format other than text format, and The second large-scale language model corresponds to a pre-trained multimodal large-scale language model that processes the data format of the first target medical data. method.
18. A computing device that obtains analysis results for medical data using a large-scale language model. A processor comprising at least one core; a memory storing a computer program executable by the processor; and Network Department; Including, The above processor, Among multiple medical data groups, determine the first target medical data group to be analyzed, Receive the user's natural language question text, Obtain reference medical information related to the natural language question text from a reference medical database, Using a first large language model (LLM), a first structured query text corresponding to the natural language question text is generated from a first prompt including the reference medical information and the natural language question text, Using the first structured query text, first target medical data corresponding to the first structured query text is obtained from the first target medical data group, Using a second large-scale language model, an analysis result for the first target medical data is generated from a second prompt including the natural language question text and the first target medical data, Among the above multiple medical data groups, a second target medical data group to be analyzed is determined, Using the first large-scale language model, a second structured query text corresponding to the natural language question text is generated from a third prompt including the reference medical information, the natural language question text, and the structure information of the second target medical data group, Using the second structured query text, the second target medical data corresponding to the second structured query text is obtained from the second target medical data group, Using the second large-scale language model, generating an analysis result for the second target medical data from the fourth prompt including the natural language question text and the second target medical data, and Comparing the analysis results for the first target medical data and the analysis results for the second target medical data to generate a comparison result, Computing device.
19. A computer program stored in a computer-readable storage medium, wherein the computer program causes a processor of a computing device to perform a method for obtaining analysis results for medical data using a large-scale language model, the method comprising: A step of determining a first target medical data group to be analyzed among multiple medical data groups; A step of receiving a user's natural language question text; A step of obtaining reference medical information related to the natural language question text from a reference medical database; A step of generating a first structured query text corresponding to the natural language question text from a first prompt including the reference medical information and the natural language question text using a first large language model (LLM); A step of obtaining first target medical data corresponding to the first structured query text from the first target medical data group using the first structured query text; A step of generating an analysis result for the first target medical data from a second prompt including the natural language question text and the first target medical data using a second large-scale language model; A step of determining a second target medical data group to be analyzed among the plurality of medical data groups; A step of generating a second structured query text corresponding to the natural language question text from a third prompt including the reference medical information, the natural language question text, and the structural information of the second target medical data group using the first large-scale language model; A step of obtaining second target medical data corresponding to the second structured query text from the second target medical data group using the second structured query text; A step of generating an analysis result for the second target medical data from a fourth prompt including the natural language question text and the second target medical data using the second large-scale language model; and A step of generating a comparison result by comparing the analysis result for the first target medical data with the analysis result for the second target medical data; including, A computer program stored on a computer-readable storage medium.
Citation Information
Patent Citations
Method and apparatus for analyzing medical data using large language model
KR102747558B1
Computer implemented methods for the automated analysis or use of data, including use of a large language model
US20230259705A1