Approaches to constructing knowledge bases and evaluating queries for retrieval-augmented generation and systems for implementing the same
The query response platform addresses the limitations of conventional LLMs by dynamically retrieving and personalizing healthcare information from authoritative sources, ensuring accurate and relevant responses through user-specific data integration.
Patent Information
- Application Number
- US19/228647
- Authority / Receiving Office
- US · United States
- Patent Type
- Patents(United States)
- Current Assignee / Owner
- Priority Date
- 2024-06-11
- Filing Date
- 2025-06-04
- Publication Date
- 2026-12-01
- Estimated Expiration
- 2045-06-04
AI Technical Summary
Conventional large-language models (LLMs) are ineffective in providing accurate and personalized healthcare information due to their reliance on general training data, leading to inaccurate, irrelevant, or unsafe responses, especially in specialized domains like healthcare, and lack personalization and contextual relevance.
A query response platform that dynamically retrieves content from authoritative sources and personalizes responses by leveraging user-specific information and contextual data, using a combination of LLMs and computational modules to ensure relevance and accuracy.
The platform generates flexible, updated, and tailored responses that improve the accuracy and relevance of healthcare information, preventing misleading or unsafe advice by utilizing authoritative content and user-specific data, thus enhancing the quality of generated outputs.
Smart Images

Figure US12817890-D00000_ABST
Abstract
Description
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to U.S. Provisional Application No. 63 / 658,600, titled “Approaches to Constructing Knowledge Bases and Evaluating Queries for Retrieval-Augmented Generation and Systems for Implementing the Same” and filed on Jun. 11, 2024, which is incorporated by reference herein in its entirety.TECHNICAL FIELD
[0002] Various embodiments concern computer programs and associated computer-implemented techniques for generating and evaluating queries to aid natural language-based retrieval-augmented generation.BACKGROUND
[0003] Large-language models (LLMs) are able to generate language and execute other natural language processing tasks, such as classification. For example, LLMs can leverage artificial neural networks (e.g., with a transformer-based architecture) to model, identify, and predict context-based patterns in natural language tokens that are representative of characters, words, or phrases. As such, LLMs can be powerful tools for content generation (e.g., in response to user prompts or queries).
[0004] As an illustrative example, an LLMs may provide responses to users' natural language questions based on relationships learned from training data. Historically, LLMs have been trained using data from a variety of sources, formats, or fields, so as to allow these LLMs to answer a wide variety of questions. These LLMs may be called “general-purpose LLMs.” These general-purpose LLMs can provide a diverse set of responses to input queries based on the nature of the training data. These responses depend on relationships learned by these general-purpose LLMs from respective training data, however. Accordingly, the applicability and accuracy of a general-purpose LLM with respect to a given question will depend on the quality and nature of the training data and / or training routine.
[0005] Because general-purpose LLMs are intended to answer a wide variety of questions, the training data also tends to be wide ranging as mentioned above. Simply put, the training data tends to include information related to a large swath of general topics, rather than information related to more specialized topics. As a result, general-purpose LLMs tend to not be very effective in identifying appropriate responses for queries relating to specialized topics, such as diseases and appropriate procedures for diagnosing, treating, and managing diseases.BRIEF DESCRIPTION OF THE DRAWINGS
[0006] FIG. 1 illustrates a network environment that includes a query response platform that is executed by a computing device.
[0007] FIG. 2 illustrates an example of a computing device that is able to implement a query response platform that is designed to generate natural language queries for the identification of relevant content for natural language generation.
[0008] FIG. 3 depicts an example of a communication environment that includes a query response platform that is configured to receive several types of data.
[0009] FIG. 4 depicts another example of a communication environment that includes a query response platform that is configured to receive several types of data.
[0010] FIG. 5 includes a schematic diagram of an approach to generating natural language queries to aid in content retrieval in response to user prompts with a computer program executing on a computing device.
[0011] FIG. 6 includes a schematic diagram of identifying content and associated queries based on historical conversation data.
[0012] FIG. 7 includes a schematic diagram of a flow for generating and evaluating queries for use in content retrieval.
[0013] FIG. 8 includes a schematic diagram of a flow for generating outputs in response to user prompts based on the retrieval of relevant content.
[0014] FIG. 9 is a flow diagram of a process for generating output queries associated with retrievable content to aid in natural language response generation.
[0015] FIG. 10 is a flow diagram of a process for generating natural language outputs in response to user queries, based on related queries and associated content.
[0016] FIG. 11 includes a block diagram of a processing system in which at least some operations described herein can be implemented.DETAILED DESCRIPTION
[0017] Conventional LLMs can be powerful tools for generating, consolidating, and / or presenting information to humans. For example, conversation applications enable users to direct queries to associated LLMs and receive responses, based on training data supplied to the LLM during its configuration. However, LLMs are often trained on large, general datasets. For example, training data for conventional LLMs can include textual information from a variety of time periods, fields of endeavor, and / or authorities. For example, conventional natural language generation (NLG) platforms, such artificial intelligence conversation applications, rely on texts extracted from publicly available internet resources, which can differ in applicability, relevance, or accuracy for any particular application. As such, conventional platforms that leverage LLMs can suffer from a lack of accurate, relevant information in response to a particular user query.
[0018] Such deficits in using conventional LLMs can be particularly pernicious in the context of healthcare-based NLG tasks. A conventional LLM that is used for the provision of accurate healthcare information to patients or other humans can suffer from inaccurate outputs and / or model hallucinations. To illustrate, a patient can submit a query to a conventional NLG platform requesting information relating to diabetes management techniques. The conventional platform, trained on general, potentially inaccurate information from the Internet, can generate resulting inaccurate answers, thereby misleading the patient into following ineffective or unsafe practices. Furthermore, conventional LLMs can hallucinate (e.g., by presenting responses to prompts that are incorrect, nonsensical, or irrelevant the input prompt), as training data associated with LLMs does not necessarily originate from authoritative sources (e.g., accredited health-based organizations or other relevant authorities). As such, conventional NLG platforms can present potentially dangerous information to the patient. In a more extreme case, such an LLM can generate a response indicating to the user that an urgent situation does not require emergency assistance, thereby leading to dire health outcomes. Such an LLM could also generate a response indicating to the user that a non-urgent situation does require emergency assistance, resulting in the unnecessary use of valuable hospital resources.
[0019] Furthermore, conventional LLM-based NLG platforms typically do not enable the personalization of information provided to the human. For example, a conventional LLM does not have access to comprehensive health information associated with a human submitting a query. As such, a conventional LLM can be limited in the applicability or relevance of the information provided to a given patient. For example, in response to a patient's healthcare question regarding possible lifestyle changes to mitigate diabetes, a response from a conventional LLM can include information that is not consistent with any of the patient's underlying conditions. Additionally, conventional LLMs do not provide updated, local information relating to the human's geographical location. For example, in situations where a patient requests information about a local, rapidly developing situation (e.g., a rapidly evolving disease endemic to a particular region), a conventional LLM trained on general data will not be able to provide an effective, tailored response. As such, conventional LLMs can generate misleading or ineffective advice to humans due to a lack of associated contextual information.
[0020] The query response platform disclosed herein enables dynamic retrieval of content in response to a human's query, which enables flexible, updated, and tailored responses to users. For example, the disclosed platform receives a query from an individual regarding healthcare information. In response to the query, the query response platform can retrieve relevant content from multiple content datasets. For example, the content can include information from authoritative sources, some of which is relevant to the individual's query. The platform can determine relevant content by comparing the individual's query with pre-generated queries associated with different content of the content datasets. For example, the disclosed platform can retrieve content, originating from a governmental health agency, that relates to diabetes treatments based on comparing the individual's query with generated queries associated with diabetes prevention.
[0021] Based on determining a similarity of the query with one or more queries associated with particular content, the query response platform can retrieve the particular content and generate a response to the query (e.g., via a general LLM) for display to the individual. In some implementations, the query response platform can further leverage information associated with the individual (e.g., the individual's known location or associated health information or laboratory test results) to tailor the response. As such, the query response platform leverages content that can be updated, corrected, or validated for generation of a response to an individual's query based on the query's similarity with other queries known to be associated with the content. By doing so, the platform can prevent the presentation of inaccurate, hallucinatory, or irrelevant information to the individual, while personalizing or tailoring the information to the user.
[0022] The query response platform can use the pre-generated queries associated with particular content to retrieve content associated with the individual's query. In some implementations, the query response platform can generate queries associated with content such that these generated queries are relevant to the content (e.g., answerable). For example, the query response platform can evaluate a generated query based on its answerability (e.g., the generated query's relevance to the content and / or content dataset) by generating an answerability metric. By doing so, the query response platform improves matching of an individual's query with accurate, relevant information, thereby improving the quality of generated responses.
[0023] In some implementations, the query response platform can generate queries associated with content in a manner that improves the breadth of possible queries that are relevant to a given set of information of the content dataset. For example, the query response platform can evaluate a generated query based on its distance or differences from other generated queries associated with the same content. For example, the query response platform generates a diversity metric that measures an average distance (e.g., a semantic distance) of a generated query from other generated queries associated with a given content dataset. By doing so, the query response platform can identify the applicability of a given set of content to a greater set of relevant individual queries, thereby improving the ability of a given content dataset to answer a wide variety of related individual queries.
[0024] As such, the disclosed platform enables the generation of personalized responses to individuals' queries based on user information and contextual information associated with the user. By leveraging modifiable, improvable, and customizable datasets (e.g., from authorities and / or based on new or evolving information), the disclosed query response platform enables improvements to the accuracy and relevance of information provided to individuals based on their questions. For example, the disclosed platform enables updates to content without devoting system resources to retraining a large language model. Furthermore, such content can be fact-checked (e.g., by human reviewers) while still enabling automated, dynamic responses to users (e.g., in the context of a chatbot conversation). As such, the query response platform mitigates effects of misconceptions or hallucinations that might be associated with a generalized LLM.Terminology
[0025] References in the present disclosure to “an embodiment” or “some embodiments” means that the feature, function, structure, or characteristic being described is included in at least one embodiment. Occurrences of such phrases do not necessarily refer to the same embodiment, nor do they necessarily refer to alternative embodiments that are mutually exclusive of one another.
[0026] The term “based on” is to be construed in an inclusive sense rather than an exclusive sense. That is, in the sense of “including but not limited to.” Thus, the term “based on” is intended to mean “based at least in part on” unless otherwise noted.
[0027] The terms “connected,”“coupled,” and variants thereof are intended to include any connection or coupling between two or more elements, either direct or indirect. The connection or coupling can be physical, logical, or a combination thereof. For example, elements may be electrically or communicatively connected to one another despite not sharing a physical connection.
[0028] The term “module” may refer broadly to software, firmware, hardware, or combinations thereof. Modules are typically functional components that generate one or more outputs based on one or more inputs. A computer program may include or utilize one or more modules. For example, a computer program may utilize multiple modules that are responsible for completing different tasks, or a computer program may utilize a single module that is responsible for completing multiple tasks.
[0029] When used in reference to a list of items, the word “or” is intended to cover all of the following interpretations: any of the items in the list, all of the items in the list, and any combination of items in the list.Overview of the Query Response Platform
[0030] FIG. 1 illustrates a network environment 100 that includes a query response platform 102 that is executed by a computing device 104. An individual (also referred to as a “user” or a “human”) can interact with the query response platform 102 via interfaces 106. For example, a patient can access an interface through which information regarding a physiological disease or previous health data, such as blood sugar levels, can be reviewed. As another example, a healthcare professional can access an interface through which information regarding patients, such as blood sugar levels, heart-rate information, biometric information (e.g., height and weight), or activity information (e.g., fitness or therapeutic procedures carried out by the human) can be reviewed. In some implementations, the interfaces 106 enable individuals, such as patients, to communicate directly with healthcare professionals (e.g., through a peripheral, such as a keyboard or a mouse). Additionally or alternatively, the interfaces 106 enable an individual to present queries or questions (e.g., relating to healthcare) for response by a language generation model (e.g., an LLM-based conversation application, such as a chatbot). For example, the interfaces 106 enable a user to present a question relating to a diabetes diagnosis (e.g., relating to normal blood sugar levels associated with a person of a similar age and weight). Depending on the nature of the individual accessing the interfaces 106, the interfaces 106 can allow for the review of physiological data, examination of outputs produced by the query response platform 102, and management of preferences. Some interfaces may be configured to facilitate interactions between patients and healthcare professionals, while other interfaces can be configured to serve as informative and / or interactive dashboards for patients or healthcare professionals (e.g., as in an LLM-based conversation application).
[0031] The physiological data obtained by the query response platform 102 can be associated with the individual accessing the interfaces 106 or some other person. For example, the interfaces 106 enable a person diagnosed with a physiological disease to view her own physiological data. Additionally or alternatively, the interfaces can enable an individual to view or pose questions associated with another person. In such embodiments, the individual may be a healthcare professional who is responsible for monitoring, managing, or treating the other person. Examples of healthcare professionals include physicians, nurses, dietitians, and the like.
[0032] As shown in FIG. 1, the query response platform 102 can reside in a network environment 100. Thus the computing device 104 on which the query response platform 102 resides can be connected to one or more networks 108A-B. Depending on its nature, the computing device 104 could be connected to a personal area network (PAN), local area network (LAN), wide area network (WAN), metropolitan area network (MAN), or cellular network. For example, if the computing device 104 is a computer server, then the computing device 104 can be accessible to users via respective mobile phones that are connected to the internet via LANs. The queries, healthcare data, responses, and / or other information can be generated by the respective mobile phones or acquired by the respective mobile phones.
[0033] Additionally or alternatively, the computing device 104 can be connected to one or more other computing devices over a short-range wireless connectivity technology, such as Bluetooth®, Near Field Communication (NFC), Wi-Fi® Direct (also referred to as “Wi-Fi P2P”), and the like. As an example, the query response platform 102 could be embodied as a mobile application that is executed by a mobile phone. In such embodiments, the mobile phone may be communicatively connected-via a wireless communication channel—to a source from which to acquire relevant content, healthcare information, or generated responses to queries. The source could be a server, and / or other devices (e.g., that can provide physiological information, such as watches, fitness trackers, or other wearable computing devices, such as portable electronic blood sugar monitors). The content (e.g., healthcare-related data) can be alternatively obtained from another computer program executing on the mobile device. Additionally or alternatively, the content can be acquired from databases and / or servers that are communicably linked to the computing device 104 (e.g., through a network). For example, the computing device 104 can communicate with databases or servers storing updated healthcare information from a regulatory authority (e.g., the Center for Disease Control).
[0034] The interfaces 106 can be accessible via a web browser, desktop application, mobile application, or another form of a computer program. For example, a patient may be able to access interfaces through which information regarding her own health, such as digital biomarkers, diagnoses, or physiological information, such as height and weight, is provided by a mobile application executing on a mobile device. In some implementations, the patient can access interfaces that enable interactions with and / or communication with a query response model (e.g., associated with an LLM or another NLG platform) for the generation of responses in response to the patient's queries. Accordingly, the interfaces 106 generated by the query response platform 102 may be accessible on various computing devices, including mobile phones, tablet computers, desktop computers, and the like.
[0035] Generally, the query response platform 102 is executed—at least partially—by a cloud computing service operated by, for example, Amazon Web Services®, Google Cloud Platform™, or Microsoft Azure®. Thus, the computing device 104 may be representative of a computer server that is part of a server system 110. Often, the server system 110 is comprised of multiple computer servers. These computer servers can include different types of data (e.g., physiological data and information regarding patients, such as name, demographic information, disease classification, etc., as well as content from a corpus of information, such as a disease database), algorithms for processing incoming data, and other assets. Those skilled in the art will recognize that these data could also be distributed among the server system 110 and one or more computing devices. As an example, data that is input by, or related to, patients may be stored on, and processed by, their own computing devices for security or privacy purposes.
[0036] Components of the query response platform 102 can also be hosted locally. That is, the query response platform 102 can reside on the computing device used to access one of the interfaces 106. For example, the query response platform 102 can be embodied as a mobile application executing on a mobile phone as mentioned above. Note, however, that the mobile application may be communicatively connected to the server system 110 on which other components of the query response platform 102 are hosted.
[0037] FIG. 2 illustrates an example of a computing device 200 that is able to implement a query response platform 212 that is designed to generate natural language queries for the identification of relevant content for natural language generation. As shown in FIG. 2, the computing device 200 can include a processor 202, memory 204, display mechanism 206, communication module 208, and sensor suite 210. Each of these components is discussed in greater detail below.
[0038] Those skilled in the art will recognize that different combinations of these components may be present depending on the nature of the computing device 200. For example, if the computing device 200 is a computer server that is part of a server system (e.g., the server system 110 of FIG. 1), then the computing device 200 may not include the display mechanism 206 or sensor suite 210. Conversely, if the computing device 200 is a mobile phone, then the computing device 200 can include the display mechanism 206 and sensor suite 210.
[0039] The computing device 200 on which the query response platform 212 resides may not include sensors in some embodiments. In such embodiments, the data accessed by the query response platform 212 could instead be generated by one or more sensors 222A-N that are external to the computing device 200. For example, the computing device 200 may be a mobile phone, and the sensors 222A-N may be included in a watch or fitness tracker that is communicatively connected to the computing device 200.
[0040] The processor 202 can have generic characteristics similar to general-purpose processors, or the processor 202 may be an application-specific integrated circuit (ASIC) that provides control functions to the computing device 200. As shown in FIG. 2, the processor 202 can be coupled to all components of the computing device 200, either directly or indirectly, for communication purposes.
[0041] The display mechanism 206 can be any mechanism that is operable to visually convey information to a user. For example, the display mechanism 206 can be a panel that includes light-emitting diodes (LEDs), organic LEDs, liquid crystal elements, or electrophoretic elements. As further discussed below, outputs produced by the query response platform 212 (e.g., through execution of its modules) can be posted to the display mechanism 206 for review by a user of the computing device 200.
[0042] The communication module 208 may be responsible for managing communications external to the computing device 200. The communication module 208 can be wireless communication circuitry that is able to establish wireless communication channels with other computing devices. Examples of wireless communication circuitry include 2.4 gigahertz (GHz) and 5 GHz chipsets compatible with Institute of Electrical and Electronics Engineers (IEEE) 802.11—also referred to as “Wi-Fi chipsets.” Alternatively, the communication module 208 may be representative of a chipset configured for Bluetooth, NFC, and the like. Some computing devices-like mobile phones, tablet computers, and the like—are able to wirelessly communicate via separate channels, while other computing devices-like watches and fitness trackers-tend to wirelessly communicate via a single channel. Accordingly, the communication module 208 may be one of multiple communication modules implemented in the computing device 200, or the communication module 208 may be the only communication module implemented in the computing device 200.
[0043] The nature, number, and type of communication channels established by the computing device 200—and more specifically, the communication module 208—can depend on (i) the sources from which data is received by the query response platform 212 and (ii) the destinations to which data is transmitted by the query response platform 212. Assume, for example, that the query response platform 212 resides on a mobile phone in the form of a mobile application. In such embodiments, the communication module 208 can communicate with sensors 222A-N external to the computing device 200 from which to obtain data. Moreover, the communication module 208 may communicate with a server system (e.g., server system 110 of FIG. 1) to which analyses of the data—or the data itself—are transmitted.
[0044] Often, various sensors are implemented in the computing device 200. Collectively, these sensors may be referred to as the “sensor suite”210 of the computing device 200. For example, the computing device 200 may include a motion sensor whose output is indicative of motion of the computing device 200 as a whole. Examples of motion sensors include accelerometers and gyroscopes. In some embodiments, the motion sensor is implemented in an inertial measurement unit (IMU) that measures the force, angular rate, or orientation of the computing device 200. The IMU may accomplish this through the use of one or more accelerometers, one or more gyroscopes, one or more magnetometers, or any combination thereof. As specific examples, the IMU could be a 6-axis IMU that draws low current and therefore is suitable for “always-on” applications in battery-driven computing devices, or the IMU could be a 3-axis IMU that includes logic-level shifting circuitry that can readily interface with a microcontroller. As another example, the computing device 200 may include an ambient light sensor whose output is indicative of the amount of light in the ambient environment.
[0045] As mentioned above, data could also be acquired from sensors 222A-N that are external to the computing device 200. These sensors 222A-N could be included in another computing device, such as a watch or fitness tracker, that is directly connected to the computing device 200. Alternatively, these sensors 222A-N could be discrete sensing units that are directly or indirectly connected to the computing device 200. For example, sensor 222A may be a pulse oximeter that monitors the oxygen saturation of the user of the computing device 200 or another person, for the purpose of creating a photoplethysmogram (PPG). To monitor the oxygen saturation, sensor 222A may be placed on a thin part of a living body, usually a fingertip or earlobe, and then pass two wavelengths of light through that body part toward a photodetector. The photodetector can measure the changing absorbance at each wavelength, allowing sensor 222A to determine the absorbances due to the pulsing of arterial blood through that body part.
[0046] For convenience, the query response platform 212 is referred to as a computer program that resides within the memory 204. However, the query response platform 212 could be comprised of software, firmware, or hardware that is implemented in, or accessible to, the computing device 200. In accordance with embodiments described herein, the query response platform 212 can include a generation module 214, computation module 216, analytics module 218, and graphical user interface (GUI) module 220. These modules could be integral parts of the query response platform 212, or these modules could be logically separate from the query response platform 212 but operate “alongside” it. One or more modules associated with the query response platform 212 can reside on one or more servers communicably linked to the computing device 200. Together, these modules enable the query response platform 212 to generate responses to queries (e.g., relating to queries) in a tailored, accurate manner based on content of a content database (e.g., from authoritative sources). As mentioned above, the given individual could be the user of the computing device 200 or another person.
[0047] The generation module 214 can process prompts and / or content to generate queries for further processing by other modules. For example, the generation module 214 can retrieve data, such as content associated with healthcare conditions, for generation of related questions. To illustrate, the generation module 214 can receive information relating to diabetes diagnoses (e.g., healthcare indicators or lab results that are associated with diabetes diagnoses) based on data from an authoritative source (e.g., scientific papers, previous medical professionals' responses to patient questions, and / or government agency publications). As such, the generation module 214 can include one or more general-purpose LLMs or other suitable NLG algorithms. For example, the generation module 214 can include a function, program, or interface (e.g., an API) that enables communication with an application associated with NLG based on provided textual content. As such, the generation module 214 enables generation of queries that are relevant to a given set of content (e.g., a content dataset).
[0048] The computation module 216 (e.g., also called a “computation system”) can be responsible for evaluating generated queries (e.g., for relevance to particular content and / or for variety with respect to other generated queries). For example, the computation module 216 enables determination of metrics associated with the effectiveness, accuracy, and / or relevance of LLM-generated questions that are associated with given content (e.g., a portion of text or information). For example, the computation module 216 can compute, infer, or otherwise establish metrics by generating vector representations of queries (e.g., using a doc2vec-type algorithm) and generating distances between such vectors. Additionally or alternatively, the computation module 216 can utilize a generalized LLM and / or a sentiment analysis algorithm to evaluate a relevance of a query to a given set of information associated with the content database.
[0049] The analytics module 218 can implement one or more programs in sequence. For example, the analytics module 218 can receive (e.g., via the 108 / / ) a query from an individual, such as through a computer program associated with the interfaces 106. The query can include a natural-language prompt relating to a healthcare question (or another suitable question), such as a concern relating to a recent diabetes diagnosis from a healthcare provider. The analytics module 218 can determine a similarity between the individual's query and a previously generated query (e.g., a query generated at the computation module 216) to identify a relevant content dataset (e.g., a relevant paragraph or text associated with the diabetes-related question). The analytics module 218 can perform content retrieval by accessing such relevant content. In some implementations, the analytics module 218 and / or the generation module 214 can generate, modify, and / or update the content to tailor the content to the individual's query (e.g., by providing the retrieved content to a general-purpose LLM). As such, the 218 / / enables evaluation of users' queries for relevant stored data, thereby improving the quality of data presented to the user in response.
[0050] The GUI module 220 can be responsible for generating interfaces (e.g., the interfaces 106 of FIG. 1) that are viewable on the display mechanism 206 and / or displays associated with other devices communicably coupled to the computing device. Various types of information can be presented on these interfaces. For example, human-related health information, responses to user queries, healthcare-related content, and / or other data obtained, derived, calculated, or generated by the computation module 216 or 214 / / can be presented on an interface for display to the user.
[0051] FIG. 3 depicts an example of a communication environment that includes a query response platform 302 that is configured to receive several types of data. Here, for example, the query response platform 302 receives query data, query data 304, first sensor data 306 that is generated by a first sensor (e.g., sensor 222A of FIG. 2), and second sensor data 308 that is generated by a second sensor (e.g., sensor 222B of FIG. 2). Those skilled in the art will recognize that these data have been selected for the purpose of illustration. Other types of data, such as treatment data (e.g., including indicators of physiological disease, treatment regimens, etc.), could also be obtained by the query response platform 302.
[0052] These data may be obtained from multiple sources.
[0053] Consider the query data 304, for example. The query data 304 could be obtained directly on the computing device on which the query response platform 302 is executing. For example, if the query response platform 302 is implemented on a mobile phone in the form of a mobile application, the query data 304 may be representative of input provided by an individual through interfaces generated by the mobile application. The input may be representative of queries of a patient relating to a treatment plan for a particular disease or illness. Alternatively, the query data 304 could be obtained from another computing device (e.g., via an API or another suitable connection or interface). Referring again to the aforementioned example in which the query response platform 302 is implemented as a mobile application executing on a mobile phone, the mobile phone could obtain the query data 304 from a server system (e.g., server system 110 of FIG. 1). In some implementations, the query data 304 may include information relating to health-related events, such as messages sent by a given human, logged medications, learning contents (e.g., activity packs) completed, meal / exercise / mood / weight / medication information submitted by the human, clinical readings completed and sent by an associated healthcare provider, laboratory test results and / or surveys submitted by the human. The server system may manage a datastore in which queries submitted by an individual are documented.
[0054] As mentioned above, sensor data could be obtained from sensors included in the computing device that is responsible for executing the query response platform 302, or sensor data could be obtained from sensors that are external to the computing device that is responsible for executing the query response platform 302. Thus, the first and second sensor data 306, 308 may be generated by sensors included in the computing device on which the query response platform 302 is executing, or the first and second sensor data 306, 308 may be generated by sensors that are external to the computing device on which the query response platform 302 is executing. As an example, the first sensor data 306 may be generated by an IMU implemented in the computing device on which the query response platform 302 is executing, while the second sensor data 308 may be generated by a pulse oximeter that is communicatively connected-either directly or indirectly—to the computing device on which the query response platform 302 is executing.
[0055] Wearable devices can include sensors and generate associated sensor datasets (e.g., sets of sensor data). For example, wearable devices can include any wearable technology (e.g., technology designed to be used while worn). Wearable technology can include smartwatches, smart glasses, activity trackers (e.g., pedometers), smart rings, hearing aids, or implants (medical or otherwise). Wearable devices and associated sensors can directly or indirectly collect data associated with a user's health, such as heart rate, calories burned, steps walked, blood pressure, release of biochemicals, time spent exercising, seizures, physical strain, body composition, and / or water levels. For example, wearable devices can utilize sensor data to determine periods of physical activity, including ambulatory periods, as well as periods of physical inactivity, including periods of sleep. As such, because wearable devices can be worn, such devices can collect data passively, enabling associated users (e.g., humans) to live freely during data collection. As such, wearable devices enable the collection and subsequent analysis of health-related data.
[0056] In some implementations, the sensors associated with the query response platform 302 can include other devices capable of collecting data. For example, sensors 222A-222N can include sensors, such as inertial measurement units or accelerometers, associated with mobile devices, such as smartphones, tablets, or laptop computers. For example, sensors 222A-222N can be housed on a smartphone carried within a human's pocket, thereby enabling dynamic collection of free-living data associated with the human's movement. In some implementations, sensor data can include location-based measurements, such as global positioning system (GPS) or network-based location data (e.g., from Internet Protocol (IP) addresses or connections to associated base stations within a telecommunication network). As such, the data collected at the query response platform 212 can include a variety of sensor measurements associated with movement or health, for example.
[0057] FIG. 4 depicts another example of a communication environment 400 that includes a query response platform 402 that is configured to obtain data from one or more sources. Here, the query response platform 402 may obtain data (e.g., queries, prompts, and / or content) from a mobile phone 404, watch 406, laptop computer 408, or server system 410 (collectively referred to as the “networked devices”). For example, the query response platform 402 may obtain response data (e.g., query data 304 of FIG. 3) from the laptop computer 408 or server system 410. As another example, the query response platform 402 may obtain sensor data (e.g., sensor data 306, 308 of FIG. 3) from the mobile phone 404 or watch 406.
[0058] The networked devices can be connected to the query response platform 402 via one or more networks. These networks can include PANs, LANs, WANS, MANS, cellular networks, the Internet, etc. Additionally or alternatively, the networked devices may communicate with one another over a short-range wireless connectivity technology. For example, if the query response platform 402 resides on the mobile phone 404 in the form of a mobile application, data may be obtained from the watch 406 over a Bluetooth communication channel while data may be obtained from the server system 410 over the Internet via a Wi-Fi communication channel.
[0059] Embodiments of the communication environment 400 may include a subset of the networked devices. For example, the communication environment 400 may include a query response platform 402 that obtains, in real time, data from the mobile phone 404 and watch 406 as that data is generated over the course of a free-living scenario. Additional data could be obtained from the server system 410 on a periodic basis (e.g., daily or weekly).
[0060] From the foregoing, it will be appreciated that specific embodiments of the invention have been described herein for purposes of illustration, but that various modifications may be made without deviating from the scope of the invention. Accordingly, the invention is not limited except as by the appended claims.Approaches to Generating Queries for Content Retrieval
[0061] FIG. 5 includes a schematic diagram of an approach 500 to generating natural language queries to aid in content retrieval in response to user prompts with a computer program executing on a computing device.A. Data Retrieval
[0062] As mentioned above, the query response platform can include a data processing component-namely a generation module 214, as shown in FIG. 2. Initially, a query response platform (e.g., the query response platform 102) can retrieve data from one or more sources (e.g., at an operation 501, through the generation module 214). For example, the generation module 214 can retrieve content (e.g., natural language data) from one or more content databases, where such content can include specialized, updated, and / or information tailored to the query response platform. The content database can include natural language queries relating to the natural language dataset, such as questions associated with particular natural language data. In some implementations, the natural language queries include questions that the particular natural language data is expected or intended to answer (e.g., as determined by an author, administrator, and / or a module of the query response platform 212). For example, the generation module 214 can retrieve, from one or more databases communicably linked to the computing device 104 shown in FIG. 1, data, texts, and / or other suitable information (e.g., content). By retrieving such information, the generation module214 can improve the ability of the query response platform to generate relevant and accurate information for presentation to a given individual based on the individual's query, as described below.
[0063] The query response platform (e.g., the query response platform 102) can retrieve information (e.g., a content dataset) from a content database (e.g., a digital corpus). As an illustrative example, the digital corpus and / or content database can include written suggestions for managing a given health condition. The content dataset can include a natural language dataset and / or associated natural language queries relating to the natural language dataset. For example, a natural language dataset can include information, data, or other suitable knowledge or intelligence in a natural language format. Such data can include textual data (e.g., text snippets and / or information in the form of text files, portable document formats, images of textual data, and / or other suitable information), audio data (e.g., in the form of audio recordings of speech), and / or video data including natural language (e.g., images and / or audio recordings associated with language).
[0064] FIG. 6 includes a schematic diagram 600 of identifying content and associated queries based on historical conversation data. For example, the query response platform 102 can retrieve historical messages 602 (e.g., from a content database). The query response platform 102, through the generation module 214, can find conversations with content cards (e.g., natural language datasets) at operation 604.
[0065] For example, a natural language dataset retrieved by the query response platform 102 includes a transcript and / or a recording (e.g., audio or video) of a previous conversation between a healthcare provider and a patient, such as associated with an instant message conversation or an email chain (e.g., from a conversation database storing conversations between individuals). Such information can include textual queries and associated textual responses to the textual queries. In some implementations, the natural language dataset includes information from a digital corpus that includes an authoritative source, such as a governmental healthcare agency, a hospital publication, and / or an academic publication. The natural language dataset can include an expert-written lifestyle and / or health suggestion (e.g., including information for managing health conditions, such as diabetes). By retrieving such information, the natural language dataset can leverage accurate information that is able to be updated, modified, and / or verified in order to generate responses to queries from individuals (e.g., healthcare providers and / or associated patients). In some implementations, a natural language dataset comprises one or more paragraphs, sentences, and / or words that are related by subject matter (e.g., by disease).
[0066] The content dataset can include natural language queries associated with natural language datasets. For example, the content dataset can include queries, questions, or inquiries associated with a given natural language dataset (e.g., with a given conversation, publication, and / or text snippet). Additionally or alternatively, the content dataset does not include queries associated with particular natural language datasets. For example, the query response platform 102 enables generation of natural language queries for natural language datasets with no previous associated queries. In some implementations, the queries can include data structures (e.g., text strings) representing questions relating to the content within the natural language dataset. A query can include an individual's (e.g., a patient's) query to a coach within a previous text message conversation regarding a particular lifestyle or health condition, such as a question directed to the best workout regimen for managing chronic diabetes. The content dataset can store such a question, as well as the associated response from the coach, within a record of the content database. For example, a record of the content dataset includes a field associated with a query and an associated field associated with a response to the query and / or information relevant to the query. In some embodiments, the natural language queries of the content database include queries previously generated (e.g., via the generation module 214 at the operation 502), as described below. By retrieving information relating to queries and associated relevant information, the query response platform 102 can simulate possible questions from individuals relating to specialized knowledge, thereby improving the ability to answer similar questions in an automated fashion.
[0067] In some implementations, the query response platform 102 can evaluate stored natural language queries and associated natural language datasets based on relevancy. For example, messages provided (e.g., by an authoritative entity, such as a coach) may be irrelevant or incompatible with the individual's query within a conversation stored within the content database. Such cases can occur when the healthcare provider initiates a conversation, in circumstances of a chance in conversation topic, and / or if there is additional information within the associated application or interface to which the individual or patient is reacting. As such, at the operation 606 shown in FIG. 6, the query response platform 102 can filter natural language datasets and / or associated queries for relevance to generate curated questions-and-card pairs 608 (e.g., to generate a record of the content database). In some implementations, the query response platform 102 can further modify the records of the content database by removing sensitive information (e.g., using logic / rules and / or an associated LLM) at the operation 610. For example, the query response platform 102 can remove private information (e.g., Personal Identifiable Information (PII)) or unrelated information from conversations. Based on this sensitive information removal, the generation module 214 can generate simulated dataset-query pairs at the operation 612 for addition to the content database at the operation 614.B. Query Generation
[0068] At the operation 502 of the approach 500 of FIG. 5, the query response platform 102 (e.g., through generation module 214) can generate simulated questions based on information within the content dataset. For example, the query response platform 102 can provide a given natural language dataset and associated queries of the content database to an LLM to generate further queries.
[0069] FIG. 7 includes a schematic diagram of a flow 700 for generating (e.g., simulating) and evaluating queries for use in content retrieval. For example, the computation module 216 can provide the natural language dataset and associated queries (e.g., content cards 702) to an LLM 704 for generation of queries. In some implementations, the query response platform 102 can utilize a downsampling algorithm 706 to select a subset of the natural language queries for evaluation. In some implementations, the evaluation can be carried out by experts and / or other authoritative entities (e.g., via expert feedback operation 708). Additionally or alternatively, the query response platform 102 can train an auto-evaluation model to evaluate queries in an automated manner at the operation 710 for generation of further relevant queries.
[0070] An LLM (e.g., the LLM 704 of FIG. 7) can include a model capable of general-purpose language generation and / or other natural language processing tasks, such as classification. For example, an LLM includes an artificial neural network with one or more architectures, such as a decoder-only transfer-based architecture, a recurrent neural network, and / or other similar techniques. For example, an LLM generates an output (e.g., a response) based on an input prompt. An LLM can include a tokenization algorithm to generate vector or numerical forms of text for training and / or output generation. In some implementations, an LLM includes a large number of parameters (e.g., weights, biases, and / or a number of hidden layers) and can include one or more attention mechanisms and / or feedforward neural networks. LLMs can include supervised, self-supervised, and / or unsupervised learning techniques. For example, an LLM can be configured to predict a next word or sequence of words in a given context by learning probabilistic properties of natural language. In some implementations, LLMs can capture complex linguistic patterns, semantic information, and / or syntax to perform a variety of NLG and processing tasks.
[0071] In some implementations, the query response platform 102 (e.g., through the generation module 214) can generate prompts for provision to one or more LLMs, to generate queries, evaluation metrics, and / or other information based on input prompts, queries, and / or data. For example, the query response platform 102 can generate one or more output queries based on an input that includes a natural language dataset and associated queries (e.g., a subset of the natural language queries associated with the natural language dataset). For example, the generation module 214 can generate an output query based on existing queries (e.g., requesting information relating to lifestyle-related management of diabetes) and associated natural language data (e.g., including associated expert-curated lifestyle suggestions).
[0072] An output query can include a question, query, inquiry, or request that is associated with or representative of a natural language question (e.g., relating to a particular set of information). For example, an output query can include a simulated question relating to particular content (e.g., relating to a healthcare provider's advice relating to leading a life with chronic diabetes). An LLM (e.g., the LLM 704 of FIG. 7) can generate the output query to be related to but different from existing queries that are associated with the particular content. For example, the query response platform 102 can request that the LLM generate a different, relevant question associated with particular natural language text within the content database. By doing so, the query response platform 102 can simulate possible questions that patients or other individuals may ask, thereby enabling the system to classify the associated content according to such questions for further retrieval and personalization in response to dynamically received queries in an automated manner.C. Query Evaluation
[0073] At the operation 503 of the approach 500 of FIG. 5, the query response platform 102 (e.g., through the computation module 216) can evaluate existing and / or generated queries of the content database (e.g., for relevance and / or diversity).
[0074] In some implementations, the query response platform 102, through the computation module 216, can generate a subset of the generated queries (e.g., for evaluation) within the content database (e.g., through a sampling algorithm). A sampling algorithm can include an algorithm or process that is configured to select a set of data (e.g., queries) in a representative manner (e.g., to select a diverse set of questions that are directed to different aspects of the associated natural language data). For example, the sampling algorithm can include a k-means clustering algorithm that selects a diverse set of questions within a vector space that represents the semantic information of these questions. For example, the query response platform 102 can partition vector representations of the queries into a particular number of clusters (e.g., k clusters), where each vector representation belongs to a cluster associated with the nearest mean vector position. The algorithm can select a query corresponding to a vector representation from each of these clusters, thereby generating the subset of generated queries. As such, the query response platform 102 can sample the generated queries in a manner that enables evaluation of generated queries for further tuning and / or validation. Additionally or alternatively, the sampling algorithm can include a random selection of the set of queries, or a selection according to another suitable selection mechanism or probability distribution.
[0075] In some implementations, the query response platform 102, through the computation module 216, can evaluate the generated queries. In some implementations, the query response platform 102 can transmit the subset of natural language queries to a device associated with an administrator system and / or an expert in associated subject matter (e.g., a subject matter expert), such as at the operation 708 shown in FIG. 7. For example, the query response platform 102 can request that a human evaluator generate an evaluation metric associated with “Real Intent” and / or “Answerability.” For example, the query response platform 102 can receive a response (e.g., a rating within a numerical range, such as 0 to 100 or 0 to 5) from a human that evaluates an extent to which a given question (e.g., of the subset) is likely to be realistically asked by a user of the query response platform 102. Additionally or alternatively, the query response platform 102 can receive a response (e.g., a rating within a numerical range) that evaluates an extent to which a given question (e.g., of the subset) is answerable from the information within the associated natural language data (e.g., the associated content within the content database). For example, the query response platform 102 can determine whether each of the ratings is greater than a threshold value (e.g., a value of 90 out of 100 or above); based on this determination, the query response platform 102 can generate further questions based on the subset of queries. In the event that the query response platform 102 determines that one or both of the ratings do not meet the threshold value, the query response platform 102 can remove the associated query from the subset and re-generate questions and / or request further simulated queries from the human evaluators.
[0076] The query response platform 102 can further evaluate the output (e.g., in an automated manner), thereby generating a metric that evaluates the effectiveness and / or relevance of a generated question. For example, the query response platform 102 can generate an answerability metric and / or a diversity metric that characterizes the relevance and / or uniqueness of the generated query.
[0077] An answerability metric can include a metric that is representative of a measure of relevance of the natural language question (e.g., of the subset of natural language queries) to the natural language dataset. As an illustrative example, the query response platform 102 can provide the natural language question (e.g., a simulated query), the natural language dataset (e.g., a published article and / or a response by a healthcare provider or coach to a patient / user) to an LLM, with a prompt (e.g., an answerability evaluation prompt) that requests an evaluation of the relevance of the question to the dataset (e.g., on a particular numerical scale, such as from 0 to 5, 0 to 100, or another suitable scale). The query response platform 102, via the LLM, can generate a metric that evaluates whether the question is able to be answered by the information within the natural language dataset, thereby characterizing the relevance of the simulated query. By doing so, the query response platform 102 can ensure that generated questions are indeed associated with the related content.
[0078] A diversity metric can include a metric that is representative of a measure of an average distance (e.g., semantic distance) between a given simulated question and the related natural language dataset. For example, the query response platform 102 can generate vector representations of the questions within the subset of natural language queries, where such vector representations represent the semantic, syntactic, and / or lexical information within the queries. The query response platform 102, via the computation module 216, can generate a set of distances, where each distance is between the given simulated question and each of the other queries within the subset of natural language queries. In some implementations, the query response platform 102 can determine a distance that is associated with a cosine similarity between associated vector representations. Based on such distances, the query response platform 102 can determine an average distance (e.g., normalized to a particular unit and / or reference distance). By doing so, the query response platform 102 prevents the generation of duplicate questions (or questions that are effective duplicates of other simulated questions). As such, the query response platform 102 can improve the applicability of a given natural language dataset (e.g., of given healthcare information) to various user queries, requests, or prompts.
[0079] The query response platform 102 can generate a metric based on the answerability metric and / or the diversity metric. The metric can include a composite metric of the answerability metric, the diversity metric, and / or any other suitable metrics (e.g., an associated “Real Intent” metric as determined by a human evaluator). For example, the metric can include a geometric mean or a product (e.g., normalized or not normalized by a standard value) of the answerability metric and / or the diversity metric. The query response platform 102 can compare one or more of such metrics with a threshold metric. For example, the query response platform 102 can compare the geometric mean of the diversity metric and the answerability metric with an associated threshold metric prior to adding the generated query to the content database. For example, the query response platform 102 can determine that the geometric mean of the diversity metric and the answerability metric of a particular generated query is greater than a threshold value; in response to this determination, the query response platform 102 can store the generated query within a record of the content database that is associated with the related natural language dataset (e.g., the particular text conversation or publication). By doing so, the query response platform 102 enables generation of queries that are relevant and diverse, thereby improving the ability of the platform to retrieve information that is useful for responding to an individual's particular query.
[0080] FIG. 8 includes a schematic diagram of a flow 800 for generating outputs in response to user prompts based on the retrieval of relevant content. For example, in stage 802, the query response platform 102 can store questions from expert review (e.g., generated through the operation 806) and the generated or simulated questions (e.g., based on historical messages, as in the operation 808) within the content database (e.g., the content database 804).Approaches to Generating Responses to Queries
[0081] The query response platform 102 is configured to generate responses to questions by individuals (e.g., associated with health conditions) by retrieving information within the content database. For example, the query response platform 102 compare the individual's query with simulated and / or generated questions within the content database to rank and retrieve information that is relevant to answering the received query.
[0082] The query response platform 102 can receive (e.g., via the communication module 208) a user question (e.g., from an individual). For example, the query response platform 102 can receive the user question 812, as shown in FIG. 8. The user query can include an inquiry, prompt, or request from a user (e.g., an individual, a patient, and / or a healthcare provider). For example, the user query includes an inquiry for healthcare-related information (e.g., associated with how to manage symptoms of a particular illness). In some implementations, the user query is in a textual form (e.g., in the form of a natural language inquiry that is text-based). Additionally or alternatively, the user query can include auditory information (e.g., via an audio recording of a question by a user), and / or video information (e.g., via a video recording of a question), and or other suitable natural language sources. By receiving queries from users, the query response platform 102 can provide validated, accurate, and / or personalized responses to such users based on information stored within the content database.A. Similarity Analysis
[0083] The query response platform 102 can determine a similarity of the user question with previously generated or received questions associated with given content. For example, at the operation 504 of the approach 500 of FIG. 5, the query response platform 102 (e.g., through the analytics module 218) can evaluate the similarity of the user's query to the queries within the content database. By doing so, the query response platform 102 enables identification of relevant information in response to the user's query, thereby improving the accuracy and relevance of answers provided to users.
[0084] The query response platform 102 can generate similarity metrics between a given user query and queries associated with information within the content database. For example, in some implementations, the query response platform 102 can generate vector representations of the query and the queries within the content database. For example, the query response platform 102 can generate vector representations via a doc2vec or word2vec, a bag-of-words, or another suitable vectorization / tokenization algorithm. The query response platform 102 can determine a similarity metric between the query and a particular query of the content database based on calculating a vector distance (e.g., and / or a cosine similarity metric) between the respective vector representations. By doing so, the query response platform 102 can identify queries (e.g., previously asked queries and / or simulated / generated queries) associated with content that is relevant to the user's query, thereby enabling the query response platform 102 to identify and retrieve the relevant content for transmission to the user in response to the query.B. Content Retrieval
[0085] The query response platform 102, at stage 810 (as shown in FIG. 8), can retrieve relevant content on the basis of the user question 812 (e.g., and the generated similarity metrics). For example, the query response platform 102 can, at operation 816, generate a ranking of content based on the similarity of associated queries with the individual's query (e.g., the user question 812). By doing so, the query response platform 102 enables identification of relevant information for responding to the user query.
[0086] For example, the query response platform 102, via the analytics module 218 and at the operation 505 of the approach 500 of FIG. 5, can generate a ranking of the natural language queries within the content database based on the similarity metrics (e.g., where the ranking is from the most similar to the user query to the least similar to the user query).
[0087] To illustrate, the query response platform 102 can rank the calculated similarity metrics by their values and identify the associated query and content linked to each similarity metric. The query response platform 102 can identify the query and associated content (e.g., the associated natural language dataset / written suggestion) associated with the largest similarity metric of the set of calculated similarity metrics. By doing so, the query response platform 102 can identify the information that is most relevant to the user's query, thereby enabling further personalization of such information and transmission of the information to the user in response to the user's query.
[0088] In some implementations, the query response platform 102 can determine two or more similarity metrics that are identical and / or differ to within a threshold difference (e.g., a threshold uncertainty / error). The query response platform 102 can determine a “tie” between the relevance of the content corresponding to these similarity metrics. In order to break the tie (e.g., to select a particular natural language dataset / content for generation of the response to the user), the query response platform 102 can determine a query density metric that characterizes a number of queries associated with the particular content datasets (e.g., associated with the tied similarity metrics). For example, the query density metric can characterize the usefulness of a particular content dataset in answering a variety of questions. The query response platform 102 can select a content dataset associated with the identical or “tied” (e.g., similar) similarity metrics, where the selected content dataset has a greater query density metric. By doing so, the query response platform 102 can select a dataset with a higher likelihood of providing answers to the user's queries. As such, the query response platform 102 enables content retrieval on the basis of generated similarity metrics and the predicted strength of content to answer queries.
[0089] For example, the query response platform 102 can retrieve information associated with the individual, such as health information. Such health information can include information such as the individual's name, sex, age, gender, geographic location, as well as information relating to health conditions (e.g., diagnoses, laboratory test results, etc.). For example, the health information includes HbA1c levels and / or blood glucose levels, as measured by devices and / or laboratory test results. As such, the query response platform 102 can tailor responses associated with the user's query based on healthcare information and / or other user information, thereby improving the accuracy and relevance of information provided to the user in response to the query. For example, the query response platform 102 can leverage a personalization module 814 to generate an output that is personalized to the user (e.g., based on information associated with the user's medical history and / or previous queries). To illustrate, the query response platform 102 can select content datasets that are relevant to the user given the user's condition and / or demographic information, thereby improving the quality of information presented to the user and preventing the selection of misleading information (e.g., associated with the wrong demographic).
[0090] In some implementations, the query response platform 102 can determine that there is insufficient content (e.g., that the greatest similarity metric is less than a threshold similarity metric). Based on this determination, the query response platform 102 can transmit the user query to an administrator system (e.g., at the operation 826 of FIG. 8) for an expert to review the user query and / or associated content. By doing so, the query response platform 102 enables the validation and / or generation of accurate responses in situations of insufficient confidence in the answerability of the user query.C. Output Generation
[0091] Based on the retrieved content, the query response platform 102 can generate an output in response to the user's query. For example, the query response platform 102, using the GUI module 220, can generate an output at operation 506 of FIG. 5. To illustrate, the query response platform 102 can provide the retrieved content to an LLM (e.g., at the operation 818 of FIG. 8) to generate an output that is tailored to and / or personalized for the user.
[0092] For example, the query response platform 102 can generate output content (e.g., a response to the user query). To illustrate, the query response platform 102 can generate a prompt that includes the user's query, the retrieved content (and / or associated personalized information associated with the user), and a request to generate an answer to the user's query based on the retrieved content. By providing these prompts to the LLM, the query response platform 102 can generate an associated answer that is tailored to the user's concerns and is based on expert-reviewed and / or accurate information within the content database.
[0093] In some implementations, the query response platform 102 can evaluate the generated output (e.g., the output content) based on policy and / or safety requirements. For example, the query response platform 102 can include a policy database that includes criteria and / or style information that characterizes the desired output to be transmitted to the user. For example, the query response platform 102 can, at the operation 820 of FIG. 8, provide the generated output to an LLM to revise / modify the output according to policies (e.g., including style guidelines, sets of principles). For example, the query response platform 102 can modify the response to prevent automated prescription of medications, clinical advice, and / or irrelevant answers. For example, the query response platform 102 can generate or modify the generated output content to show empathy towards the user (e.g., based on a sentiment analysis algorithm), and / or modify the output to follow a particular writing style. By doing so, the query response platform 102 can ensure the safety and compliance of the generated output according to policies associated with the query response platform 102.
[0094] In some implementations, the query response platform 102 can evaluate the safety of the generated / modified output (e.g., at the operation 822 of the FIG. 8). For example, the query response platform 102 can check that policies (e.g., of the policy database) are consistent with the generated output (e.g., by providing this output to an LLM). In some implementations, the query response platform 102 can check for similarity in the final answer provided to the user and the reference documents (e.g., the associated retrieved content of the content database) to ensure the accuracy and consistency of information provided to the individual in response to the user query. For example, the query response platform 102 can identify a risk level to the generated output (e.g., low, medium, or high) based on the safety check.
[0095] Based on determining a low risk associated with the generated output, the query response platform 102 can generate the response (e.g., the generated output) for display on a user interface associated with the individual (e.g., at the operation 824 of FIG. 8). For example, the query response platform 102 can, via the GUI module 220, generate a text message (e.g., within a “chat bubble”) that includes the response.
[0096] Based on determining a medium or a high risk associated with the generated output, the query response platform 102 can transmit the response for expert review (e.g., to an administrator device, at the operation 826 of FIG. 8). For example, the query response platform 102 can request that an expert (e.g., a healthcare provider and / or a coach) provide a response to the user query based on determining a safety issue associated with the query. In some implementations, the query response platform 102 can receive and store the associated response (e.g., updated content) from the expert within the content database for further use in response to further queries.Methodologies for Generating Responses to User Queries with a Computer Program
[0097] Several approaches to generating responses to user queries with a computer program executing on a computing device are set forth below. These approaches are best understood when read in conjunction with the disclosure corresponding to FIGS. 5-8.
[0098] FIG. 9 is a flow diagram of a process 900 for generating output queries associated with retrievable content to aid in natural language response generation.
[0099] At operation 901, the query response platform 102 can retrieve a natural language dataset and associated queries from a content database. For example, the query response platform 102 retrieves, from a content database, a first content dataset that includes (i) a natural language dataset and (ii) natural language queries relating to the natural language dataset. As an illustrative example, the query response platform 102 can retrieve a previous query from a user of a healthcare tracking application to an associated healthcare provider or coach, as well as the coach's or provider's response to the query. By retrieving such information, the query response platform 102 can retrieve information that is relevant for responding to users' further queries.
[0100] In some implementations, the query response platform 102 retrieves natural language data and queries corresponding to a textual conversation. For example, the query response platform 102 retrieves, from a conversation database, conversation data comprising textual queries and associated textual responses. The query response platform 102 can determine, from the conversation data, a first textual response associated with a first textual query. The query response platform 102 can store (i) the first textual response as the natural language dataset and (ii) the textual query as a first natural language query of the natural language queries relating to the natural language dataset. As an illustrative example, the queries and associated content / information are associated with a conversation (e.g., within an instant messaging application) and include a response to a query within the conversation. As such, the query response platform 102 can leverage conversations between a subject matter expert and a patient to enable retrieval of relevant information in response to user queries.
[0101] At operation 902, the query response platform 102 can determine a subset of natural language queries (e.g., using a sampling algorithm). As an illustrative example, the query response platform 102 can use a k-means sampling algorithm to determine a subset of queries associated with a particular dataset (e.g., with a particular conversation or publication) that are representative of the breadth of generated queries. By doing so, the query response platform 102 enables evaluation of queries for their relevance, breadth, and answerability to improve the effectiveness of content retrieval.
[0102] At operation 903, the query response platform 102 can provide the natural language dataset and subset of queries to an LLM to generate an output query. For example, the query response platform 102 provides (i) the natural language dataset and (ii) the subset of the natural language queries to a first large language model (LLM) to generate an output query that is representative of a natural language question relating to the first content dataset. As an illustrative example, the query response platform 102 can provide the retrieved content, as well as the associated subset of queries to an LLM to generate further queries that are relevant to the content but distinct from the existing queries. By doing so, the query response platform 102 enables association of the content with other possible questions or queries that may afflict users, thereby improving the applicability of the given information (e.g., relating to a particular disease) to a variety of possible inquiries.
[0103] At operation 904, the query response platform 102 can generate an answerability metric and a diversity metric for the output query. For example, the query response platform 102 generates, for the output query, (i) an answerability metric that is representative of a measure of relevance of the natural language question to the natural language dataset of the first content dataset, and (ii) a diversity metric that is representative of a measure of average distance of the natural language question to the natural language queries. As an illustrative example, the query response platform 102 can generate metrics that characterize the relevance and the breadth of the generated queries; by generating relevant and broad types of queries, the query response platform 102 can associate the given information with a greater number and variety of user queries, thereby improving the applicability of stored information in responding to a plethora of user concerns and queries (e.g., a wider variety of questions relating to a particular health condition).
[0104] In some implementations, the query response platform 102 generates an answerability metric based on providing the output query to an LLM for evaluation. For example, the query response platform 102 generates an answerability evaluation prompt comprising (i) the natural language dataset, (ii) the output query, and (iii) a metric generation request. The query response platform 102 can provide the answerability evaluation prompt to a second LLM to generate the answerability metric, where the answerability metric includes a representation of a numerical value. As an illustrative example, the query response platform 102 can characterize the relevance of a given generated query with the associated content by determining a numerical value characterizing the relevance. By evaluating the query as such, the query response platform 102 can prevent the generation of irrelevant queries, thereby improving the accuracy and effectiveness of content retrieval.
[0105] In some implementations, the query response platform 102 generates a diversity metric based on determining distances between the output query and other queries of the subset of natural language queries. For example, the query response platform 102 generates a first output vector representing the output query. The query response platform 102 can generate a set of query vectors, where each vector of the set of vectors can represent a respective natural language query of the first content dataset. The query response platform 102 can determine a set of distances, where each distance of the set of distances can include a vector distance between the first output vector and a respective query vector of the set of query vectors. The query response platform 102 can determine, based on the set of distances, the measure of average distance. The query response platform 102 can generate the diversity metric based on a normalization of the measure of average distance. As an illustrative example, the query response platform 102 can characterize the generated query based on its similarity with previously generated and / or stored queries, thereby enabling the query response platform 102 to mitigate the generation of redundant questions. By doing so, the query response platform 102 improves the applicability of given information to different concerns, queries, or requests (e.g., associated with a wider variety of healthcare concerns relating to a particular medical condition).
[0106] At operation 905, the query response platform 102 can generate a metric based on the answerability and diversity metrics for evaluating the output query. For example, the query response platform 102 generates, using the output query, a metric for evaluating the output query produced by the first LLM based on the answerability and diversity metrics generated for the output query. As an illustrative example, the query response platform 102 can generate a metric for evaluating the overall effectiveness of a generated query based on its relevance to the associated content (e.g., answerability) and its ability to add breadth to the applicability of the content (e.g., diversity). By doing so, the query response platform 102 improves the quality and effectiveness of queries for improved content retrieval.
[0107] In some implementations, the query response platform 102 generates a geometric mean as a metric to evaluate the output query. For example, the query response platform 102 determines a geometric mean of the answerability metric and the diversity metric. The query response platform 102 can generate the metric including a normalized representation of the geometric mean. In some implementations, the query response platform 102 generates a product as a metric to evaluate the output query. For example, the query response platform 102 determines a product of the answerability metric and the diversity metric. The query response platform 102 can generate the metric including a normalized representation of the product. By generating a compound metric based on the answerability metric and the diversity metric, the query response platform 102 better characterizes the effectiveness of a given query in providing useful, applicable content retrieval in response to user queries.
[0108] At operation 906, the query response platform 102 can determine whether the metric for evaluating the output query satisfies a criterion. As an illustrative example, can determine whether the generated metric indicates that the query is effective as a tool to identify and retrieve relevant content in response to further user queries. In some implementations, the query response platform 102 can compare the metric with a threshold metric to determine whether the output query satisfies the criterion. For example, the query response platform 102 determines that the criterion includes a threshold metric. The query response platform 102 can compare the metric for evaluating the output query with the threshold metric. The query response platform 102 can determine that the metric for evaluating the output query is greater than or equal to the threshold metric. By doing so, the query response platform 102 can ensure that generated queries are effective, relevant to the associated content, and not redundant, thereby improving the effectiveness of content retrieval.
[0109] At operation 907, the query response platform 102 can update the natural language queries of the content database to include the generated output query. For example, the query response platform 102 updates the natural language queries to include the output query in response to a determination that the metric for evaluating the output query satisfies the criterion. As an illustrative example, the query response platform 102 can update the natural language queries to include the generated query. For example, the query response platform 102 can generate the output query within an associated record within the content database. By doing so, the query response platform 102 enables retrieval of content based on receiving a user query similar to the generated output query, thereby improving the relevance of information provided to the user in response to the user query.
[0110] In some implementations, the query response platform 102 can add the output query to an associated record of the content database. For example, the query response platform 102 identifies a record of the content database, where the record can be associated with the first content dataset. The query response platform 102 can determine a field of the record, where the field can be associated with the natural language queries of the first content dataset. The query response platform 102 can store the output query within the field associated with the natural language queries of the first content dataset. As an illustrative example, the query response platform 102 can add the output query to a record that corresponds to the content or information with which the output query is associated, thereby linking the output query with associated, relevant information.
[0111] FIG. 10 is a flow diagram of a process 1000 for generating natural language outputs in response to user queries, based on related queries and associated content.
[0112] At operation 1001, the query response platform 102 can receive a query from an individual. For example, the query response platform 102 receives, from another computing device, a query from an individual for healthcare-related information. As an illustrative example, the query response platform 102 can receive a question by a patient or relating to a health condition (e.g., diabetes). As such, the query response platform 102 enables automated responses to specific queries by individuals, thereby demonstrating the flexibility of the platform in generating responses to queries.
[0113] At operation 1002, the query response platform 102 can retrieve a set of content datasets from a content database. For example, the query response platform 102 retrieves, from a content database, a set of content datasets. Each content dataset of the set of content datasets can include (1) an associated natural language dataset and (2) an associated set of natural language queries relating to the associated natural language dataset. As an illustrative example, the query response platform 102 can retrieve information / content that is potentially relevant to the query, such as previous conversations between users and healthcare providers or coaches, published data, and / or other associated, authenticated / validated, or accurate information. Such information can be associated with previous users' queries and / or generated queries (e.g., queries generated at process 900, as described above). By retrieving such information, the query response platform 102 can improve the quality and specificity of knowledge associated with the LLM, by supplementing with pre-existing and / or updated information (e.g., relating to rapidly changing health conditions, such as those associated with pandemics).
[0114] At operation 1003, the query response platform 102 can compare the query from the individual with each of the natural language queries of the content database. As an illustrative example, the query response platform 102 can determine a similarity of the queries stored within the content database with the user's query, to aid in the determination of a relevant set of information (e.g., associated with a health condition associated with the user's query).
[0115] At operation 1004, the query response platform 102 can generate similarity metrics to characterize the similarity of the individual's query with each of the natural language queries. For example, based on comparing the query from the individual with each of the natural language queries, the query response platform 102 generates a set of similarity metrics. Each of the similarity metrics can be representative of a measure of similarity between the query from the individual and a corresponding one of the natural language queries, the corresponding natural language query being associated with a particular content dataset of the set of content datasets. As an illustrative example, the query response platform 102 can determine the extent of similarity between the user's query and pre-existing queries associated with different information of the content database. By doing so, the query response platform 102 enables identification of relevant information (e.g., associated with particular health conditions or symptoms) that is more likely to provide answers to the user's questions within the query.
[0116] In some implementations, the query response platform 102 can generate the similarity metrics based on calculating associated vector distances. For example, the query response platform 102 generates a first vector representing the query from the individual, where the first vector includes semantic information relating to the query. The query response platform 102 can generate a set of vectors. Each particular vector of the set of vectors can represent a respective natural language query of the content database. The particular vector can include semantic information relating to the respective natural language query. The query response platform 102 can determine, for each particular vector of the set of vectors, a respective vector similarity, where the respective vector similarity indicates a vector distance between the particular vector and the first vector. The query response platform 102 can generate the set of similarity metrics corresponding to the respective vector similarities. As an illustrative example, the query response platform 102 can generate vector representations of the queries using a vectorization or tokenization algorithm (e.g., word2vec, doc2vec, or bag-of-words algorithms). By doing so, the query response platform 102 can evaluate stored queries associated with existing healthcare-related information / content according to their relevance to the user's current query.
[0117] At operation 1005, the query response platform 102 can determine a first content dataset that is relevant to the individual's query (e.g., based on the similarity metrics). For example, the query response platform 102 determines a first content dataset of the set of content datasets that is associated with a first similarity metric of the set of similarity metrics. As an illustrative example, the query response platform 102 can determine content of the content database that is associated with a query that is most similar to the user query. The query response platform 102 can select a most similar natural language query based on the similarity metrics and determine that the first content dataset is associated with the most similar natural language query. By doing so, the query response platform 102 can identify stored queries associated with existing healthcare-related information / content that are most relevant to the user's current query.
[0118] In some implementations, the query response platform 102 determines the first content dataset based on a ranking of the similarity metrics. For example, the query response platform 102 generates a set of rankings according to the set of similarity metrics. The query response platform 102 can determine the first similarity metric according to the set of rankings. The query response platform 102 can determine a first natural language query of the natural language queries of the content database. The first natural language query can be associated with the first similarity metric. The query response platform 102 can determine that the first content dataset is associated with the first natural language query. As an illustrative example, the query response platform 102 can determine a ranking of content based on the associated queries' similarity with the user's query. By doing so, the query response platform 102 simplifies the determination of relevant content in response to the user's query, thereby improving the efficiency of content retrieval.
[0119] At operation 1006, the query response platform 102 can determine a query density metric associated with the determined content dataset. For example, the query response platform 102 determines a first query density metric for the first content dataset. The first query density metric can indicate a number of natural language queries associated with the first content dataset. As an illustrative example, the query response platform 102 can determine how many queries are associated with given content, which can indicate the applicability of the content to a wide variety of situations or queries (e.g., generalizability of the given content). Such content may be determined to be more likely to answer a user's question, thereby enabling the query response platform 102 to break any ties with respect to similarity metrics (e.g., by selecting content that is associated with more stored queries).
[0120] At operation 1007, the query response platform 102 can generate a response to the individual's query based on the content dataset. For example, the query response platform 102 generates, in response to determining the first query density metric and for display on a user interface of the other computing device, a representation of the first content dataset. As an illustrative example, the query response platform 102 can generate a response to the user query on a user interface (e.g., within a chat bubble associated with a text message conversation), thereby providing automated responses to users in response to healthcare-related queries.
[0121] In some implementations, the query response platform 102 generates output content by providing the content dataset to an LLM. For example, the query response platform 102 can retrieve the first content dataset from the content database. The query response platform 102 can provide the first content dataset and the query from the individual to a first LLM to generate output content. The output content can be specific to the query from the individual. The query response platform 102 can generate, for display on the user interface, the output content. As an illustrative example, the query response platform 102 can generate a personalized, targeted version of the retrieved information (e.g., relating to the user's health condition, such as chronic diabetes) for display to the user. By doing so, the query response platform 102 can more directly answer questions from the individual, even if the associated natural language dataset does not include suitable wording in response to the particular question posed by the individual.
[0122] In some implementations, the query response platform 102 can personalize the generated output based on personal information associated with the individual. For example, the query response platform 102 retrieves, from a user database, health information relating to the individual. The query response platform 102 provides the health information to the first LLM to generate the output content, wherein the output content is specific to the individual. As an illustrative example, the query response platform 102 can include laboratory test results, such as HbA1c test results and / or blood glucose level results, for display to the user. In some implementations, the query response platform 102 can include other information, such as demographic information, location information, or other suitable data associated with the user to personalize the response. By doing so, the query response platform 102 can improve the applicability of the response to the user in response to the user's question, thereby preventing misleading responses (e.g., that are more suitable for users of a different age or medical condition).
[0123] In some implementations, the query response platform 102 determines that the output transmitted to the user in response to the query satisfies any policies of a policy database. For example, the query response platform 102 retrieves a first criterion from a policy database. In some implementations, the first criterion is for evaluating the representation of the first content dataset. The query response platform 102 can determine that the representation of the first content dataset satisfies the first criterion. In response to determining that the representation of the first content dataset satisfies the first criterion, the query response platform 102 can generate the representation of the first content dataset. As an illustrative example, the query response platform 102 can determine to transmit the response to the user based on a determination that the response satisfies any policies associated with the platform (e.g., regarding style and / or the existence of sensitive information within the response). For example, the query response platform 102 can determine that the response does not include a medical prescription or other forbidden instructions, thereby ensuring the compliance of the response with respect to any required policies.
[0124] In some implementations, the query response platform 102 can transmit the output for administrator review (e.g., expert review) on the basis of determining that the dataset does not satisfy the policy-based criteria. For example, the query response platform 102 retrieves a first criterion from a policy database. In some implementations, the first criterion is for evaluating the representation of the first content dataset. The query response platform 102 can determine that the representation of the first content dataset does not satisfy the first criterion. In response to determining that the representation of the first content dataset does not satisfy the first criterion, the query response platform 102 can transmit, to an administrator device, a request for content review. The query response platform 102 can receive, from the administrator device and in response to the request for content review, updated content. The query response platform 102 can generate, for display on the user interface of the other computing device, the updated content. As an illustrative example, the query response platform 102 can leverage human experts for generation of information in situations where policies or safety rules are not satisfied by the generated output. By doing so, the query response platform 102 can generate or update the output according to expert review, thereby ensuring the accuracy, relevance, and safety of information provided to the user.
[0125] In some implementations, the query response platform 102 stores the updated content within the content database. For example, the query response platform 102 stores, within the content database, (i) the updated content and (ii) the query from the individual. As an illustrative example, the query response platform 102 enables storage of the updated response by the expert for further retrieval, thereby improving the platform's response to similar queries by other users in the future.Processing System
[0126] FIG. 11 is a block diagram illustrating an example of a processing system 1100 in which at least some operations described herein can be implemented. For example, components of the processing system 1100 may be hosted on a computing device that includes a query response platform e.g., the query response platform 102 of FIG. 1, query response platform 212 of FIG. 2, query response platform 302 of FIG. 3, and / or query response platform 402 of FIG. 4).
[0127] The processing system 1100 may include a processor 1102, main memory 1106, non-volatile memory 1110, network adapter 1112, video display 1118, input / output device 1120, control device 1122 (e.g., a keyboard or pointing device), drive unit 1124 including a storage medium 1126 (e.g., a non-transitory storage medium), and signal generation device 530 that are communicatively connected to a bus 1116. The bus 1116 is illustrated as an abstraction that represents one or more physical buses or point-to-point connections that are connected by appropriate bridges, adapters, or controllers. The bus 1116, therefore, can include a system bus, a Peripheral Component Interconnect (PCI) bus or PCI-Express bus, a HyperTransport or industry standard architecture (ISA) bus, a small computer system interface (SCSI) bus, a universal serial bus (USB), inter-integrated circuit (I2C) bus, or an Institute of Electrical and Electronics Engineers (IEEE) standard 1394 bus (also referred to as “Firewire”).
[0128] While the main memory 1106, non-volatile memory 1110, and storage medium 1126 are shown to be a single medium, the terms “machine-readable medium” and “storage medium” should be taken to include a single medium or multiple media (e.g., a centralized / distributed database and / or associated caches and servers) that store one or more sets of instructions 1128. The terms “machine-readable medium” and “storage medium” shall also be taken to include any medium that is capable of storing, encoding, or carrying a set of instructions for execution by the processing system 1100.
[0129] In general, the routines executed to implement the embodiments of the disclosure may be implemented as part of an operating system or a specific application, component, program, object, module, or sequence of instructions (collectively referred to as “computer programs”). The computer programs typically comprise one or more instructions (e.g., instructions 1104, 1108, 1128) set at various times in various memory and storage devices in a computing device. When read and executed by the processors 1102, the instruction(s) cause the processing system 1100 to perform operations to execute elements involving the various aspects of the present disclosure.
[0130] Further examples of machine- and computer-readable media include recordable-type media, such as volatile memory devices and non-volatile memory devices 1110, removable disks, hard disk drives, and optical disks (e.g., Compact Disk Read-Only Memory (CD-ROMS) and Digital Versatile Disks (DVDs)), and transmission-type media, such as digital and analog communication links.
[0131] The network adapter 1112 enables the processing system 1100 to mediate data in a network 1114 with an entity that is external to the processing system 1100 through any communication protocol supported by the processing system 1100 and the external entity. The network adapter 1112 can include a network adaptor card, a wireless network interface card, a router, an access point, a wireless router, a switch, a multilayer switch, a protocol converter, a gateway, a bridge, bridge router, a hub, a digital media receiver, a repeater, or any combination thereof.Remarks
[0132] The foregoing description of various embodiments of the claimed subject matter has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the claimed subject matter to the precise forms disclosed. Many modifications and variations will be apparent to one skilled in the art. Embodiments were chosen and described in order to best describe the principles of the invention and its practical applications, thereby enabling those skilled in the relevant art to understand the claimed subject matter, the various embodiments, and the various modifications that are suited to the particular uses contemplated.
[0133] Although the Detailed Description describes certain embodiments and the best mode contemplated, the technology can be practiced in many ways no matter how detailed the Detailed Description appears. Embodiments may vary considerably in their implementation details, while still being encompassed by the specification. Particular terminology used when describing certain features or aspects of various embodiments should not be taken to imply that the terminology is being redefined herein to be restricted to any specific characteristics, features, or aspects of the technology with which that terminology is associated. In general, the terms used in the following claims should not be construed to limit the technology to the specific embodiments disclosed in the specification, unless those terms are explicitly defined herein. Accordingly, the actual scope of the technology encompasses not only the disclosed embodiments, but also all equivalent ways of practicing or implementing the embodiments.
[0134] The language used in the specification has been principally selected for readability and instructional purposes. It may not have been selected to delineate or circumscribe the subject matter. It is therefore intended that the scope of the technology be limited not by this Detailed Description, but rather by any claims that issue on an application based hereon. Accordingly, the disclosure of various embodiments is intended to be illustrative, but not limiting, of the scope of the technology as set forth in the following claims.
Claims
1. A method comprising:receiving, from a user device, a user query that is representative of an inquiry for information stored in a content database;in response to the receiving of the user query:retrieving, from a content database stored in a storage device, a first content dataset that includes (i) a natural language dataset and (ii) natural language queries, represented as vectors, relating to the natural language dataset,wherein each natural language query of the natural language queries is a potential question that is answerable by an item in the natural language dataset, andwherein each item in the natural language dataset is related to one or more natural language queries,generating an output query that is indicative of a natural language question relating to a first content item by providing (i) the natural language dataset and (ii) a subset of the natural language queries to a first large language model (LLM) executed on a computer system, andproviding the output query to a second LLM to generate a metric for evaluating the output query produced by the first LLM based on:(i) an answerability metric measuring a relevance of the natural language question to the natural language dataset of the first content dataset, and(ii) a diversity metric measuring an average distance of the natural language question to the natural language queries; andin response to a determination that the metric satisfies a criterion,updating the natural language queries of the content database to include the output query for retrieving relevant content from the content database, andproviding, to the user device in response to the user query, a response including the retrieved relevant content based on the updated natural language queries.
2. The method of claim 1, further comprising:receiving, from a user device, the user query that is representative of an inquiry for healthcare-related information;comparing the user query with each of the natural language queries of the content database to generate similarity metrics,wherein each of the similarity metrics is representative of a measure of similarity between the user query and a corresponding one of the natural language queries, the corresponding natural language query being associated with a particular content dataset of the content database;selecting a most similar natural language query based on the similarity metrics;determining that the first content dataset of the content database is associated with the most similar natural language query; andcausing digital presentation of a representation of the first content dataset on a user interface of the user device.
3. A method comprising:accessing a digital corpus that includes a plurality of written suggestions for managing a health condition;for each written suggestion of the plurality of written suggestions,submitting a query to a first large language model (LLM) that is executed on a computer system and is representative of a request for natural language inquiries for which that written suggestion is responsive;populating a database stored in a storage device with a plurality of natural language inquiries output by the first LLM, such that each natural language inquiry of the plurality of natural language inquiries corresponds to a respective written suggestion of the plurality of written suggestions in a separate entry;receiving, from a computing device, a natural language inquiry from an individual with the health condition;in response to receiving the natural language inquiry from the individual:identifying one natural language inquiry of the plurality of natural language inquiries as a most similar vector to the natural language inquiry by—comparing the natural language inquiry against each natural language inquiry of the plurality of natural language inquiries to generate a plurality of metrics,wherein each metric of the plurality of metrics is representative of similarity between the natural language inquiry and a corresponding one of the plurality of natural language inquiries, andranking the plurality of natural language inquiries based on the plurality of metrics, from the most similar vector to the natural language inquiry to a least similar vector to the natural language inquiry;providing the written suggestion associated with the identified natural language inquiry as an input to a second LLM executed on the computing device to generate a response, including relevant health content retrieved from the database, to the natural language inquiry;personalizing the response for the individual based on a current state of the health condition; andtransmitting, to the computing device, the personalized response for presentation to the individual.
4. The method of claim 3, further comprising:identifying a subset of the plurality of natural language inquiries using a sampling algorithm;submitting another query to the first LLM that is representative of a request to produce, as output, a new query based on the subset of the plurality of natural language inquiries;generating, for the new query, (i) a first metric that is representative of relevance of the query to the plurality of written suggestions and (ii) a second metric that is representative of similarity to the plurality of natural language inquiries; anddetermining whether to populate a new entry in the database with the new query based on the first and second metrics.
5. A method comprising:receiving, from a user device, a user query that is representative of an inquiry for information stored in a content database;in response to receiving the user query:retrieving, from the content database stored in a storage device, a first content dataset that includes (i) a natural language dataset and (ii) natural language queries, represented as vectors, relating to the natural language dataset;determining, using a sampling algorithm, a subset of the natural language queries;providing (i) the natural language dataset and (ii) the subset of the natural language queries to a first large language model (LLM) executed on a computer system to generate an output query that is representative of a natural language question relating to the first content dataset;providing the output query to a second LLM to:generate, for the output query,(i) an answerability metric that is representative of a measure of relevance of the natural language question to the natural language dataset of the first content dataset, and(ii) a diversity metric that is representative of a measure of average distance of the natural language question to the natural language queries;generate, using the output query, a metric for evaluating the output query produced by the first LLM based on the answerability and diversity metrics generated for the output query, anddetermine whether the metric for evaluating the output query satisfies a criterion; andupdating the natural language queries to include the output query in response to a determination that the metric for evaluating the output query satisfies the criterion to retrieve relevant content from the content database; andproviding, to the user device in response to the user query, a response including the retrieved relevant content based on the updated natural language queries.
6. The method of claim 5, wherein retrieving the first content dataset comprises:retrieving, from a conversation database, conversation data comprising textual queries and associated textual responses;determining, from the conversation data, a first textual response associated with a first textual query; andstoring (i) the first textual response as the natural language dataset and (ii) the first textual query as a first natural language query of the natural language queries relating to the natural language dataset.
7. The method of claim 5, wherein generating the answerability metric comprises:generating an answerability evaluation prompt comprising (i) the natural language dataset, (ii) the output query, and (iii) a metric generation request; andproviding the answerability evaluation prompt to a second LLM to generate the answerability metric,wherein the answerability metric includes a representation of a numerical value.
8. The method of claim 5, wherein generating the diversity metric comprises:generating a first output vector representing the output query;generating a set of query vectors,wherein each query vector of the set of query vectors represents a respective natural language query of the first content dataset;determining a set of distances,wherein each distance of the set of distances includes a vector distance between the first output vector and a respective query vector of the set of query vectors;determining, based on the set of distances, the measure of average distance; andgenerating the diversity metric based on a normalization of the measure of average distance.
9. The method of claim 5, wherein generating the metric for evaluating the output query comprises:determining a geometric mean of the answerability metric and the diversity metric; andgenerating the metric including a normalized representation of the geometric mean.
10. The method of claim 5, wherein generating the metric for evaluating the output query comprises:determining a product of the answerability metric and the diversity metric; andgenerating the metric including a normalized representation of the product.
11. The method of claim 5, wherein determining whether the metric for evaluating the output query satisfies the criterion comprises:determining that the criterion includes a threshold metric;comparing the metric for evaluating the output query with the threshold metric; anddetermining that the metric for evaluating the output query is greater than or equal to the threshold metric.
12. The method of claim 5, wherein updating the natural language queries comprises:identifying a record of the content database,wherein the record is associated with the first content dataset;determining a field of the record,wherein the field is associated with the natural language queries of the first content dataset; andstoring the output query within the field associated with the natural language queries of the first content dataset.
13. A computing device including:(i) one or more processors; and(ii) one or more non-transitory media storing instructions that, when executed by the one or more processors, cause the computing device to perform operations comprising:receiving, from another computing device, a query from an individual for healthcare-related information; andin response to receiving the query:retrieving, from a content database stored in a storage device, a set of content datasets,wherein each content dataset of the content datasets includes (1) an associated natural language dataset and (2) natural language queries, represented as vectors, relating to the associated natural language dataset;comparing the query from the individual with each natural language query of the natural language queries of the content database;based on comparing the query from the individual with each natural language query of the natural language queries, generating a set of similarity metrics,wherein each similarity metric of the set of similarity metrics is representative of a measure of similarity between the query from the individual and a corresponding one of the natural language queries, the corresponding natural language query being associated with a particular content dataset of the set of content datasets;selecting a most similar natural language query based on the set of similarity metrics;determining that a first content dataset of the set of content datasets is associated with the most similar natural language query;determining a first query density metric for the first content dataset,wherein the first query density metric indicates a number of natural language queries associated with the first content dataset;generating, in response to determining the first query density metric, a representation of the first content dataset,wherein generating the representation of the first content dataset includes: retrieving the first content dataset from the content database, and providing the first content dataset and the query from the individual to a first LLM executed on the computing device to generate output content; anddisplaying, on a user interface of the other computing device, the representation of the first content dataset.
14. The computing device of claim 13, wherein the instructions for generating the set of similarity metrics cause the computing device to perform operations comprising:generating a first vector representing the query from the individual,wherein the first vector comprises semantic information relating to the query;generating a set of vectors,wherein each particular vector of the set of vectors represents a respective natural language query of the content database, andwherein the particular vector comprises semantic information relating to the respective natural language query;determining, for each particular vector of the set of vectors, a respective vector similarity,wherein the respective vector similarity indicates a vector distance between the particular vector and the first vector; andgenerating the set of similarity metrics corresponding to the respective vector similarities.
15. The computing device of claim 13, wherein the instructions cause the computing device to perform operations comprising:retrieving, from a user database, health information relating to the individual; andproviding the health information to the first LLM to generate the output content,wherein the output content is specific to the individual.
16. The computing device of claim 15, wherein the instructions for retrieving the health information relating to the individual cause the computing device to perform operations comprising:retrieving, from the user database, a laboratory test result for the individual; andstoring the health information including the laboratory test result.
17. The computing device of claim 13, wherein the instructions for determining the first content dataset of the set of content datasets cause the computing device to perform operations comprising:generating a set of rankings according to the set of similarity metrics;determining the first similarity metric according to the set of rankings;determining a first natural language query of the natural language queries of the content database,wherein the first natural language query is associated with the first similarity metric; anddetermining that the first content dataset is associated with the first natural language query.
18. The computing device of claim 13, wherein the instructions for generating the representation of the first content dataset cause the computing device to perform operations comprising:retrieving a first criterion from a policy database,wherein the first criterion is for evaluating the representation of the first content dataset;determining that the representation of the first content dataset satisfies the first criterion; andin response to determining that the representation of the first content dataset satisfies the first criterion, generating the representation of the first content dataset.
19. The computing device of claim 13, wherein the instructions cause the computing device to perform operations comprising:retrieving a first criterion from a policy database,wherein the first criterion is for evaluating the representation of the first content dataset;determining that the representation of the first content dataset does not satisfy the first criterion;in response to determining that the representation of the first content dataset does not satisfy the first criterion, transmitting, to an administrator device, a request for content review;receiving, from the administrator device and in response to the request for content review, updated content; andgenerating, for display on the user interface of the other computing device, the updated content.
20. The computing device of claim 19, wherein the instructions cause the computing device to perform operations comprising storing, within the content database, (i) the updated content and (ii) the query from the individual.
Citation Information
Patent Citations
Retrieval enhancement generation method based on vector similarity matching optimization
CN117573815A
Operation and maintenance knowledge generation method
CN117573833A
Text reduction and analysis interface to a text generation modeling system
US11861320B1
A neural graph model for automated clinical assessment generation
WO2022072785A1
Data-informed decision making through a domain-general artificial intelligence platform
WO2022226181A2
