Anchor indexed passage retrieval system for clinical text data

The method and system rephrase and embed clinical text data to improve retrieval accuracy by generating similarity scores and using domain-adapted models, addressing inefficiencies in clinical information retrieval by enhancing semantic understanding and filtering out lexically similar but semantically distinct texts.

WO2025248560A1PCT designated stage Publication Date: 2025-12-04MIIMANSA AI SYSTEMS PTE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/IN2025/050809
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-30
Filing Date
2025-05-29
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

Existing information retrieval systems struggle with efficiently searching large clinical text passages, distinguishing semantically distinct yet lexically similar texts, and identifying semantically similar but lexically different texts, leading to inaccuracies and inefficiencies in clinical information retrieval.

Method used

A method and system that rephrases input text into multiple variants, generates embeddings for these variants and anchor phrases, computes similarity scores, and retrieves relevant text segments using a vector database, leveraging domain-adapted models to enhance semantic understanding and accuracy.

Benefits of technology

Enables efficient searching of large clinical text passages, filters out semantically distinct but lexically similar texts, and identifies semantically similar but lexically different texts, improving the accuracy and efficiency of clinical information retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IN2025050809_04122025_PF_FP_ABST
    Figure IN2025050809_04122025_PF_FP_ABST
Patent Text Reader

Abstract

A method and system for retrieving anchor indexed passages for clinical text data. The method includes receiving an input text from a user. The method further includes rephrasing the input text into a plurality of rephrased variants of input text. The method further includes generating, a plurality of rephrased variant embeddings for each of the plurality of rephrased variants of input text and input embedding for input text. The method further includes retrieving a plurality of anchor embeddings from a vector database. The method further includes computing a plurality of similarity scores by comparing input embedding and each of plurality of rephrased variant embeddings with each of plurality of anchor embeddings. The method further includes detecting a presence, and an absence of hit based on computed plurality of scores, wherein the presence of the hit is detected if a similarity score from the plurality of similarity scores exceeds a pre-defined threshold. The method further includes retrieving a text segment corresponding to the anchor embedding for which the similarity score exceeded the pre-defined threshold.
Need to check novelty before this filing date? Find Prior Art

Description

ANCHOR INDEXED PASSAGE RETRIEVAL SYSTEM FOR CLINICAL TEXT DATAField of the Disclosure

[0001] This technology generally relates to the field of clinical language processing and an interdisciplinary field that lies at the intersection of computer science, Al and clinical informatics, and more particularly to methods and systems for retrieving anchor indexed passages for clinical text data.Background

[0002] The following description of the related art is intended to provide background information pertaining to the field of the present disclosure. This section may include certain aspects of the art that may be related to various features of the present disclosure. However, it should be appreciated that this section is used only to enhance the understanding of the reader with respect to the present disclosure, and not as admission of the prior art.

[0003] Conventionally a major portion of clinical data is recorded as unstructured text. According to some estimates, the patient information such as but not limited to progress notes, radiology reports, discharge summaries etc., in electronic medical records is captured in the unstructured format. Beyond electronic medical records, other key sources of clinical information such as but not limited to clinical study protocols, ethics review reports, statistical analysis plans, clinical study reports, and scientific publications are also captured in text format which may also be in the form of unstructured text.

[0004] Indexing, searching, and retrieving information from such unstructured text is particularly challenging for traditional information management systems, which depend largely on data being first organized according to a well-documented data model from the start. In contrast, effective search and retrieval of unstructured clinical text requires systems that could understand, and index information based on its underlying meaning, regardless of its orthographic form i.e., how the information is worded. In order to achieve this, the state-of-the-art information retrieval systems rely on semantic representations, often developed through supervised machine learning techniques. However, when applied to clinical unstructured texts, these representations face notable limitations as theseconventional systems are unable to reliably distinguish between a) semantically similar texts that are phrased differently and b) semantically distinct texts that have nearly identical phrasing, making them unsuitable for many clinical information retrieval applications.. Furthermore, the existing systems only support searches based on keywords that are indexed to target documents, which often leads to missing relevant documents and generation of irrelevant results. These shortcomings limit the effectiveness of the conventional information management systems in many clinical information retrieval scenarios.

[0005] The paper titled ‘SPLADE: Sparse Lexical and Expansion Model for First Stage Ranking (ACM SIGIR, 2021) leverages the concept of sparse representations for documents and queries, aiming to inherit the advantageous traits of bag-of- words models and the efficiency of inverted indexes. By employing explicit sparsity regularization and a log-saturation effect on term weights, SPLADE achieves highly sparse representations, yielding competitive outcomes compared to both dense and sparse methods. Unlike complex training pipelines, SPLADE is trained end-to-end in a single stage, allowing for efficient document expansion with controlled sparsity regularization. The dataset used in SPLADE is MS MARCO and TREC DL 2019.

[0006] In the paper titled ‘The Probabilistic Relevance Framework: BM25 and Beyond (ACM, 2009)’, it is stated that BM25 belongs to the family of probabilistic retrieval models, and it calculates the relevance score of a document with respect to a given query based on the presence and frequency of query terms within the document. It incorporates term frequency (TF) and inverse document frequency (IDF) components, as well as a length normalization factor to account for document length differences. One of BM25's key strengths lies in its ability to handle long documents and queries effectively. Its parameterization allows for tuning to specific datasets or tasks, making it adaptable to various retrieval scenarios.

[0007] The paper titled ‘Improving Passage Retrieval with Zero-Shot Question Generation (EMNLP, 2022)’ focuses on enhancing the accuracy of passage retrieval in question answering systems using a novel zero-shot question generation method (UPR- Unsupervised Passage Re-ranking). This approach leverages pre-trained language modelsto generate questions from passages, which are then used to re-rank the retrieved passages based on their relevance to the original user query. Different types of retrievers are utilized to validate the effectiveness of the proposed re-ranking strategy, along with experimenting with various pre-trained language models to compute relevance scores during re-ranking. This approach demonstrates improvements across multiple datasets and benchmarks. The datasets used in the system include:1. Models- GPT-Neo, T-5 (in various configurations)2. Retrievers- BM25, MSS, Contriever, DPR, MSS-DPR3. Datasets- English wikipedia (evidence passages and entity questions)4. BEIR benchmark, SQuAD-Open, Natural Questions (NQ), TriviaQA, WebQ

[0008] The UPR provides consistent improvements across all the retrievers and datasets, improving unsupervised models by 6%-l 8% absolute and supervised models by up to 12% in top-20 accuracy.

[0009] The paper titled ‘ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT (ACM SIGIR, 2020)’ introduces Colbert’s late interaction architecture, allowing independent encoding of queries and documents with a deep LM like BERT, followed by a cost-effective interaction step to capture their finegrained similarity. This approach enables the pre-computation of document representations offline, significantly speeding up query processing. Moreover, ColBERT's interaction mechanism facilitates direct retrieval from large document collections using vectorsimilarity indexes, resulting in exceptional efficiency and effectiveness. Evaluation of recent passage search datasets demonstrates ColBERT's superior performance compared to non-BERT baselines, executing significantly faster with fewer computational operations per query. The datasets used in the system of ColBERT are MS MARCO and TREC-CAR.

[0010] The approach in the paper titled ‘UniGen: A Unified Generative Framework for Retrieval and Question Answering with Large Language Models (AAAI, 2024)’ integrates both tasks into a single generative model leveraging the capabilities of large language models. UniGen employs a shared encoder and two distinct decoders for generative retrieval and question answering. To facilitate the learning of both tasks, the authors introduce connectors, generated by large language models, to bridge the gapsbetween query inputs and generation targets, as well as between document identifiers and answers. Furthermore, an iterative enhancement strategy has been also proposed that leverages generated answers and retrieved documents to iteratively improve both tasks. The dataset used in the system of UniGen is MS MARCO and NQ. The BEIR leaderboard provides a comprehensive ranking of various passage retrieval methods based on their performance on multiple datasets. Following datasets that are of bio-med domain are used to rank the various passage retrieval methods:- TREC-COVID http: / / bioasq.org / NFCorpusZero-shot Evaluation on BEIR Benchmark (Normalized Discounted Cumulative Gain (NDCG)@10 scores)

[0011] However, the systems known in the art face a plurality of challenges. Some of the major drawbacks that render the existing technology unsuitable for search / retrieval applications based on clinical data include:• Searching for information in large text passages: Clinical documents often include lengthy passages such as but not limited to article sections, book chapters, or full reports etc. The traditional retrieval methods typically address this by comparing the index text to a large passage by chunking the latter. However, this approach is computationally inefficient, leading to longer search times and reduced accuracy.• Filtering out semantically distinct yet lexically similar texts: It is common to encounter texts in clinical documents that are semantically distinct from each other but are phrased using nearly identical words. For example, the phrase “the patients were enrolled in cohort 4” versus “the patients were enrolled in cohort 5”. Such pairs are known as hard negatives. Current semantic representation models struggle to differentiate between such phrases by often treating them as equivalent due to their lexical similarity.• Identifying semantically similar but lexically different texts: It is common for clinical concepts to be associated with a large number of synonyms. For instance, “Acetaminophen,” “Tylenol,” and “Crocin” all refer to the same drug. Existing systems often misinterpret these variants as having different meanings, which leads to retrieval inaccuracies.

[0012] Existing systems attempt to handle searching for information in large text passages by segmenting the passages into smaller chunks, often with overlap. However, this requires more computation resources and processing time. Additionally, the problems of filtering out semantically distinct but lexically similar texts and distinguishing semantically distinct yet lexically similar texts and identifying semantically similar but lexically different texts as described above remain limitations of the existing systems when these are applied to clinical text data. These limitations have hindered the development of accurate and efficient information retrieval systems for clinical text.

[0013] Therefore, there remains an unmet need in the industry to overcome these drawbacks and address the deficiencies of existing approaches in clinical information retrieval.

[0014] Hence, in view of these and other existing limitations, there arises an imperative need to provide an efficient solution to overcome the above-mentioned limitations and to provide a method and system for retrieving anchor indexed passages for clinical text data.Summary

[0015] The present disclosure, through one or more of its various aspects, embodiments, and / or specific features or sub-components, provides, inter aha, varioussystems, servers, devices, methods, media, programs, and platforms for retrieving anchor indexed passages for clinical text data.

[0016] According to an aspect of the present disclosure, a method for retrieving anchor indexed passages for clinical text data is disclosed. The method includes receiving, by a processing unit, an input text data associated with clinical text data from a user. The method further includes rephrasing, by an input rephrasing unit, the input text into a plurality of rephrased variants of the input text. The method further includes generating, by an input embedding generation unit, a plurality of rephrased variant embeddings for each of the plurality of rephrased variants of the input text and an input embedding for the input text. The method further includes retrieving, by the processing unit, a plurality of anchor embeddings from a vector database. The method further includes computing, by a similarity scoring unit, a plurality of similarity scores by comparing the input embedding and each of the plurality of rephrased variant embeddings with each of the plurality of anchor embeddings. The method further includes detecting, by a detection unit, a presence and an absence of a hit based on the computed plurality of scores. In an event, a similarity score from the plurality of similarity scores exceeds a pre-defined threshold. Thereafter, the method includes retrieving, by the processing unit, a text segment corresponding to anchor embedding of the plurality of anchor embeddings for which the similarity score exceeded the pre-defined threshold.

[0017] In accordance with an exemplary embodiment, in the absence of the hit based on the computed plurality of scores, the method further includes retrieving, by the processing unit, a plurality of text segment embeddings from the vector database. The method further includes computing, by the processing unit, a plurality of similarity scores by comparing the input embedding with each of the plurality of text segment embeddings. The method further includes identifying, by the processing unit, a set of similarity scores from the plurality of similarity scores, wherein the set of similarity scores constitute the top N similarity scores. Thereafter, the method includes retrieving, by the processing unit, a set of text segments corresponding to the text segment embeddings from the plurality of text segment embeddings which yielded the set of similarity scores.

[0018] In accordance with an exemplary embodiment, the plurality of anchor embeddings are pre-generated and stored in the vector database.

[0019] In accordance with an exemplary embodiment, generating the plurality of anchor embeddings includes tagging, a plurality of text segments within a target corpus with a plurality of anchor phrases. Each of the anchor phrases has a semantic relationship with a tagged corresponding text segment. The method further includes generating the plurality of anchor embeddings comprising the tagged plurality of text segments.

[0020] In accordance with an exemplary embodiment, the plurality of anchor phrases are generated using a large language model (LLM), wherein the LLM is pre-trained on text samples drawn from a domain of interest.

[0021] In accordance with an exemplary embodiment, the plurality of text segment embeddings are pre-generated and stored in the vector database.

[0022] In accordance with an exemplary embodiment, the input rephrasing unit generates a minimum of 5 rephrased variants of the input text.

[0023] According to another aspect of the present disclosure, a system for retrieving anchor indexed passages for clinical text data is disclosed. The system includes a processing unit configured to receive input text data associated with clinical text data from a user. The system further includes an input rephrasing unit configured to rephrase the input text into a plurality of rephrased variants of the input text. The system further comprises an input embedding generation unit configured to generate a plurality of rephrased variant embeddings for each of the plurality of rephrased variants of the input text and an input embedding for the input text. The processing unit is further configured to retrieve a plurality of anchor embeddings from a vector database. The system further comprises a similarity scoring unit configured to compute a plurality of similarity scores by comparing the input embedding and each of the plurality of rephrased variant embeddings with each of the plurality of anchor embeddings. The system further comprises a detection unit configured to detect a presence and an absence of a hit based on the computed plurality of scores, wherein the presence of the hit is detected if a similarity score from the plurality of similarity scores exceeds a pre-defined threshold. The processing unitis further configured to retrieve a text segment corresponding to the anchor embedding for which the similarity score exceeded the pre-defined threshold.

[0024] In accordance with an exemplary embodiment, in the absence of the hit based on the computed plurality of scores, the processing unit is further configured to retrieve a plurality of text segment embeddings from the vector database. The processing unit is further configured to compute a plurality of similarity scores by comparing the input embedding with each of the plurality of text segment embeddings. The processing unit is further configured to identify a set of similarity scores from the plurality of similarity scores. The set of similarity scores constitute the top N similarity scores. The processing unit is further configured to retrieve a set of text segments corresponding to the text segment embeddings from the plurality of text segment embeddings which yielded the set of similarity scores.

[0025] In accordance with an exemplary embodiment, the plurality of anchor embeddings are pre-generated and stored in the vector database.

[0026] In accordance with an exemplary embodiment, in order to generate the plurality of anchor embeddings, the processing unit is configured to tag a plurality of text segments within a target corpus with a plurality of anchor phrases. Each of the anchor phrases has a semantic relationship with a tagged corresponding text segment. Thereafter, the input embedding generation unit is further configured to generate the plurality of anchor embeddings comprising the tagged plurality of text segments.

[0027] In accordance with an exemplary embodiment, the plurality of anchor phrases are generated using a large language model (LLM). The LLM is pre-trained on text samples drawn from a domain of interest.

[0028] In accordance with an exemplary embodiment, the plurality of text segment embeddings are pre-generated and stored in the vector database.

[0029] In accordance with an exemplary embodiment, the input rephrasing unit generates a minimum of 5 rephrased variants of the input text.Objectives of the invention

[0030] Some of the objects of the present disclosure, which at least one embodiment disclosed herein satisfies are listed herein below.

[0031] An object of the present invention is to enable searching for information in large text passages by automatically indexing segments of text within a given text passage with an anchor phrase.

[0032] Another object of the present invention is to filter out semantically distinct but lexically similar text by making use of sentence representations that have been learned from a large database of similar and dissimilar sentences that occur frequently within the clinical domains of interest, via a machine learning algorithm (triplet loss optimization).

[0033] Yet another object of the present invention is to identify semantically similar but lexically different text by generating lexical variants of the input text by rephrasing the input text several times.

[0034] Yet another object of the present invention is to enable searching in electronic medical records against the inclusion and exclusion criterion defined in a study protocol.

[0035] Yet another object of the present invention is to enable searching for evidence-based treatment guidelines by matching a patient’s record against clinical phenotype descriptions.

[0036] Yet another object of the present invention is to enable the retrieval of the key design features of a clinical trial from the study protocol document.

[0037] Yet another object of the present invention is to enable the retrieval of the key results of a clinical study as published in a scientific publication.Brief Description of the Drawings

[0038] The present disclosure is further described in the detailed description which follows, about the noted plurality of drawings, by way of non-limiting examples of exemplary embodiments of the present disclosure, in which characters represent like elements throughout the several views of the drawings.

[0039] FIG. 1 illustrates an exemplary block diagram of a system for retrieving anchor indexed passages for clinical text data, in accordance with exemplary implementations of the present disclosure.

[0040] FIG. 2 illustrates an exemplary method flow diagram for retrieving anchor indexed passages for clinical text data, in accordance with an exemplary embodiment of the present disclosure.

[0041] FIG. 3 illustrates an exemplary process flow diagram for retrieving anchor indexed passages for clinical text data, in accordance with an exemplary embodiment of the present disclosure.

[0042] FIG. 4, illustrates an exemplary process flow diagram for back off and retrieval of the plurality of text segment embeddings from the vector database, in accordance with an exemplary embodiment of the present disclosure.Detailed Description

[0043] Exemplary embodiments now will be described with reference to the accompanying drawings. The invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey its scope to those skilled in the art. The terminology used in the detailed description of the particular exemplary embodiments illustrated in the accompanying drawings is not intended to be limiting. In the drawings, like numbers refer to like elements.

[0044] The specification may refer to “an”, “one” or “some” embodiment(s) in several locations. This does not necessarily imply that each such reference is to the same embodiment(s), or that the feature only applies to a single embodiment. Single features of different embodiments may also be combined to enable other embodiments.

[0045] As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless expressly stated otherwise. It will be further understood that the terms “include”, “comprises”, “including” and / or “comprising” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It will be understood that when an element is referred to as being “connected” or “coupled” to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Furthermore, “connected” or “coupled” as usedherein may include wirelessly connected or coupled. As used herein, the term “and / or” includes any and all combinations and arrangements of one or more of the associated listed items. Also, as used herein, the phrase “at least one” means and includes “one or more” and such phrases or terms can be used interchangeably.

[0046] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skills in the art to which this invention pertains. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

[0047] The figures depict a simplified structure only showing some elements and functional entities, all being logical units whose implementation may differ from what is shown. The connections shown are logical connections; the actual physical connections may be different.

[0048] In addition, all logical units and / or controllers described and depicted in the figures include the software and / or hardware components required for the unit to function. Further, each unit may comprise within itself one or more components, which are implicitly understood. These components may be operatively coupled to each other and be configured to communicate with each other to perform the function of the said unit.

[0049] In the following description, for the purposes of explanation, numerous specific details have been set forth in order to enable a description of the invention. It will be apparent, however, that the invention may be practiced without these specific details and features.

[0050] Through one or more of its various aspects, embodiments and / or specific features or sub-components of the present disclosure, are intended to bring out one or more of the advantages as specifically described above and noted below.

[0051] The examples may also be embodied as one or more non-transitory computer-readable storage media having instructions stored thereon for one or more aspects of the present technology as described and illustrated by way of the examples herein. The instructions in some examples include executable code that, when executed byone or more processors, causes the processors to carry out steps necessary to implement the methods of the examples of this technology that are described and illustrated herein.

[0052] As discussed earlier, indexing, searching, and retrieving information from unstructured text is particularly challenging for conventional information management systems, which depend largely on data being first organized according to a clearly defined data model from the start. In contrast, effective search and retrieval of unstructured clinical text data requires systems that could understand, and index information based on its underlying meaning, regardless of its orthographic form i.e., how the information is worded. In order to achieve this, the state-of-the-art information retrieval systems rely on semantic representations, often developed through supervised machine learning techniques. However, when applied to clinical unstructured texts, these representations face notable limitations as these conventional systems struggle to recognize that differently worded texts may carry the same meaning i.e., semantically similar texts may be phrased differently and detect that seemingly similar texts may in fact have distinct meanings i.e. semantically distinct texts may have nearly identical phrasing making them unsuitable for many clinical information retrieval applications. These shortcomings limit the effectiveness of the conventional information management systems in many clinical information retrieval scenarios.

[0053] In order to solve the above technical problem, the present invention provides a method and system for retrieving anchor indexed passages for clinical text data. The method includes receiving an input text data associated with clinical text data from a user. The method further includes rephrasing the input text into a plurality of rephrased variants of the input text. The method further includes generating plurality of rephrased variant embeddings for each of the plurality of rephrased variants of the input text and an input embedding for the input text. The method further includes retrieving a plurality of anchor embeddings from a vector database. The method further includes computing, by a similarity scoring unit, a plurality of similarity scores by comparing the input embedding and each of the plurality of rephrased variant embeddings with each of the plurality of anchor embeddings. The method further includes detecting a presence and an absence of a hit based on the computed plurality of scores, wherein the presence of the hit is detected inan event, a similarity score from the plurality of similarity scores exceeds a pre-defined threshold. Thereafter, the method includes retrieving a text segment corresponding to an anchor embedding of the plurality of anchor embeddings for which the similarity score exceeded the pre-defined threshold.

[0054] Referring to FIG. 1, an exemplary block diagram of a system

[0100] for retrieving anchor indexed passages for clinical text data, is shown, in accordance with the exemplary implementations of the present disclosure. The system

[0100] comprises at least one processing unit

[0102] , at least one an input rephrasing unit

[0104] , at least one input embedding generation unit

[0106] , at least one vector database

[0108] at least one similarity scoring unit

[0110] , and at least one detection unit

[0112] , Also, all of the components / units of the system

[0100] are assumed to be connected to each other unless otherwise indicated below. As shown in FIG. 1 , all units shown within the system should also be assumed to be connected to each other. Also, in FIG. 1 only a few units are shown, however, the system

[0100] may comprise multiple such units or the system

[0100] may comprise any such numbers of said units, as required to implement the features of the present disclosure.

[0055] The system

[0100] is configured for retrieving anchor indexed passages for clinical text data, with the help of the interconnection between the components / units of the system

[0100] ,

[0056] The system

[0100] comprises a processing unit

[0102] which is configured to receive an input text associated with the clinical text data from a user. In an exemplary implementation, the processing unit

[0102] receives the input text associated with the clinical text data which may be in the form of electronic medical records that may have been captured in an unstructured text data format. The unstructured electronic medical records may also be associated with but limited to progress notes, radiology reports, discharge summaries etc.

[0057] In an exemplary implementation, the unstructured input text may be associated with other types of clinical text data which may include such as but not limited to clinical study protocols, ethics review reports, statistical analysis plans, clinical study reports, and scientific publications etc. In an exemplary implementation, the input text may be in the form of input queries associated with the clinical text data provided by the user.

[0058] The system

[0100] comprises an input rephrasing unit

[0104] which is configured to rephrase the input text into a plurality of rephrased variants of the input text. The input rephrasing unit

[0104] rephrases the input text provided by the user into a plurality of rephrased variants. The input rephrasing unit

[0104] rephrases the input text data to ensure that the plurality of rephrased variants or rephrased queries remain contextually relevant and clinically accurate.

[0059] In an exemplary implementation, the input text may be a query, and the plurality of rephrased variants may be variations of the query. For example, the unstructured input text such as “Are ear temperatures reliable?” may be rephrased to form a variant “Is measurement of ear temperature reliable”. In another example, the unstructured input text such as “In children with an acute illness, what is the efficacy of single medication therapy with acetaminophen or ibuprofen compared with combination therapy combining the two medications in reducing fever while avoiding adverse effect?” may be rephrased to form a variant “In children with fever, is acetaminophen or ibuprofen alone better than combined, while avoiding adverse effects?”

[0060] In an aspect of the present disclosure, the input rephrasing unit

[0104] generates a minimum of 5 rephrased variants of the input text. The input rephrasing unit

[0104] generates a minimum of 5 rephrased variants of the input text provided by the user in order to preserve the meaning of original input text. However, the rephrased variants may vary in terms of vocabulary, sentence structure and phrasing etc. In an exemplary implementation, the rephrasing unit

[0104] generates K number of rephrased variants of the input text data that is provided by the user wherein K is typically an integer which lies between 5 to 10. For example, the unstructured input text such as “Treatments to manage diabetes” may be rephrased to “How to manage diabetes?” or “What are the best ways to treat diabetes” etc. By rephasing the input text, the chances of at least one of the rephrased variants to be mapped to the correct target text data increases.

[0061] The system

[0100] further comprises an input embedding generation unit

[0106] which is configured to generate a plurality of rephrased variant embeddings for each of the plurality of rephrased variants of the input text and an input embedding for the input text. As used herein, the embedding for the input text refers to vectors that represent real-world objects, like words, images, or videos, in a form that machine learning models can easily process.

[0062] In an exemplary implementation, the input embedding generation unit

[0106] converts each of the plurality of rephrased variants of input text and input embedding for input text into vector representations known as rephrased variant embeddings with the help of a domain adapted transformer model which may easily be processed.

[0063] As used herein, the domain adapted transformer model may refer to a machine learning model that has first been pre-trained on a target or specific domain data and then fine-tuned on an existing training dataset. For example, domain adapted transformer model, may first be pre-trained on an unstructured text data associated with the clinical text data which may include such as but not limited to progress notes, radiology reports, discharge summaries, and then fine-tuned on each of the plurality of rephrased variants of the input text and an input embedding to generate plurality of rephrased variant embeddings.

[0064] The processing unit

[0102] is further configured to retrieve a plurality of anchor embeddings from a vector database

[0108] , In an aspect of the present disclosure, the plurality of anchor embeddings are pre-generated and stored in the vector database

[0108] ,

[0065] In an exemplary implementation, anchor embeddings are pre-stored collection of vector representations that may correspond to anchor phrases associated with at least one segment of clinical text data. In one example, the anchor embeddings help associate semantically similar texts having different meaning with at least one segment of clinical text data. For example, it is common to encounter texts in clinical documents that are semantically distinct from each other but are phrased using nearly identical words. E.g. “the patients were enrolled in cohort 4” versus “the patients were enrolled in cohort 5”. Such pairs are known as hard negatives. For such pairs of texts, semantic representations produced by the existing methods are nearly indistinguishable.

[0066] In another example, the anchor embedding helps associate semantically different texts having the same meaning with at least one segment of clinical text data. In an exemplary implementation, sometimes lexical variants of the same text can be mistakento have a different meaning by existing methods. For example, Acetaminophen, Tylenol, and Crocin are synonyms for the same drug concept.

[0067] In an exemplary implementation, the anchor embeddings are pre-generated anchor phrases using a domain-adapted embedding model and stored in a vector database

[0108] for efficient retrieval at a later stage.

[0068] In an aspect of the present disclosure, in order to generate the plurality of anchor embeddings, the processing unit

[0102] is configured to tag a plurality of text segments within a target corpus with a plurality of anchor phrases. Each of the anchor phrases has a semantic relationship with a tagged corresponding text segment. The input embedding generation unit

[0106] is further configured to generate the plurality of anchor embeddings comprising the tagged plurality of text segments.

[0069] In an exemplary implementation, the processing unit

[0102] tags input text segments within the target corpus with relevant anchor phrases such that each anchor phrase bears a strong semantic relationship to the input text segment it is tagged to. In an example, for the given text segment “the patients in the treatment arm of the study were previously treated with conditioning chemotherapy”, the question “what were the patients in the treatment arm of the study previously treated with?” is a strong anchor.

[0070] In an aspect of the present disclosure, the plurality of anchor phrases are generated using a large language model (LLM). The LLM is pre-trained on text samples drawn from a domain of interest. As used herein, the LLMs are deep learning algorithms that may perform a variety of natural language processing (NLP) tasks. In an exemplary implementation, the anchor phrases are generated automatically with the help of the large language model (LLM) which is pre-trained on clinical text data provided by the user.

[0071] The system

[0100] further comprises a similarity scoring unit

[0110] which is configured to compute a plurality of similarity scores by comparing the input embedding and each of the plurality of rephrased variant embeddings with each of the plurality of anchor embeddings.

[0072] In an exemplary implementation, the similarity score unit

[0110] compares the input embeddings associated with the input text provided by the user and plurality of rephrased variant embeddings against each of the plurality of anchor embedding retrievedfrom the vector database

[0110] , After comparing, the similarity score unit

[0110] computes similarity scores, typically using cosine similarity which is a standard method for evaluating the similarity between two non-zero vectors by calculating the cosine of the angle between them. In one example, a higher similarity score indicates greater semantic similarity between the input embeddings and plurality of rephrased variant embeddings with the plurality of anchor embeddings. In another example, a lower similarity score indicates lower semantic similarity between the input embeddings and plurality of rephrased embeddings with the plurality of rephrased variant embeddings.

[0073] The system

[0100] further comprises a detection unit

[0112] which is configured to detect a presence, and an absence of a hit based on the computed plurality of scores. The presence of the hit is detected if a similarity score from the plurality of similarity scores exceeds a pre-defined threshold.

[0074] In an exemplary implementation, the detection unit

[0112] detects the presence or absence of the hit based on the computed plurality of scores and in case the similarity score of one of the anchor embeddings from the plurality of anchor embeddings exceeds the pre-defined threshold, the hit is detected which implies that one of the anchor embedding from the plurality of anchor embedding qualifies for a strong semantic match with the input text.

[0075] For example, if the input text provided by the user is “What are the side effects of paracetamol?”, the system

[0100] rephrases the input text data into a plurality of rephrased variants such as “Adverse reactions to paracetamol” and “What can happen if I take paracetamol?” and “paracetamol adverse effects”. Thereafter, embeddings of plurality of rephrased variants are generated and compared with stored plurality of anchor embeddings from the vector database

[0108] , Now let’s assume, one of the anchor embeddings in the vector database

[0108] is “Side effects associated with paracetamol use.” and this particular anchor embedding yields a similarity score of 0.91, whereas the predefined threshold is set at 0.90. Then in this case, the detection unit

[0112] detects the presence of a hit, because the similarity score exceeds the pre-defined threshold.

[0076] In an exemplary implementation, the pre-defined threshold is a hyperparameter for the algorithm that may be fine-tuned for each application with the help of a smaller data set.

[0077] In an aspect of the present disclosure, in the absence of the hit based on the computed plurality of scores, the processing unit

[0102] is further configured to retrieve a plurality of text segment embeddings from the vector database

[0108] , In an exemplary implementation, when no direct hit is detected i.e., none of the similarity scores between the input embeddings and its plurality of rephrased variants embeddings with each of the plurality of the anchor embeddings exceed the pre-defined threshold, the system

[0100] shifts to a back off strategy. In this case, the processing unit

[0102] is configured to retrieve a plurality of text segment embeddings from the vector database

[0108] to continue the search at a broader level.

[0078] The processing unit

[0102] is configured to compute a plurality of similarity scores by comparing the input embedding with each of the plurality of text segment embeddings. In an exemplary implementation, when the system

[0100] enters the back off stage because of the absence of the hit with anchor embeddings, the processing unit

[0102] is configured to compute the plurality of similarity scores by comparing the input embedding which may represent the semantic meaning of the user’s original input text, with each of the text segment embeddings retrieved from the vector database

[0108] ,

[0079] The processing unit

[0102] is further configured to identify a set of similarity scores from the plurality of similarity scores. The set of similarity scores constitute the top N similarity scores. In an exemplary implementation, the processing unit

[0102] is further configured to identify the set of similarity scores from the plurality of similarity scores that were computed between the user’s input embedding and each of the pre-stored text segment embeddings. Furthermore, the set of similarity scores constitute the top N similarity scores i.e., scores that indicate the strongest semantic matches between the input text data and the stored clinical text passages.

[0080] The processing unit

[0102] is further configured to retrieve a set of text segments corresponding to the text segment embeddings from the plurality of text segment embeddings which yielded the set of similarity scores.

[0081] In an exemplary implementation, the processing unit

[0102] retrieves the set of text segments that correspond to the text segment embeddings which were previously identified based on their similarity scores. This ensures that only the most semantically relevant clinical text data in text segment embeddings is retrieved which is aligned with the input text data provided by the user.

[0082] In an aspect of the present disclosure, the plurality of text segment embeddings are pre-generated and stored in the vector database

[0108] , The plurality of text segment embeddings are pre-generated and stored in the vector database

[0108] to enhance system

[0100] efficiency and reduce computational load especially when dealing with large volumes of clinical text data.

[0083] The processing unit

[0102] is further configured to retrieve a text segment corresponding to an anchor embedding of the plurality of anchor embeddings for which the similarity score exceeded the pre-defined threshold.

[0084] In an exemplary implementation, in case the similarity score exceeds the pre-defined threshold, the processing unit

[0102] retrieves the specific text segment associated with the anchor embedding of the plurality of anchor embedding. Referring to the previous example, if one of the anchor embeddings in the vector database

[0108] is “Side effects associated with paracetamol use.” and this particular anchor embedding yields a similarity score of 0.91, whereas the pre-defined threshold is set at 0.90. Then in this case, the detection unit

[0112] detects the presence of a hit, because the similarity score exceeds the pre-defined threshold. Thereafter, the system

[0100] may directly retrieve the text segment associated with the anchor embedding which may include a passage from a clinical guideline listing the side effects of paracetamol without needing to initiate the broader search.

[0085] Referring to FIG. 2, an exemplary method flow diagram

[0200] for retrieving anchor indexed passages for clinical text data, in accordance with exemplary implementations of the present disclosure is shown. In an implementation, the method

[0200] is performed by the system

[0100] , Also, as shown in FIG. 2, the method

[0200] starts at step

[0202] ,

[0086] At step

[0204] , the method

[0200] includes receiving, by a processing unit

[0102] , an input text associated with the clinical text data from a user.

[0087] In an exemplary implementation, the processing unit

[0102] receives the input text associated with the clinical text data which may be in the form of electronic medical records that may have been captured in an unstructured text data format. The unstructured electronic medical records may also be associated with such as but limited to progress notes, radiology reports, discharge summaries etc.

[0088] In another exemplary implementation, the unstructured input text may be associated with other types of clinical text data which may include such as but not limited to clinical study protocols, ethics review reports, statistical analysis plans, clinical study reports, and scientific publications etc.

[0089] In yet another exemplary implementation, the input text may be in the form of input queries associated with the clinical text data provided by the user.

[0090] At step

[0206] , the method

[0200] includes rephrasing, by an input rephrasing unit

[0104] , the input text into a plurality of rephrased variants of the input text.

[0091] The input rephrasing unit

[0104] rephrases the input text data provided by the user into a plurality of rephrased variants. In an example, the inputs text may be a query, and the plurality of rephrased variants may be variations of the query.

[0092] In an exemplary implementation, the input rephrasing unit

[0104] rephrases the input text data to ensure that the plurality of rephrased variants or rephrased queries remain contextually relevant and clinically accurate.

[0093] In an aspect of the present disclosure, the input rephrasing unit

[0104] generates a minimum of 5 rephrased variants of the input text. In an exemplary implementation, the rephrasing unit

[0104] generates K number of rephrased variants of the input text data that is provided by the user wherein K is typically an integer which lies between 5 to 10.

[0094] In an exemplary implementation, the input rephrasing unit

[0104] generates a minimum of 5 rephrased variants of the input text provided by the user in order to preserve the meaning of original input text. However, the rephrased variants may vary in terms of vocabulary, sentence structure and phrasing etc. In an example, the unstructured input textsuch as “Treatments to manage diabetes.” may be rephrased to “Howto manage diabetes?” or “What are the best ways to treat diabetes” etc. By rephasing the input text, the chances of at least one of the rephrased variants to be mapped to the correct target text data increases.

[0095] At step

[0208] , the method

[0200] includes generating, by an input embedding generation unit

[0106] , a plurality of rephrased variant embeddings for each of the plurality of rephrased variants of the input text and an input embedding for the input text.

[0096] As used herein, the embedding for the input text refers to vectors that represent real- world objects, like words, images, or videos, in a form that machine learning models can easily process. In an exemplary implementation, the input embedding generation unit

[0106] converts each of the plurality of rephrased variants of input text and input embedding for input text into vector representations known as rephrased variant embeddings with the help of a domain adapted transformer model which may easily be processed.

[0097] As used herein, the domain adapted transformer model may refer to a machine learning model that has first been pre-trained on a target domain data and then fine-tuned on an existing training dataset. For example, domain adapted transformer model may first be pre-trained on the unstructured text data associated with the clinical text data which may include such as but not limited to progress notes, radiology reports, discharge summaries, and then fine-tuned on each of the plurality of rephrased variants of the input text and an input embedding to generate plurality of rephrased variant embeddings.

[0098] At step

[0210] , the method

[0200] includes retrieving, by the processing unit

[0102] , a plurality of anchor embeddings from a vector database

[0108] , In an aspect of the present disclosure, the plurality of anchor embeddings are pre-generated and stored in the vector database

[0108] ,

[0099] In an exemplary implementation, anchor embeddings are pre-stored collection of vector representations that may correspond to anchor phrases associated with at least one segments of clinical text data. In one example, the anchor embeddings help associate semantically similar texts having different meaning with at least one segment of clinical text data. In another example, the anchor embedding helps associate semanticallydifferent texts having the same meaning with at least one segment of clinical text data. For example, it is common to encounter texts in clinical documents that are semantically distinct from each other but are phrased using nearly identical words. E.g. “the patients were enrolled in cohort 4” versus “the patients were enrolled in cohort 5”. Such pairs are known as hard negatives. For such pairs of texts, semantic representations produced by the existing methods are nearly indistinguishable.

[0100] In yet another example, the anchor embedding helps associate semantically different texts having the same meaning with at least one segment of clinical text data. In an exemplary implementation, sometimes lexical variants of the same text can be mistaken to have a different meaning by existing methods. For example, Acetaminophen, Tylenol, and Crocin are synonyms for the same drug concept.

[0101] In an exemplary implementation, the anchor embeddings are pre-generated anchor phrases using the domain-adapted embedding model and stored in the vector database

[0108] for efficient retrieval at a later stage.

[0102] In an aspect of the present disclosure, for generating the plurality of anchor embeddings, the method

[0200] includes tagging, by the processing unit

[0102] , a plurality of text segments within a target corpus with a plurality of anchor phrases. Each of the anchor phrases has a semantic relationship with a tagged corresponding text segment. The method further includes generating, by an input embedding generation unit

[0106] , the plurality of anchor embeddings comprising the tagged plurality of text segments.

[0103] In an exemplary implementation, the processing unit

[0102] tags input text segments within the target corpus with relevant anchor phrases such that each anchor phrase bears a strong semantic relationship to the input text segment it is tagged to. In an example, for the given text segment “the patients in the treatment arm of the study were pre-treated with conditioning chemotherapy”, the question “what were the patients in the treatment arm of the study pre-treated with?” is a strong anchor.

[0104] In an aspect of the present disclosure, the plurality of anchor phrases are generated using a large language model (LLM). The LLM is pre-trained on text samples drawn from a domain of interest. As used herein, the LLMs are deep learning algorithms that may perform a variety of natural language processing (NLP) tasks. In an exemplary 1implementation, the anchor phrases are generated automatically with the help of the large language model (LLM) which is pre-trained on clinical text data provided by the user.

[0105] At step

[0212] , the method

[0200] includes computing, by a similarity scoring unit

[0110] , a plurality of similarity scores by comparing the input embedding and each of the plurality of rephrased variant embeddings with each of the plurality of anchor embeddings.

[0106] In an exemplary implementation, the similarity score unit

[0110] compares the input embeddings associated with the input text provided by the user and plurality of rephrased variant embeddings against each of the plurality of anchor embedding retrieved from the vector database

[0110] , After comparing, the similarity score unit

[0110] computes similarity scores, typically using cosine similarity, a standard method for evaluating the similarity between two non-zero vectors by calculating the cosine of the angle between them. In one example, a higher similarity score indicates greater semantic similarity between the input embeddings and plurality of rephrased variant embeddings with the plurality of anchor embeddings. In another example, a lower similarity score indicates lower semantic similarity between the input embeddings and plurality of rephrased embeddings with the plurality of rephrased variant embeddings.

[0107] At step

[0214] , the method

[0200] includes detecting, by a detection unit

[0112] , a presence and an absence of a hit based on the computed plurality of scores. The presence of the hit is detected in an event, a similarity score from the plurality of similarity scores exceeds a pre-defined threshold.

[0108] In an exemplary implementation, the detection unit

[0112] detects the presence or absence of the hit based on the computed plurality of scores and in case the similarity score of one of the anchor embeddings from the plurality of anchor embeddings exceeds the pre-defined threshold, the hit is detected which implies that one of the anchor embedding from the plurality of anchor embedding qualifies for a strong semantic match with the input text .

[0109] For example, if the input text provided by the user is “What are the side effects of paracetamol?”. The system

[0100] rephrases the input text data into plurality of rephrased variants such as “Adverse reactions to paracetamol” and “What can happen if Itake paracetamol?” and “paracetamol adverse effects”. Thereafter, embeddings of plurality of rephrased variants are generated and compared with stored plurality of anchor embeddings from the vector database

[0108] , Now let’s assume, one of the anchor embeddings in the vector database

[0108] is “Side effects associated with paracetamol use.” and this particular anchor embedding yields a similarity score of 0.91, whereas the predefined threshold is set at 0.90. Then in this case, the detection unit

[0112] detects the presence of a hit, because the similarity score exceeds the pre-defined threshold.

[0110] In an exemplary implementation, the pre-defined threshold is a hyperparameter for the algorithm that may be fine-tuned for each application with the help of a smaller data set.

[0111] In an aspect of the present disclosure, in the absence of the hit based on the computed plurality of scores, the method

[0200] further includes retrieving, by the processing unit

[0102] , a plurality of text segment embeddings from the vector database

[0108] , In an exemplary implementation, when no direct hit is detected i.e., none of the similarity scores between the input embeddings and its plurality of rephrased variants embeddings with each of the plurality of the anchor embedding exceeds the pre-defined threshold, the system

[0100] shifts to a back off strategy. In this case, the processing unit

[0102] is configured to retrieve a plurality of text segment embeddings from the vector database

[0108] to continue the search at a broader level.

[0112] In an aspect of the present disclosure, the method

[0200] includes computing, by the similarity scoring unit

[0110] , a plurality of similarity scores by comparing the input embedding with each of the plurality of text segment embeddings. In an exemplary implementation, when the system

[0100] enters the back off stage because of the absence of the hit with anchor embeddings, the processing unit

[0102] is configured to compute the plurality of similarity scores by comparing the input embedding which may represent the semantic meaning of the user’s original input text , with each of the text segment embeddings retrieved from the vector database

[0108] ,

[0113] In an aspect of the present disclosure, the method

[0200] further includes identifying, by the processing unit

[0102] , a set of similarity scores from the plurality of similarity scores. The set of similarity scores constitute the top N similarity scores. In anexemplary implementation, the processing unit

[0102] is further configured to identify the set of similarity scores from the plurality of similarity scores that were computed between the user’s input embedding and each of the pre-stored text segment embeddings. Furthermore, the set of similarity scores constitute the top N similarity scores i.e., scores that indicate the strongest semantic matches between the input text data and the stored clinical text passages.

[0114] In an aspect of the present disclosure, the method

[0200] further includes retrieving, by the processing unit

[0102] , a set of text segments corresponding to the text segment embeddings from the plurality of text segment embeddings which yielded the set of similarity scores.

[0115] In an exemplary implementation, the processing unit

[0102] retrieves the set of text segments that correspond to the text segment embeddings which were previously identified based on their similarity scores. This ensures that only the most semantically relevant clinical text data in text segment embeddings is retrieved which is aligned with the input text data provided by the user.

[0116] In an aspect of the present disclosure, the plurality of text segment embeddings are pre-generated and stored in the vector database

[0108] , In an exemplary implementation, the plurality of text segment embeddings are pre-generated and stored in the vector database

[0108] to enhance system

[0100] efficiency and reduce computational load especially when dealing with large volumes of clinical text data.

[0117] At step

[0216] , the method

[0200] includes retrieving, by the processing unit

[0102] , a text segment corresponding to an anchor embedding of the plurality of anchor embeddings for which the similarity score exceeded the pre-defined threshold.

[0118] In an exemplary implementation, in case the similarity score exceeds the pre-defined threshold, the processing unit

[0102] retrieves the specific text segment associated with the anchor embedding of the plurality of anchor embedding. Referring to the previous example, if one of the anchor embeddings in the vector database

[0108] is “Side effects associated with paracetamol use.” and this particular anchor embeddings yields a similarity score of 0.91, whereas the pre-defined threshold is set at 0.90. Then in this case, the detection unit

[0112] detects the presence of a hit, because the similarity score exceedsthe pre-defined threshold. Thereafter, the system

[0100] may directly retrieve the text segment associated with the anchor embedding which may include a passage from a clinical guideline listing the side effects of paracetamol without needing to initiate the broader search.

[0119] Thereafter, at step

[0218] , method

[0200] terminates.

[0120] FIG. 3 illustrates an exemplary process

[0300] flow diagram for retrieving anchor indexed passages for clinical text data, in accordance with exemplary implementations of the present disclosure is shown.

[0121] At step

[0302] , the process

[0300] comprises receiving input text or queries associated with the clinical text data by the user.

[0122] In an exemplary implementation, the processing unit

[0102] receives the input text associated with the clinical text data which may be in the form of electronic medical records that may have been captured in an unstructured text data format. The unstructured electronic medical records may also be associated with such as but limited to progress notes, radiology reports, discharge summaries etc.

[0123] In an exemplary implementation, the unstructured input text may be associated with other types of clinical text data which may include such as but not limited to clinical study protocols, ethics review reports, statistical analysis plans, clinical study reports, and scientific publications etc.

[0124] In an exemplary implementation, the input text may be in the form of input queries associated with the clinical text data provided by the user.

[0125] At step

[0304] , the process

[0300] comprises rephrasing the input text data or queries into a plurality of rephrased variants of the input text.

[0126] In an exemplary implementation, the input rephrasing unit

[0104] rephrases the input text data provided by the user into a plurality of rephrased variants. In an example, the inputs text may be a query, and the plurality of rephrased variants may be variations of the query.

[0127] In an exemplary implementation, the input rephrasing unit

[0104] rephrases the input text data to ensure that the plurality of rephrased variants or rephrased queries remain contextually relevant and clinically accurate.

[0128] In an aspect of the present disclosure , the input rephrasing unit

[0104] generates a minimum of 5 rephrased variants of the input text. In an exemplary implementation, the rephrasing unit

[0104] generates K number of rephrased variants of the input text data that is provided by the user wherein K is typically an integer which lies between 5 to 10.

[0129] In an exemplary implementation, the input rephrasing unit

[0104] generates minimum 5 rephrased variants of the input text provided by the user in order to preserve the meaning of original input text. However, the rephrased variant may vary in terms of vocabulary, sentence structure and phrasing etc. In an example, the unstructured input text such as “Treatments to manage diabetes.” may be rephrased to “Howto manage diabetes?” or “What are the best ways to treat diabetes” etc. By rephasing the input text, the chances of at least one of the rephrased variants to be mapped to the correct target text data increases.

[0130] At step

[0306] , the process

[0300] comprises generating a plurality of rephrased variant embeddings based on the original input text data or queries and rephrased versions of the original text data or queries.

[0131] In an exemplary implementation, the input embedding generation unit

[0106] converts each of the plurality of rephrased variants of input text and input embedding for input text into vector representations known as rephrased variant embeddings with the help of a domain adapted transformer model which may easily be processed.

[0132] In an exemplary implementation, the plurality of rephrased variant embeddings are calculated and generated at run time using “mixedbread-ai / mxbai-embed- large-vl” model.

[0133] At step

[0308] , the process

[0300] comprises normalizing the plurality of rephrased variant embeddings.

[0134] In an exemplary implementation, the normalization of the plurality of rephrased variant embeddings refers to a technique for eliminating the data redundancythat may occur in the database. The process of normalization of the plurality of rephrased variant embeddings helps in reducing or eliminating this redundancy, which may further improve the efficiency and consistency of the database.

[0135] At step

[0310] , the process

[0300] comprises detecting a presence or an absence of a direct hit search based on the computed plurality of scores.

[0136] In an exemplary implementation, the detection unit

[0112] detects the presence or absence of the hit based on the computed plurality of scores and in case the similarity score of one of the anchor embeddings from the plurality of anchor embeddings exceeds the pre-defined threshold, the hit is detected which implies that one of the anchor embedding from the plurality of anchor embedding qualifies for a strong semantic match with the input text .

[0137] For example, if the input text provided by the user is “What are the side effects of paracetamol?”. The system

[0100] rephrases the input text data into plurality of rephrased variants such as “Adverse reactions to paracetamol” and “What can happen if I take paracetamol?” and “paracetamol adverse effects”. Thereafter, embeddings of the plurality of rephrased variants are generated and compared with stored plurality of anchor embeddings from the vector database

[0108] , Now let’s assume, one of the anchor embeddings in the vector database

[0108] is “Side effects associated with paracetamol use.” and this particular anchor embedding yields a similarity score of 0.91, whereas the predefined threshold is set at 0.90. Then in this case, the detection unit

[0112] detects the presence of a hit, because the similarity score exceeds the pre-defined threshold.

[0138] In an exemplary implementation, the pre-defined threshold is a hyperparameter for the algorithm that may be fine-tuned for each application with the help of a smaller data set.

[0139] In an exemplary implementation, prior to detecting the presence of a direct hit or absence of the direct hit, the process

[0300] comprises computing the plurality of similarity scores. The similarity scores are computed by comparing the input embedding and each of the normalized plurality of rephrased variant embeddings with each of the plurality of normalized anchor embeddings.

[0140] In an exemplary implementation, the similarity score unit

[0110] compares the input embeddings associated with the input text provided by the user and plurality of rephrased variant embeddings against each of the plurality of anchor embedding retrieved from the vector database

[0110] , After comparing, the similarity score unit

[0110] computes similarity scores, typically using cosine similarity, a standard method for evaluating the similarity between two non-zero vectors by calculating the cosine of the angle between them. In one example, a higher similarity score indicates greater semantic similarity between the input embeddings and plurality of rephrased variant embedding with the plurality of anchor embeddings. In another example, a lower similarity score indicates lower semantic similarity between the input embeddings and plurality of rephrased embeddings with the plurality of rephrased variant embeddings.

[0141] At step

[0312] , the process

[0300] comprises pre-generating and storing the plurality of normalized anchor embeddings in the vector database

[0108] ,

[0142] In an aspect of the present disclosure, the plurality of anchor phrases are generated using a large language model (LLM). The LLM is pre-trained on text samples drawn from a domain of interest. As used herein, the LLMs are deep learning algorithms that may perform a variety of natural language processing (NLP) tasks. In an exemplary implementation, the anchor phrases are generated automatically with the help of the large language model (LLM) which is pre-trained on clinical text data provided by the user.

[0143] In an exemplary implementation, the normalized anchor embeddings are generated by converting the target document which may be a large document associated with the clinical text data into the plurality of document chunks. This ensures that the target documents are easily processed and there is no overload on the system

[0100] ,

[0144] In an exemplary embodiment, the target document is segmented semantically. This can be accomplished by applying a semantic schema. For instance, if the target document is a patient’s discharge summary, a schema may be captured with categories such as but not limited to demographic details, clinical history and presentation, anatomical location, histopathological and diagnostic findings, imaging and radiological findings, molecular and genetic data, treatment modalities, clinical outcome and followup, and other or unassigned, which may represent the document’s semantic structure.

[0145] In another exemplary embodiment, each sentence in the target document of the one or more target document may be converted into a vector using a sentence transformer, followed by spectral clustering to group semantically similar sentences into clusters, with each cluster representing a semantic segment. Semantic segmentation is optional and depends on the specific domain and the nature of the documents in the corpus. These semantic segments may be further divided using either semantic or non-semantic methods, such as fixed-size chunks.

[0146] In yet another exemplary implementation, the target document that was segmented semantically may be converted into semantic descriptors. As used herein, the semantic descriptor of a text segment is a text item / items that is / are algorithmically derived from the segment and is semantically related to it. Some examples of semantic descriptors are but not limited to keywords, key phrases, title, abstract / summary, relational triples, and question-answer pairs.

[0147] In an exemplary implementation, the process

[0300] further comprises converting each semantic descriptor of the one or more target document into a vector using an embedding model.

[0148] In an exemplary implementation, the process

[0300] further comprises creating appropriate vector collections by aggregating plurality of semantic descriptors or normalized anchor embeddings and storing them in the vector database

[0108] ,

[0149] In an aspect of the present disclosure, the process

[0300] further comprises tagging the plurality of document chunks within a target corpus with a plurality of auto generated anchors.

[0150] In an exemplary implementation, the processing unit

[0102] tags input text segments within the target corpus with relevant anchor phrases such that each anchor phrase bears a strong semantic relationship to the input text segment it is tagged to. In an example, if the given text segment “the patients in the treatment arm of the study were pretreated with conditioning chemotherapy”, the question “what were the patients in the treatment arm of the study pre-treated with?” is a strong anchor.

[0151] In an exemplary implementation, the process

[0300] further comprises generating the plurality of normalized anchor embeddings comprising the plurality of document chunks within a target corpus with a plurality of auto generated anchors.

[0152] In an exemplary implementation, the plurality of anchor phrases are generated using a large language model (LLM). The LLM is pre-trained on text samples drawn from a domain of interest. As used herein, the LLMs are deep learning algorithms that may perform a variety of natural language processing (NLP) tasks. In an exemplary implementation, the anchor phrases are generated automatically with the help of the large language model (LLM) which is pre-trained on clinical text data provided by the user.

[0153] At step

[0314] , in an event, a similarity score from the plurality of similarity scores exceeds a pre-defined threshold the direct hit is detected, the process

[0300] further comprises retrieving the text segment passage corresponding to the anchor embedding of the plurality of anchor embeddings for which the similarity score exceeded the pre-defined threshold from the vector database

[0108] ,

[0154] In an exemplary implementation, a direct hit implies that the correct passage has been found that may be then sent to a generator model. This improves the overall search accuracy since with only a single passage to condition the output on, the response generator has fewer opportunities to make mistakes. Additionally, with fewer tokens to process the response generator incurs lower computational cost and makes the search more responsive.

[0155] At step

[0316] , the process

[0300] comprises generating a response. In an exemplary implementation, a response generator is used to generate responses.

[0156] In an exemplary implementation, the retrieved contexts are passed to the response generator for answer generation, providing users with relevant and accurate information.

[0157] In an exemplary implementation, the detection unit

[0112] detects the presence or absence of the hit based on the computed plurality of scores and in case the similarity score of one of the anchor embeddings from the plurality of anchor embeddings exceeds the pre-defined threshold, the hit is detected which implies that one of the anchorembedding from the plurality of anchor embedding qualifies for a strong semantic match with the input text data.

[0158] For example, if the input text provided by the user is “What are the side effects of paracetamol?”. The system

[0100] rephrases the input text into plurality of rephrased variants such as “Adverse reactions to paracetamol” and “What can happen if I take paracetamol?” and “paracetamol adverse effects”. Thereafter, embeddings of plurality of rephrased variants are generated and compared with stored plurality of anchor embeddings from the vector database

[0108] , Now let’s assume, one of the anchor embeddings in the vector database

[0108] is “Side effects associated with paracetamol use.” and this particular anchor embedding yields a similarity score of 0.91, whereas the predefined threshold is set at 0.90. Then in this case, the detection unit

[0112] detects the presence of a hit, because the similarity score exceeds the pre-defined threshold.

[0159] In an exemplary implementation, the pre-defined threshold is a hyperparameter for the algorithm that may be fine-tuned for each application with the help of a smaller data set.

[0160] For example, if the similarity score using the technique of cosine similarity of the user query with the questions in the QAC DB is greater than 0.91 and number of retrieved score is 1, then corresponding context associated with the user query is passed to the response generator for answer generation.

[0161] At step

[0318] , in the event the absence of the hit is detected, the process

[0300] comprises backing off and retrieving the plurality of text segment embeddings from the vector database

[0108] ,

[0162] In an exemplary implementation, when no direct hit is detected i.e., none of the similarity scores between the input embeddings and its plurality of rephrased variants embeddings with each of the plurality of the anchor embeddings exceeds the pre-defined threshold, the system

[0100] shifts to a back off strategy. In this case, the processing unit

[0102] is configured to retrieve a plurality of text segment embeddings from the vector database

[0108] to continue the search at a broader level.

[0163] In an aspect of the present disclosure , the process

[0300] further comprises computing the plurality of similarity scores by comparing the input embedding with eachof the plurality of text segment embeddings. In an exemplary implementation, when the system

[0100] enters the back off stage because of the absence of the hit with anchor embeddings, the processing unit

[0102] is configured to compute the plurality of similarity scores by comparing the input embedding which may represent the semantic meaning of the user’s original input text , with each of the text segment embeddings retrieved from the vector database

[0108] ,

[0164] In an exemplary implementation, the process

[0300] further comprises identifying a set of similarity scores from the plurality of similarity scores. The set of similarity scores constitute the top N similarity scores of the text segment passage. The set of similarity scores constitute the top N similarity scores. In an exemplary implementation, the processing unit

[0102] is further configured to identify the set of similarity scores from the plurality of similarity scores that were computed between the user’s input embedding and each of the pre-stored text segment embeddings. Furthermore, the set of similarity scores constitute the top N similarity scores i.e., scores that indicate the strongest semantic matches between the input text data and the stored clinical text passages.

[0165] In an aspect of the present disclosure, the process

[0300] further comprises retrieving a set of text segments corresponding to the text segment embeddings from the plurality of text segment embeddings which yielded the set of similarity scores. In an exemplary implementation, the set of similarity scores are retrieved from the vector database

[0108] ,

[0166] In an exemplary implementation, the processing unit

[0102] retrieves the set of text segments that correspond to the text segment embeddings which were previously identified based on their similarity scores. This ensures that only the most semantically relevant clinical text data in text segment embeddings is retrieved which is aligned with the input text provided by the user.

[0167] In an exemplary implementation, the risk of LLM hallucinations are reduced by using this two-stage search approach i.e., by using direct hit and back off and retrieval methods, thereby generating only the most relevant responses using the response generator.

[0168] As used herein, LLM hallucinations are the events in which ML models, particularly large language models (LLMs) like GPT-3 or GPT-4, produce outputs that are coherent and grammatically correct but factually incorrect or nonsensical. Hallucinations in this context means the generation of false or misleading clinical information. These hallucinations may occur due to various factors, such as limitations in training data, biases in the model, or the inherent complexity of language.

[0169] Thereafter, the process

[0300] proceeds to generating a response as shown in method step

[0316] , In an exemplary implementation, ColBERT (with k = 10) may be used for retrieving the best matched passages. The retrieved passages are then passed to the response generator. As used herein, ColBERT is a fast and accurate retrieval model, enabling scalable BERT-based search over large text collections in tens of milliseconds.

[0170] For example, if the absence of the hit is detected or direct Hit Fails, ColBERT (k=l 0, k acc = 96.64%) is used for passage retrieval and top 10 relevant contexts having top N similarity scores are retrieved and generated.

[0171] FIG. 4 illustrates an exemplary process

[0400] flow diagram for back off and retrieval of the plurality of text segment embeddings from the vector database, in accordance with exemplary implementations of the present disclosure is shown.

[0172] At step SI, the process

[0400] comprises receiving an input query text from the user to segment the query semantically. In an exemplary implementation, depending on the type of query text, the input query text may be treated as a single text chunk or can be segmented into semantic segments using the same algorithm as for the document corpus.

[0173] The query text is received at a semantic segmentation unit

[0402] which is configured to semantically segment the documents in the target corpus per a pre-defined segmentation strategy. The semantic segmentation unit

[0402] implements a number of semantically sensitive as well as non-semantic segmentation approaches to arrive at segments that conform to the overall segmentation goals for the target corpus such as semantic / non-semantic, max-length, overlap etc.

[0174] At step S2, the process

[0400] further comprises generating semantic descriptors (SDs) or anchors for the input query as needed. In an exemplary implementation, an anchor generator unit

[0404] is configured to generate the requiredsemantic descriptors or anchor text for each text segment in the target corpus. Typically, there may be several anchor generator units

[0404] that may work in parallel to generate the required semantic descriptors / anchors efficiently. The plurality of semantic descriptors or anchors are generated such as SD1, SD2... SDj.

[0175] At step S3, the process

[0400] comprises generating vectors of semantic descriptors using the plurality of semantic descriptors. An embedding unit

[0406] is configured to generate the vectors of semantic descriptors in the latent semantic space using an embedding model. The vectors are generated for each semantic descriptor / anchor of the input text chunk, such as VSD1, VSD2... VSDj.

[0176] The plurality of the generated vectors are stored in the vector database

[0108] along with the required metadata. The vector database

[0108] is configured to aggregate the generated vectors for the same semantic descriptor type into a collection, for all the descriptor types selected for a retriever implementation.

[0177] The input rephrasing unit

[0104] (also referred to herein as query unit) is configured to orchestrate the conversion of the input query text into vector in the latent semantic space that can be used to query the collections. The input rephrasing unit

[0104] also generates K rephrasing of the input text, where K is typically an integer between 5 and 10. For each rephrased query the generation of segments, anchors and finally vectors is done by the respective units as described earlier.

[0178] The process

[0400] comprises computing, by a similarity scoring unit

[0110] , a plurality of similarity scores for plurality of semantic descriptors or anchors.

[0179] If the similarity score for any semantic descriptor or anchor exceeds the predefined threshold, it implies a direct hit. In such a case the text segment corresponding to the anchor yielding the higher input-anchor similarity score is retrieved. The pre-defined threshold is a hyper-parameter for the algorithm and may be tuned for each application with the help of a small tuning data set.

[0180] Further, in the absence of the direct hit, for each query vector generated in step S3 above, the process

[0400] further comprises searching for relevant vector for each query vector in the vector database

[0108] ,

[0181] At step S4, the process

[0400] further comprises sending, from the vector database

[0108] , the most relevant searched vector to a retriever unit

[0408] for further processing.

[0182] At step S5, the process

[0400] further comprises sending, by the embedding unit

[0406] , the plurality of generated vectors of semantic descriptors (VSD1, VSD2... VSDj) to the retriever unit

[0408] ,

[0183] At step S6, the process

[0400] further comprises retrieving the top-A chunks for each query vector (base segment sets retrieved for the query). For each query vector produced by the query agent this agent retrieves the top A- best matching segments / descriptors from the relevant collection of the vector database. In an exemplary implementation, the retriever unit

[0408] is configured to retrieve as many Assized sets for each query vectors. Typically, the retrieval unit

[0408] is triggered if direct-hit detection fails. However, for certain target corpora, input query, semantic descriptors or anchor, the retrieval unit

[0408] may be used along with direct hit detection

[0112] ,

[0184] The process

[0400] further comprises ranking all the retrieved chunks in the chunk sets to get the top m best matching chunks (usually m<k). A ranking unit

[0410] is configured to re-rank Assized sets of retrieved chunks using a re-ranking algorithm.

[0185] At step S7, the process

[0400] further comprises generating, by the ranking unit

[0410] , the top m chunks from the reranked list wherein m<k.

[0186] As is evident from the above, the present disclosure provides a technically advanced solution for retrieving anchor indexed passages for clinical text data. The present invention provides a solution that reduces latency and computational overhead in searching massive clinical text repositories. The proposed invention further provides a solution that uses architecture that significantly reduces direct comparisons between the input text and target passages. This leads to a reduction in computation costs and latency. Furthermore, the two stage architecture results in overall fewer tokens on which the response needs to be conditioned. This reduces the computational overhead and also improves the precision of response generation. The proposed invention further provides a solution that automatically generates anchor texts and index massive text repositories. This allows the system to adopt the chunking strategy that best suits a document type. By reducing thefrequency of direct comparisons between input text and target passages, the present invention can scale almost limitlessly. The proposed invention further provides a solution that generates a variety of document types. The clinical text documents are produced in a various settings such as patient notes, discharge summaries, case reports, articles, package inserts, guidelines, study protocols, institutional reviews, study reports etc. Further, the present invention is tuned to handle subtle variations in text patterns across various types of clinical knowledge sources as the new clinical vocabulary is introduced with medical advancement. The proposed invention further provides a solution that integrates with existing clinical workflows.

[0187] In light of the above, the present invention provides a solution which is fine tuned to retrieve medical evidence from large repositories such as Chocran reviews, Pubmed, Case Reports. The ready availability of the applicable treatment guidelines that are based on high quality evidence, may allow doctors to treat patients in accordance with such evidence thereby improving overall outcomes and cutting unnecessary treatment costs. As a tool in the hands of medical researchers that may enable fine grained searches based on semantic matching.

[0188] Furthermore, the present invention may easily enable search massive drug adverse events repositories for adverse event reports that match an input text, while taking into account lexical variations in the reports. Drug adverse event reports may often be embedded within a document such as a clinical note. The present invention may handle such adverse events and therefore be used to improve post marketing surveillance and drug safety.

[0189] The present invention further provides an efficient and effective passage retrieval method which may help the researchers in identifying and extracting the most relevant information from diverse sources, facilitating evidence synthesis and metaanalysis. Furthermore, the passage retrieval method as disclosed in the present invention may further assist researchers in identifying relevant protocols from previous studies, guidelines, and regulatory documents, enabling them to design effective study protocols that adhere to ethical standards and regulatory requirements.31

[0190] In pharmaceutical research, passage retrieval method may aid in identifying potential drug targets, understanding drug mechanisms, and exploring safety and efficacy profiles of existing drugs. Researchers may retrieve passages related to drug interactions, pharmacokinetics, pharmacodynamics, and adverse reactions to guide drug discovery and development processes.

[0191] Although the invention has been described with reference to several exemplary embodiments, it is understood that the words that have been used are words of description and illustration, rather than words of limitation. Changes may be made within the purview of the appended claims, as presently stated, and as amended, without departing from the scope and spirit of the present disclosure in its aspects. Although the invention has been described with reference to particular means, materials, and embodiments, the invention is not intended to be limited to the particulars disclosed; rather the invention extends to all functionally equivalent structures, methods, and uses such as are within the scope of the appended claims.

[0192] Further, in accordance with the present disclosure, it is to be acknowledged that the functionality described for the various components / units can be implemented interchangeably. While specific embodiments may disclose a particular functionality of these units for clarity, it is recognized that various configurations and combinations thereof are within the scope of the disclosure. The functionality of specific units as disclosed in the disclosure should not be construed as limiting the scope of the present disclosure. Consequently, alternative arrangements and substitutions of units, provided they achieve the intended functionality described herein, are considered to be encompassed within the scope of the present disclosure.

[0193] While considerable emphasis has been placed herein on the disclosed implementations, it will be appreciated that many implementations can be made and that many changes can be made to the implementations without departing from the principles of the present disclosure. These and other changes in the implementations of the present disclosure will be apparent to those skilled in the art, whereby it is to be understood that the foregoing descriptive matter to be implemented is illustrative and non-limiting.

Claims

We claim:

1. A method for retrieving anchor indexed passages for clinical text data, the method comprising: receiving, by a processing unit [102], an input text associated with the clinical text data from a user; rephrasing, by an input rephrasing unit [104], the input text into a plurality of rephrased variants of the input text; generating, by an input embedding generation unit [106], a plurality of rephrased variant embeddings for each of the plurality of rephrased variants of the input text and an input embedding for the input text; retrieving, by the processing unit [102], a plurality of anchor embeddings from a vector database [108]; computing, by a similarity scoring unit [110], a plurality of similarity scores by comparing the input embedding and each of the plurality of rephrased variant embeddings with each of the plurality of anchor embeddings; detecting, by a detection unit [112], a presence and an absence of a hit based on the computed plurality of scores, wherein the presence of the hit is detected in an event a similarity score from the plurality of similarity scores exceeds a predefined threshold; and retrieving, by the processing unit [102], a text segment corresponding to an anchor embedding of the plurality of anchor embeddings for which the similarity score exceeded the pre-defined threshold.2 The method as claimed in claim 1 , wherein in the absence of the hit, the method comprises: retrieving, by the processing unit [102], a plurality of text segment embeddings from the vector database [108]; computing, by the processing unit [102], a plurality of similarity scores by comparing the input embedding with each of the plurality of text segment embeddings;identifying, by the processing unit [102], a set of similarity scores from the plurality of similarity scores, wherein the set of similarity scores constitute the top N similarity scores; and retrieving, by the processing unit [102], a set of text segments corresponding to the text segment embeddings from the plurality of text segment embeddings which yielded the set of similarity scores. The method as claimed in claim 1, wherein the plurality of anchor embeddings are pregenerated and stored in the vector database [108], The method as claimed in claim 3, wherein generating the plurality of anchor embeddings comprises: tagging, by the processing unit [102], a plurality of text segments within a target corpus with a plurality of anchor phrases, wherein each of the anchor phrases has a semantic relationship with a tagged corresponding text segment; and generating, by an input embedding generation unit [ 106], the plurality of anchor embeddings comprising the tagged plurality of text segments. The method as claimed in claim 4, wherein the plurality of anchor phrases are generated using a large language model (LLM), wherein the LLM is pre-trained on text samples drawn from a domain of interest. The method as claimed in claim 2, wherein the plurality of text segment embeddings are pre-generated and stored in the vector database [108], The method as claimed in claim 1, wherein the input rephrasing unit [104] generates a minimum of 5 rephrased variants of the input text. A system [100] for retrieving anchor indexed passages for clinical text data, the system [100] comprising:a processing unit [102] configured to receive an input text associated with the clinical text data from a user; an input rephrasing unit [104] configured to rephrase the input text into a plurality of rephrased variants of the input text; an input embedding generation unit [106] configured to generate a plurality of rephrased variant embeddings for each of the plurality of rephrased variants of the input text and an input embedding for the input text; the processing unit [102] further configured to retrieve a plurality of anchor embeddings from a vector database [108]; a similarity scoring unit [110] configured to compute a plurality of similarity scores by comparing the input embedding and each of the plurality of rephrased variant embeddings with each of the plurality of anchor embeddings; a detection unit [112] configured to detect a presence and an absence of a hit based on the computed plurality of scores, wherein the presence of the hit is detected if a similarity score from the plurality of similarity scores exceeds a pre-defined threshold; and the processing unit [102] configured to retrieve a text segment corresponding to the anchor embedding for which the similarity score exceeded the predefined threshold. The system [100] as claimed in claim 8, wherein in the absence of the hit, the processing unit [102] is further configured to: retrieve a plurality of text segment embeddings from the vector database [108]; compute a plurality of similarity scores by comparing the input embedding with each of the plurality of text segment embeddings; identify a set of similarity scores from the plurality of similarity scores, wherein the set of similarity scores constitute the top N similarity scores; andretrieve a set of text segments corresponding to the text segment embeddings from the plurality of text segment embeddings which yielded the set of similarity scores.

10. The system [100] as claimed in claim 8, wherein the plurality of anchor embeddings are pre-generated and stored in the vector database [108],11. The system [100] as claimed in claim 10, wherein in order to generate the plurality of anchor embeddings, the processing unit [102] is further configured to tag a plurality of text segments within a target corpus with a plurality of anchor phrases, wherein each of the anchor phrases has a semantic relationship with a tagged corresponding text segment; and the input embedding generation unit [106] is further configured to generate the plurality of anchor embeddings comprising the tagged plurality of text segments.

12. The system [100] as claimed in claim 11, wherein the plurality of anchor phrases are generated using a large language model (LLM), wherein the LLM is pre-trained on text samples drawn from a domain of interest.

13. The system [100] as claimed in claim 9, wherein the plurality of text segment embeddings are pre-generated and stored in the vector database [108],14. The system [100] as claimed in claim 8, wherein the input rephrasing unit [104] generates a minimum of 5 rephrased variants of the input text.

Citation Information

Patent Citations

  • Medical record text similarity retrieval method and system and computer equipment

    CN111949759A

  • Request paraphrasing system, request paraphrasing model and request determining model training method, and dialogue system

    US20210034817A1