Technology · Language models
Semantic search
Semantic search is search with meaning: instead of comparing the literal terms of a query against the literal terms of a document, the system tries to understand what the query is about and what each document is about, and then matches the two on that basis.[1]
A document that only ever spells out "New York Times" contains neither of those words, so a search engine that matches strings will pass it over, even though the document is exactly what the person wanted. This gap between the words a query uses and the words a document uses is the problem semantic search exists to close. The phrase covers a family of techniques rather than one algorithm, and the meaning can be brought in at several different points in the process.
Overview
Semantic search
Where meaning enters

One place is the query. A system can interpret the request, recognize that "ny times" names a publication, and expand or rewrite the query before it is matched against anything. Another place is the data. Documents can be annotated ahead of time, with the entities and concepts they mention marked up, so that a search runs over those annotations rather than over raw text. A third place is the knowledge representation itself: the system may hold a structured body of knowledge, such as an ontology, in which concepts are linked to one another by defined relations, and use those links to decide what counts as relevant.[1] These choices are not exclusive, and a working engine often combines them.
The payoff is material that shares no words with the query. A keyword engine can only return documents that contain the query's terms, so a relevant document phrased differently is invisible to it. A semantic engine can return it, because the connection is made through meaning rather than through spelling. The same property lets a system answer requests that are awkward to phrase as keywords at all, such as a request for documents about a concept whose common name is ambiguous or whose formal name the searcher does not know.
What it costs
The difficulties begin with names. Most names of biomedical objects, such as genes, chemicals and diseases, are highly ambiguous, and a search that treats a name as a string will return results that are too large and too unspecific to use.[3] Resolving which sense of a name is meant, and which of its many spellings a document used, is work that a keyword engine never has to do. Semantic search also has to be measured, and a system may return a genuinely relevant document that no human assessor ever looked at, so judging it against a fixed set of previously judged documents can understate what it found. Judging such a system against a fixed set of previously judged documents can therefore understate what it actually found.[5] Finally, there is cost: annotation, knowledge structures and the models that interpret queries all take effort to build and maintain, and the richer the representation, the more there is to keep current.
Semantic search matches on meaning rather than on shared words, which finds relevant material a keyword engine would miss, at the price of ambiguity, harder evaluation and higher build cost.
The rest of this chapter follows the idea through its parts: how keyword matching fails and why, how queries and documents are turned into comparable representations, how vectors and ontologies carry meaning, how results are ranked, and how the approach performs in clinical records, scientific literature and other domains. It closes with the evidence on whether semantic search actually retrieves better, the open problems of evaluation and cost, and the role semantic retrieval now plays in feeding language models.
History
From keyword matching to matching meanings
A bag-of-words system treats a document as an unordered collection of its words, builds an index from those words, and answers a query by finding documents that contained the query's terms.[6] The model is simple and fast, and it works whenever the searcher happens to use the same words the author used. Its weakness is structural rather than incidental. A query and a document can be about the same subject and still share almost no vocabulary, and under a bag-of-words rule that document is simply not retrieved. The mismatch is not a rare edge case; it has been described as the most critical challenge in search, and the dissatisfaction users report with relevance has been traced mainly to it.[6]

The reason the mismatch is so stubborn is that word matching throws away the information that would resolve it. Two documents can use the same word for different things, and two documents can use different words for the same thing, and a term-matching engine has no way to tell either case apart, because it never represents what the words mean. What it needs instead is a comparison of meanings: some account of what the query is about and what each document is about, followed by a matching step between those two accounts rather than between their spellings. That is the shift semantic search makes, and it can happen on either side of the comparison or on both. The query can be interpreted and enriched before matching, the documents can be annotated with the concepts they discuss, or the system can hold a structured body of knowledge that supplies the relations between concepts and lets relevance be reasoned about rather than looked up.[1]
What made the shift practical
Representing meaning is expensive, and for a long time the cost kept the idea at the margins. Two developments changed the arithmetic. The first is the availability of large amounts of log data, which, together with advanced machine learning techniques, made richer query and document representations and matching between them more feasible.[6] The second is machine learning, which turned the problem of matching a query to a document into a problem of learning a matching function from examples. With large amounts of logged query data and stronger learning methods, building richer representations of queries and documents, and matching between them, became feasible at a scale that had not been possible before.[6]
The two developments reinforce each other. Annotated text supplies the training material, and learned models generalize beyond the exact annotations they saw, so the representation of meaning improves as more text is processed. The same machinery also lets a system compare a query and a document along several distinct dimensions at once, such as the form of the words used, the phrases they form, the senses they carry, the topic they belong to and the structure of the text around them, rather than collapsing everything into a single string comparison.[6] Each dimension captures a way in which a relevant document can fail to share words with its query.
It is worth being precise about what has and has not changed. The bag-of-words approach still functions as the main mechanism of modern search engines, and semantic matching is layered on top of it rather than replacing it outright.[6] The literal terms remain a strong signal, and much of the engineering in a semantic system goes into deciding when meaning should override them. The sections that follow take up the two failure modes in detail, then the representations that carry meaning, the vector spaces and ontologies in which it is stored, and the ranking machinery that turns a comparison into an ordered list of results.
Keyword matching fails when a relevant document shares no words with the query; semantic search answers that by representing meaning on both sides and matching the representations.
Why exact words fail: ambiguity and vocabulary mismatch
The failure of keyword matching is not one problem but two, and they pull in opposite directions. In the first, a single string stands for many different things, so a search for it drags in material about everything it names. In the second, a single thing goes by many different strings, so a search for any one of them misses the material that used another. A term-matching engine has no way to tell either case apart, because it never represents what the string means; it only knows that the characters match. Biomedical literature shows both failures at once, and shows why they are hard to fix by hand.

One name, many things
Names in the life sciences are short, reused and rarely governed by any naming convention. The acronym "PAP," for instance, refers to more than eight different human genes, and also to concepts such as pulmonary artery pressure.[3] A searcher who types it has no way to say which sense is meant, and the engine has no way to ask. Every document containing those three letters comes back, whether it concerns a gene, a pressure reading, or something else entirely. The result is not wrong so much as unusable: a result set too large and too unspecific to read through, which is exactly the complaint that motivates semantic approaches in this domain.[3]
The scale of the problem is visible in ordinary searching behavior. More than one third of all PubMed queries return over 100 citations.[3] That figure does not by itself prove that ambiguity is the cause, but it shows how often a query fails to narrow the literature to something a person can actually examine. Manually assigned subject tags such as MeSH terms ease the problem only partly, because those tags are notoriously incomplete and describe concepts at a coarse grain.[3] A tag may say a paper concerns a gene without saying which one, or may be missing altogether.
One thing, many names
The mirror image is just as damaging. A researcher interested in a particular genetic variant, the schizophrenia-associated SNP Val158Met on the gene COMT, might search for it by name and get 448 hits in PubMed.[3] That looks like a success until the variants of the name are counted: the same variant appears in the literature as V158M, as Val158→Met, as Val(158)Met, and as Val158/Met, among other spellings. A direct PubMed search for the name Val158Met returns 448 hits, while GeneView, which recognizes and unifies lexical variations, returns 575 articles for a search for V158M.[3] The extra articles were always there; the string match simply could not see them.
Worse, the name itself is not unique: V158M is known to exist for almost twenty different human genes. The source also notes the high number of possibilities for describing SNPs, such as Val108Leu, 472G>A and 322G>C.[3] Each of these is a separate route by which a relevant paper can stay hidden.
Why the two failures compound
The two problems are not independent, and that is what makes them so resistant to simple fixes. Expanding a query with synonyms to catch the many names of one thing also widens the net for the many things that share a name, so an engine that fixes one failure tends to worsen the other. V158M is known to exist for almost 20 different human genes, and PAP refers to more than eight different human genes as well as concepts such as pulmonary artery pressure.[3] A keyword engine has no representation in which to hold the distinction, so no amount of query rewriting settles the matter.
What is needed is a representation that separates the entity from the string used to mention it, so that a system can recognize when two different spellings point at the same thing and when one spelling points at different things. That is the work of named entity recognition and normalization, and of the identifiers and concept structures that later sections take up. The point to carry forward is that the vocabulary mismatch is not a cosmetic annoyance to be patched with a longer synonym list. It is a consequence of matching on surface form, and it persists for as long as the surface form is all the engine has.
A string can name several things and a thing can carry several strings; keyword matching cannot tell which case it is in, so it both over-returns and under-returns.
How it works
Queries, documents and the space between them
Every search system, however clever, does the same basic thing: it takes what the searcher typed, takes each item in the collection, and decides how close the two are. What separates one system from another is what it compares. A keyword engine compares strings. A semantic engine compares representations, which are stand-ins for the query and for each document that preserve what they mean rather than how they are spelled. Building those stand-ins is the central engineering task, and the matching step is only as good as they are.
A representation is any structured form of a query or document that a machine can compare with another such form. The simplest is the list of words a document contains, which is what a bag-of-words index stores. Richer representations might record the entities a document mentions, the concepts those entities belong to, the relations between them, or a set of numbers summarizing the document's subject. The choice of representation fixes what the system can notice. If the representation records only words, no matching rule can recover the fact that two different words mean the same thing, because that fact was never stored.
Concept-based representation
The most direct way to put meaning into the representation is to replace words with concepts. Instead of indexing a clinical note by the strings it contains, a system can index it by the medical concepts those strings refer to, drawn from a controlled vocabulary such as SNOMED CT, a standard terminology for clinical terms.[2] A note that says "heart attack" and a note that says "myocardial infarction" then share a representation even though they share no words, because both map to the same concept. This is concept-based representation: the document is described by the ideas it expresses, and matching happens between ideas.
The gain is not only in synonyms. Concepts in a formal terminology are linked to one another by defined relations, so a representation built from them can support reasoning that a word list cannot. A search for one concept can be extended to related concepts through those links, which is how a system can return material the searcher did not literally ask for but would recognize as relevant. Work on clinical search has built exactly this: representations made of concepts rather than terms, weighted by how the concepts depend on one another, and a matching step that uses the structure to infer relevance rather than merely look it up.[5]
Concept-based representation has a cost that word-based representation does not. Someone has to decide which concepts exist, how they relate, and which strings map to them, and that body of decisions has to be maintained. It also has to cover the material being searched. A terminology that lacks a concept cannot represent a document about it, and the document becomes invisible in a way that is harder to notice than a missing word, because nothing in the query or the text signals the gap.
Recognizing and normalizing entities
Before a document can be represented by its concepts, the system has to find the mentions in the text and decide which concept each one refers to. The first step is named entity recognition, the task of locating spans of text that name something of interest, such as a gene, a drug, a disease or a person. The second is normalization, the task of mapping each recognized mention to a single canonical identifier, so that every spelling and variant of a name collapses to one entry. Together they turn free prose into a set of identified things.
Normalization is what makes the two failure modes of string matching tractable. When a mention is resolved to an identifier, the many spellings of one entity stop being separate search targets, and the many entities that share one spelling stop being conflated. The effect is visible in the biomedical literature. In the source's example, a search for the SNP Val158Met by its common name returned 448 articles, a search recognizing its lexical variations (V158M) returned 575, and a search by its unique dbSNP identifier rs4680 returned 672.[3] Each step adds articles that were always relevant and always present, and that only the representation could reach.
Recognition and normalization are also where a semantic system inherits its errors. A mention that is missed is a concept the document does not carry; a mention resolved to the wrong identifier is a false statement about what the document says. Because the representation is built once and then used for every query, these errors propagate silently into every search that touches the document. The quality of the annotation is therefore not a detail of implementation but a property of the index itself.
The space between query and document
Once both sides are represented, matching becomes a comparison in a shared space. The query is converted into the same kind of representation as the documents, and each document is scored by how close its representation lies to the query's. What "close" means depends on the representation: for concept sets it might be the overlap of concepts weighted by their importance, for structured knowledge it might be the presence of relations the query assumed, and for numeric representations it is a distance or similarity between vectors, a case taken up in the next section.
The important property of this arrangement is that the query and the documents never meet as text. They meet as representations, and the comparison is defined on those. That is what allows a query phrased one way to reach a document phrased another, and it is also what makes the system's behavior explicable: when a result looks wrong, the question becomes which representation was built and how the two were scored, rather than which characters happened to coincide. The design of that shared space, and the choice of what to put in it, is where most of the difficulty of semantic search actually lives.
A semantic engine compares representations, not strings; named entity recognition and normalization build those representations, and the shared space they define determines what can be matched at all.
Vectors, embeddings and dense retrieval
Concept-based representation replaces words with named ideas, but it depends on someone having enumerated those ideas in advance. A different route to meaning needs no vocabulary at all. It represents a query or a document as a list of numbers, a point in a many-dimensional space, and lets the geometry of that space carry the meaning. An embedding is such a representation: a fixed-length vector of numbers assigned to a word, a sentence or a whole document, constructed so that items with similar meanings land near one another and items with different meanings land far apart. Distance in the space stands in for similarity of meaning, and a search becomes a matter of finding the points closest to the query's point.

The idea that this geometry is not arbitrary has been tested against human judgment. Word embeddings are built from statistics of which words appear near which other words in large bodies of text, and those co-occurrence counts turn out to be consistent with an underlying semantic space in which similarity behaves like distance. The same work treats learning an embedding as recovering that space from the co-occurrence data, which ties the practical algorithms to older methods for finding low-dimensional structure in data.[7] The upshot for search is direct: if meaning is a position, then two passages that never share a word can still sit close together, and a comparison of positions will find them.
Matching in the vector space
Dense retrieval is search conducted this way. Queries and documents are each encoded into dense vectors, as opposed to the sparse vectors used in sparse retrieval. Relevance is scored by a simple operation on the two vectors, typically their inner product, and the documents with the highest scores are returned.[8] Because the comparison happens between vectors rather than between term lists, the system can match a query to a document on the strength of their overall meaning, and the representation is learned from data rather than written by hand.
The machinery that makes this work at scale rests on pretrained language models, which supply the encoding capacity, and on a dual encoder: an architecture in which the query and the document are each passed through an encoder separately, producing two vectors that are then compared.[8] The separation is the point. Because the document encoder never sees the query, every document's vector can be computed once, ahead of time, and stored. At search time only the query needs encoding, and the comparison is a fast lookup among stored vectors.
The cost of a fixed-length summary
Compressing a document into one vector buys that speed at a price, and the price is capacity. A fixed-length encoding has a limited number of dimensions in which to record what a document says, and the longer the document, the more it has to say. Theoretical and empirical analysis of dual encoders connects the encoding dimension, the margin between a relevant document and its lower-ranked competitors, and the length of the documents being retrieved, and the connection points to a limit on how precisely a fixed-length vector can represent a long document.[9] Two long documents on related subjects can crowd each other in the space, and the vector may not carry enough detail to separate them.
The practical response has been to stop relying on one kind of representation. Sparse retrieval is a classical word-matching approach, and sparse-dense hybrids capitalize on the precision of sparse retrieval.[9] Dense retrieval is better at reaching documents phrased differently. Building on these insights, a simple neural model combines the efficiency of dual encoders with some of the expressiveness of more costly attentional architectures, and sparse-dense hybrids capitalize on the precision of sparse retrieval; these models outperform strong alternatives in large-scale retrieval.[9] The finding is a useful corrective to the idea that dense methods simply supersede the older ones: each captures something the other loses, and the combination keeps both.
What the vector approach adds to semantic search is generality. It needs no curated list of concepts, no mapping from strings to identifiers, and no one to decide in advance which distinctions matter. What it gives up is the explicit structure that made concept-based representations inspectable: a vector's dimensions do not correspond to named ideas, so when a result looks wrong, the reason is not read off the representation but investigated. The next section turns to the structured alternative, in which meaning is carried by named concepts and the relations between them, and where a system can reason over what it stores rather than only measure distance in it.
An embedding turns meaning into position; dense retrieval compares positions, which is fast and general but compresses each document into a fixed-length summary that long documents can strain against.
Ontologies, identifiers and structured knowledge
A vector space carries meaning implicitly, as position. A different strategy carries it explicitly, by naming concepts and recording how they relate. An ontology is a formal, machine-readable description of a set of concepts and the relations among them, written so that a computer can reason over the structure rather than merely store it. In an ontology of medicine, for example, a heart attack is not just a phrase that happens to co-occur with other phrases; it is a concept placed beneath broader concepts, linked to the anatomy involved, and connected to the drugs used to treat it. A search system that holds such a structure can use those links when it decides what is relevant.

The first thing an ontology supplies is a shared vocabulary. A clinical record may describe the same condition in a dozen ways, and a formal terminology such as SNOMED CT gives each of those ways a single concept to map onto, so that the note written as "heart attack" and the note written as "myocardial infarction" become the same thing to the machine.[2] The second thing it supplies is a set of relations, and this is where structured knowledge goes beyond a synonym list. Because concepts are linked, a query about one concept can be extended along those links to concepts the searcher never typed, and the system can return material that is relevant through the structure even though it shares no words with the request.
Identifiers as anchors
Alongside ontologies sit unique identifiers: codes issued by a database so that a specific entity can be named without ambiguity. Where a name is a string that many things may share, an identifier belongs to exactly one thing. A gene has an Entrez Gene identifier, a chemical has a registry number, a genetic variant has a dbSNP identifier, and a search phrased in those codes sidesteps the ambiguity of names entirely.[3]
The gain is concrete. A researcher looking for literature on the schizophrenia-associated variant Val158Met on the gene COMT, searching by name, gets 448 hits in PubMed; a search for the lexical variant V158M returns 575 articles in GeneView; a search using the variant's dbSNP identifier, rs4680, returns 672.[3] The identifier reaches descriptions that share no characters with the name, and it does so without dragging in the other genes that happen to use the same label. For comparison, dbSNP itself lists references to only 165 PubMed articles for that variant, so the identifier is a key into the literature, not a substitute for searching it.[3]
Inference over relations
The deeper payoff of structured knowledge is inference: deriving a conclusion that was not stored explicitly but follows from what was. A system that knows a drug treats a disease, and that a patient was prescribed the drug, can infer something about the patient that no single record states. In search, inference means a query can be answered with documents that never mention the query's terms, because the connection runs through the relations rather than through the words.
Clinical search has been built on exactly this idea. Representations made of concepts rather than terms, weighted by how the concepts depend on one another, and a matching step that uses the structure to infer relevance rather than look it up, were developed and tested against real clinical queries and records. The inferential matching proved most useful on the hard queries, the ones a term-based system handled poorly, which is where a gain from meaning ought to appear if the structure is doing real work.[5] The same body of work noted that a system of this kind returned many documents that term-based systems had never retrieved, and so had never been judged for relevance, a point about measurement taken up later.
The relations can also be used to widen a search in a controlled way. In a study of liver disease conducted over clinical records, adding the eight drugs used to treat the condition to the query helped the system find more patients than a search confined to the disease itself.[2] The drugs were not synonyms for the disease; they were connected to it through what they are for, and the ontology made that connection searchable.
What structure buys and what it demands
Structured knowledge gives a search system three things a flat representation cannot: a way to name an entity unambiguously, a way to move from a concept to related concepts, and a way to explain a result, since the path from query to document runs through named relations that can be inspected. A result that looks wrong can be traced to a specific link or a specific mapping, rather than to an opaque distance in a vector space.
The demands are equally real. An ontology has to be built and maintained, and it has to cover the material being searched: a concept the terminology lacks cannot represent a document about it, and the document becomes invisible in a way that is harder to notice than a missing word. Mapping free text onto concepts is itself error-prone, and a mention resolved to the wrong concept is a false statement about what the document says, propagated into every search that touches it. The structure also has to be extended for new uses, since a general terminology will not anticipate every question a particular study needs to ask.[2] These costs are the price of making meaning explicit, and they are why structured and vector-based approaches are often combined rather than chosen between.
An ontology names concepts and records their relations; identifiers pin entities to unique codes; together they let a search move from a query to related material by following structure rather than spelling.
Ranking, re-ranking and multi-stage pipelines
A search system that compares a query against every document in a large collection has a budget problem. The comparison itself may be cheap, but doing it millions of times, and doing it well, is not. The finer the comparison, the more it costs per pair, and the more pairs there are, the less of it can be afforded. Search engines resolve this by splitting the work into stages. A multi-stage pipeline is a search design in which a fast first pass, the retriever, narrows a large collection to a short list of candidates, and one or more slower stages, the re-rankers, then order that short list more carefully. Each stage is allowed to be more expensive than the one before it because each sees far less material.
The reason the split works is that the two jobs have different shapes. The retriever must touch everything, so it needs a comparison that can be precomputed or run in bulk; a dual encoder, which encodes each document once and compares vectors, fits this role because the document side of the work is done ahead of time. The re-ranker sees only the candidates the retriever kept, so it can afford to read the query and the document together and model how their words interact, which the dual encoder deliberately does not do. That finer interaction is where the re-ranker earns its cost, and it is also why the retriever's mistakes are hard to undo: a document the first pass never returns cannot be re-ranked into the answer.
Retrieval and ranking as a contest
The division of labour suggests a further idea. If the retriever's job is to supply candidates and the re-ranker's job is to judge them, the retriever could be trained to supply candidates that are genuinely hard to judge, rather than easy ones. That is the logic of an adversarial retriever-ranker, a design in which a dual-encoder retriever and a cross-encoder ranker are optimized together against a minimax objective: the retriever learns to retrieve negative documents that can cheat the ranker, while the ranker learns to rank a pool containing both the correct document and the retrieved ones, and passes progressive feedback back to the retriever.[4] The retriever is pushed toward harder negatives, and the ranker is pushed to separate them from the right answer.
The reported effect is consistent improvement over existing dense retriever methods on three benchmarks, with new state-of-the-art results on all of them, including a rise in recall at five on Natural Questions to 77.9 percent and on TriviaQA to 78.2 percent, and an MRR at ten of 39.5 percent on MS-MARCO.[4] The numbers matter less than the mechanism they illustrate: the quality of a re-ranker depends on what the retriever hands it, and training the two against each other improves both. A pipeline is not a fixed sequence of independent parts but a system whose stages can be tuned to one another.
Adding stages that do more than score
The stages need not all be rankers in the narrow sense. A later stage can ask a different question about each candidate, and the answer to that question becomes part of the ordering. CO-Search, a search engine built for the COVID-19 literature, pairs a hybrid retriever with a re-ranker that scores each document from two modules: a question-answering module that gauges how much the document actually answers the query, and an abstractive summarization module that determines how well the query matches a summary generated from the document.[10] Neither module is a similarity measure in the vector sense. One tests whether an answer is present, the other whether a condensed version of the document is on topic, and both are slower and more informative than a dot product.
The first stage of that system is itself a hybrid. Its retriever combines a deep learning model, Siamese-BERT, that encodes query-level meaning with two keyword-based models, BM25 and TF-IDF, that emphasize the most important words of the query, and returns the thousand most relevant documents for the re-ranker to order.[10] The arrangement is a deliberate hedge. The keyword models are precise when the query's words appear in a document and blind when they do not; the dense model reaches documents phrased differently and is less exact about the words that matter. Running both and fusing their results keeps the strengths of each, and the re-ranker then applies the expensive judgment only to the thousand candidates that survived.
Why hybrids persist
The same pattern appears wherever the first stage has to cope with long or specialized documents. In legal case retrieval, where the query case and the case descriptions tend to be long documents that exceed the input length of a model like BERT, one approach combined lexical and dense retrieval methods at the paragraph level of the cases for the first stage, and found that paragraph-level retrieval outperformed retrieval at the document level, with dense methods outperforming lexical ones. For re-ranking, the same work addressed the length problem by summarizing the cases and fine-tuning a BERT-based re-ranker on the summaries, and its best results came from combining BM25 with dense passage retrieval using domain-specific embeddings.[11] Three lessons sit in that one pipeline: splitting long documents into passages makes both retrieval and re-ranking tractable, summarizing before re-ranking fits a long document into a model's input, and the combination of lexical and dense signals beat either alone.
What the staged design buys, then, is not a single better comparison but the ability to apply several different comparisons in the right order, cheap ones first and expensive ones last. What it costs is dependence: the final ranking can only be as good as the candidate list it was given, and a relevant document that the first pass missed is lost no matter how good the re-ranker is. The later evidence on whether semantic search retrieves better has to be read with that structure in mind, since a gain measured at the end of a pipeline is a gain produced by the whole arrangement rather than by any one stage.
A retriever casts a wide, cheap net; re-rankers and question-answering or summarization modules judge the few candidates it catches, and the pipeline is only as good as the first pass that decides what gets judged.
Uses
Searching clinical notes for care and recruitment
Much of what a hospital knows about a patient is written in prose. Alongside the structured fields of an electronic health record, the coded diagnoses and laboratory values stored in database tables, sit nursing records, radiology reports and discharge summaries, and these notes carry a richness and depth that the structured fields do not.[2] The trouble is that prose is hard to search. A question such as which patients have a particular condition, or which might qualify for a clinical trial, is easy to state and slow to answer when the answer depends on reading free text. SemEHR, a semantic search and analytics system for health records, was built to turn that reading into a query.[2]

From notes to concepts
The system begins by finding mentions of biomedical concepts in the text and recording not just the mention but its context. A contextualized mention is an occurrence of a concept together with the circumstances that change what it means: whether it is negated, when it occurred, and who it applies to. A note that records a family history of a disease, a note that rules a disease out, and a note that diagnoses it all contain the same words, and a search that ignores context will treat them alike. SemEHR identifies mentions against large standard terminologies, including SNOMED CT, ICD-10, LOINC and the Drug Ontology, and captures negation, temporality and experiencer for each one.[2]
The records themselves arrive in heterogeneous formats and data models, so a harmonizing and cleansing step runs ahead of the extraction, and the system is designed to be extended when a study needs concepts the general terminology does not cover, collecting user feedback and using rule-based and machine learning methods to handle study-specific requirements. The extracted annotations are then assembled at the level of the patient rather than the document, producing a longitudinal timeline of that patient's care and a structured medical profile.[2] This patient-level assembly is what makes the record searchable as a history rather than as a pile of separate files, and the timeline and profiles are what the ontology-based search interface queries.
What the queries returned
The system was deployed at a number of UK hospitals, among them the Clinical Record Interactive Search, an anonymized replica of the record system of the South London and Maudsley National Health Service Foundation Trust, described in the work as one of Europe's largest providers of mental health services.[2] Two studies conducted on that resource measured how well the system identified patients who truly had a condition. SemEHR reached an F-measure, a single score combining precision and recall, of 93 percent for hepatitis C and 99 percent for HIV.[2] Those figures are the system's performance at identifying true positive patients in those two studies, not a general accuracy for all conditions, and they say nothing about how it would fare on a disease whose vocabulary is less distinctive.
Recruitment showed the practical effect more directly. At King's College Hospital in London, as part of the CogStack program, the system was used to recruit patients into the UK Department of Health's 100 000 Genomes Project, and the validation study indicated that it could validate previously recruited cases and search phenotypes very quickly, reducing the time needed to check recruitment criteria from days to minutes. The same speed shows up in the CRIS-based liver disease study, where the inclusion of 8 drugs used for treating liver disease helped to find more patients.[2]
Why the structure matters
The value of assembling mentions into a patient timeline is that many clinical questions are temporal. Whether a medication was prescribed at admission and then removed by discharge is a fact about the order of events, not about any single sentence, and a system that reads only document by document cannot see it. SemEHR's designers treat the integration of document-level results at the patient level, incorporating which reports came from which visits, as the step without which the extraction task is not complete. The same patient-level view can also expose problems with the records themselves: a longitudinal view of a patient's documents gives a quick sense of how abundant or detailed that record is, which helps identify patients whose records are too incomplete to support a study.[2]
The system was also validated on open intensive care data, the Medical Information Mart for Intensive Care III, where the vital signs it extracted from observation notes reached around 97 percent accuracy.[2] That result concerns a different task from patient identification, pulling structured measurements out of narrative, and it shows the same extraction machinery serving both. Across the case studies, the authors report that work which would take weeks or months can be done within hours or minutes in some cases, and that the system gives a more comprehensive view of patients than information extraction systems built for a single study, bringing in more and unexpected insight.[2] That last claim is the authors' characterization of their own case studies rather than a controlled comparison, and it should be read as such.
What the clinical case illustrates is the shape a semantic search system takes when the collection is a set of patient histories rather than a web of pages. The unit of retrieval is the patient, the representation is a set of contextualized concepts arranged along a timeline, and the query is phrased against an ontology rather than against words. The same architecture, applied to a different collection, is what the next section takes up.
In clinical records, semantic search means finding concepts in free text, keeping their negation and timing, assembling them into a patient timeline, and querying that structure; the reported gains are large but belong to the specific studies that measured them.
Searching the scientific literature
Scientific publishing produces more text than any person can read, and the problem is not only volume. The names of the things being written about are short, reused and ambiguous, so a search over the literature runs straight into the two failures described earlier. A system that can recognize the entities in a paper, and match a query against those entities rather than against the paper's words, has a way around them. GeneView was built on that premise: a search engine over a comprehensively annotated version of PubMed abstracts and the openly available full texts of PubMed Central, in which mentions of ten classes of biomedical entity, among them genes, chemicals and single nucleotide polymorphisms, have been marked up in advance by a battery of text-mining tools.[3]
Annotating the corpus
The annotation is what turns the literature into something a query can be aimed at. GeneView's tools recognize mentions from ten entity classes and identify protein-protein interactions, and the resulting repository holds annotations for more than 194 million entities drawn from roughly 21 million citations and 271,000 full-text bodies. Because each recognized mention is normalized to a unique identifier, a searcher can phrase a query in database codes rather than in names: Entrez Gene for a gene, dbSNP for a variant, ChemIDPlus for a chemical, DrugBank or PharmGKB for a drug.[3] The identifier sidesteps the ambiguity of the name entirely, since it belongs to exactly one entity.
The full texts earn their place in that corpus. More than 21,400 of about 172,000 articles contain a variant mentioned only in the full text and not in the abstract, and the total count of distinct variants drops from 914,543 to 523,398, a fall of 57.2 percent, if full-text mentions are ignored.[3] A search restricted to abstracts is therefore not a smaller version of a search over the whole literature; it is missing a substantial share of the entities, and the papers that discuss them only in their body text are invisible to it.
Querying by entity
Once the entities are marked up, the queries a searcher can pose change shape. A request can be restricted to articles mentioning at least one entity of a given class, or ranked by how many such mentions an article contains, or filtered against a personal list of genes the searcher cares about. A search for "schizophrenia" returns more than 63,000 articles; restricting it to articles that mention at least one SNP reduces this to about 1,700, and ranking by the number of SNPs allows a user to find those articles discussing a high number of different SNPs in conjunction with schizophrenia. The same machinery supports section-specific queries, such as finding articles where a figure caption contains a named gene alongside a named experimental method.[3]
Ranking by mentions is a different idea from ranking by textual relevance. It treats the density of identified entities as a signal of what a paper is about, so a paper that names many variants associated with a disease outranks one that mentions the disease often but names few. That suits a reader who wants an overview of what has been studied rather than a single answer, and it is a use of the annotation that a keyword index cannot imitate, because a keyword index has no notion of an entity to count.
Recognizing concepts in abstracts
A second engine, Thalia, takes a narrower and more current approach. It recognizes eight types of concept in biomedical abstracts and is refreshed from PubMed every day, so the index tracks the literature rather than a snapshot of it, and it is reachable through a web interface or a programming interface.[12] The daily update addresses a problem that annotated corpora face generally: an index built once and left alone falls behind the literature it describes, and the lag is invisible to the person searching it.
Thalia's retrieval was evaluated in the setting of a precision medicine dataset, which tests the engine against the kind of question a clinician or researcher actually asks rather than against generic topics.[12] The design choice worth noting is the combination of concept recognition with currency. Recognizing entities gives the system a representation to match on; updating it daily keeps that representation from drifting away from the papers it is meant to describe. Neither property is sufficient alone, since an out-of-date semantic index is as misleading as a current keyword one.
The COVID-19 literature
The pandemic produced a case in which all of these difficulties arrived at once. Throughout 2020, over 400,000 coronavirus-related publications were collected through the COVID-19 Open Research Dataset, and CO-Search was designed to help overburdened health workers find scientific answers and avoid misinformation. CO-Search was built to answer complex queries over that corpus, and its architecture is the staged pipeline described earlier: a hybrid retriever that fuses a deep learning model encoding query-level meaning with two keyword models, BM25 and TF-IDF, returns the thousand most relevant documents, and a re-ranker then orders them using a question-answering module and an abstractive summarization module.[10]
Two details of that system bear on literature search specifically. The first is how it coped with a training set too small for its encoder: the documents were split into pairs of paragraphs and the citations they contain, producing millions of (citation title, paragraph) tuples on which the retriever was trained.[10] The second is how it was judged. CO-Search was evaluated on the data of the TREC-COVID information retrieval challenge, obtaining strong performance across multiple key information retrieval metrics.[10] A shared challenge of that kind supplies queries and relevance judgments that many teams answer against the same collection, which is what makes a claim of top performance on it meaningful rather than self-assessed.
What the three engines show together is that searching the literature is not one task. GeneView serves a reader who wants to navigate a vast annotated corpus by entity and by count; Thalia serves one who wants current abstracts filtered by recognized concepts; CO-Search serves one who poses a complicated question and wants the most answer-like documents first. All three depend on the same underlying move, which is to identify what a paper is about before anyone searches for it, and all three inherit the errors of that identification. Whether the move pays off in measured retrieval quality, and how such quality is to be measured at all, is taken up later.
Annotating a literature corpus with recognized, normalized entities turns a search from a string match into a query over things, and the coverage of that annotation, including the full texts, sets what the search can reach.
Other domains: geography, genomics, law and the Quran
The pattern established in clinical records and the literature repeats wherever a collection is large, specialized and described in words that do not match the words of the people searching it. What changes from domain to domain is the kind of structure that carries the meaning: a spatial taxonomy, a set of ontologies over metadata fields, the paragraph as a unit of retrieval, or a vector space trained on a particular body of text.
Geography
Geospatial data is a hard case because a useful query usually combines a subject with a place, and the place may be named in the metadata in a form the searcher did not use. One system, Semantic Indexing and Ranking, was built to test whether a semantic engine could beat keyword matching at this kind of discovery. It combined latent semantic analysis, a technique that infers associations between words from their patterns of co-occurrence across a corpus, with a two-tier ranking algorithm based on a revised cosine similarity, and it added a mechanism that drew on a geospatial taxonomy together with Yahoo! GeoPlanet to identify location information in a spatial query automatically and to filter out datasets that were not spatially related.[13] The corpus was the metadata set in ISO19115 format from NASA's Socio-Economic Data Application Center.
Tested against that corpus, the semantic engine outperformed existing keyword-matching techniques, such as Lucene, on both recall and precision.[13] Recall is the share of relevant items the system actually returned; precision is the share of returned items that were relevant. Beating keyword matching on both at once is the outcome a semantic approach is supposed to produce, and it is worth noting that the system also surfaced semantic associations among all the words in the corpus, which the authors present as support for automating the population of spatial ontologies.[13] The same machinery that improves retrieval, in other words, produces a by-product that can improve the structure it depends on.
Genomics
Genomic datasets are described by metadata, and the metadata come from many institutions with search interfaces that are heterogeneous, not interoperable, and sometimes very limited in what they allow.[14] GenoSurf was built as a multi-ontology semantic search system over a consolidated collection of metadata attributes drawn from major genomic sources. Values of ten attributes are semantically enriched using the most suitable available ontologies, and the searcher supplies search terms, sets the desired level of ontological enrichment, and receives the identity of matching data files at the various sources.[14]
The interface design reflects a practical problem with semantic search: a searcher may not know which ontology terms exist or how enriched a query should be. GenoSurf offers drop-down lists of matching values, and aggregate counts describing the resulting files update in real time as search terms are progressively added, so the effect of each addition is visible before the query is finished. Attribute-based search can be mixed with keyword search over the original raw metadata, and the system integrates about 40 million metadata records from sources including TCGA, ENCODE, Roadmap Epigenomics, GENCODE and RefSeq.[14] The scale is the point: the value of the ontology lies in making a collection that large navigable by meaning rather than by string.
Law
Legal case retrieval brings back the problem of long documents. The query case and the case descriptions in the corpus tend to be long, and they exceed the input length of a model like BERT, so a system cannot simply feed a whole case into a neural ranker. The approach taken in one competition entry was to work at the paragraph level: lexical and dense retrieval methods were combined over the paragraphs of the cases for the first stage, and paragraph-level retrieval outperformed retrieval at the document level, with dense methods outperforming lexical ones.[11]
For re-ranking, the same work summarized the cases and fine-tuned a BERT-based re-ranker on the summaries, which fits a long document into the model's input by condensing it first. The best results came from combining BM25, a classical keyword-scoring method, with dense passage retrieval using domain-specific embeddings.[11] The legal case is a clean illustration of a general lesson: when documents are long, the unit of retrieval matters as much as the method, and the strongest result came from a hybrid rather than from either family of method alone.
The Quran
Religious text is a domain where concept-based search has obvious appeal, since a reader may want verses on a theme rather than verses containing a particular word. A tool built for the Quran, QSST, annotated verses manually against an ontology of Mushaf Al-Tajweed, trained word vectors with a continuous bag-of-words architecture on a large corpus of Quranic and classical Arabic, and retrieved the most relevant verses by computing cosine similarity between the query vector and topic vectors.[15]
Measured against Mushaf Al-Tajweed, the tool reached precision of 76.91 percent, recall of 72.23 percent and an F-score of 69.28 percent, and three Islamic experts who evaluated the results gave an average precision of 91.95 percent.[15] The gap between the automatic and the expert figures is instructive: the two measure different things, one against a reference annotation and one against human judgment of relevance, and a system can look considerably better or worse depending on which is used. The tool was also compared with existing tools in the same area and outperformed them. What the case shows is that a word-embedding approach can be applied to a specialized corpus, one whose verses were annotated against an ontology and whose word vectors were trained on a large body of Quranic and classical Arabic.[15]
Across these four settings the same trade appears. Where a formal structure exists, as with spatial taxonomies or genomic ontologies, it can be built into the search and made to carry the matching. Where documents are long, the unit of retrieval has to be chosen to fit the model. Where no structure exists, learned vectors supply the meaning instead. Whether these systems retrieve better than keyword search in general, and how that question should be settled, is taken up later.
Research
Does semantic search actually retrieve better?
The question sounds like it should have a single answer, and it does not. Semantic search is a family of methods applied to a family of collections, and a gain measured on one collection with one method says little about another. What the evidence does support is narrower and more useful: under specific conditions, with specific baselines, semantic methods return more of the relevant material than keyword matching does, and the size of the gain depends on how badly the keyword baseline fails on that collection.
Gains against a keyword baseline
The cleanest comparisons are the ones where a semantic system and a keyword system are run over the same corpus and scored the same way. The geospatial engine described earlier was tested in exactly that arrangement, against the ISO19115 metadata records from NASA's Socio-Economic Data Application Center, and outperformed existing keyword-matching techniques such as Lucene on both recall and precision.[13] Beating a keyword engine on one of those measures is common; beating it on both at once means the semantic system was not simply returning more documents and hoping some were relevant, which is the usual way recall rises at precision's expense.
That result belongs to one corpus and one baseline, and it should be read that way. The corpus was metadata rather than prose, the queries combined a subject with a place, and the semantic layer was built from latent semantic analysis over that specific collection. A different collection, where the searcher's words usually match the author's, leaves a semantic layer much less to recover, and the margin over keyword matching narrows accordingly.
Dense and hybrid retrieval
The vector-based methods have their own evidence, and it points in a consistent direction. A simple neural model that combines the efficiency of a dual encoder with some of the expressiveness of the more expensive architectures that read query and document together was shown to outperform strong alternatives in large-scale retrieval, and sparse-dense hybrids built to capitalize on the precision of sparse retrieval did the same.[9] The phrasing matters: the comparison was against strong alternatives, not against a naive keyword engine, so the gain is a gain at the frontier rather than a demonstration that keyword search is obsolete.
The hybrid result carries an implication that runs against a simple story of progress. If combining a sparse method with a dense one beats either alone, then the sparse method is still contributing something the dense one does not capture, and the dense representation is not a strict improvement on term matching. The theoretical analysis behind that finding explains why: a fixed-length encoding has limited capacity to represent a long document, and the longer the document, the more precision is lost.[9] Dense retrieval wins where meaning is phrased differently and loses where exact terms carry the signal, and a system that runs both keeps whichever advantage the query needs.
Concept-based representations and inference
The evidence for structured, concept-based search is different in kind, because the systems are harder to compare against a common baseline. Work on clinical search built representations made of concepts rather than terms, weighted by how the concepts depend on one another, and a matching step that uses the structure to infer relevance rather than look it up, then evaluated all of it against real clinical queries and a real collection of clinical records from the TREC Medical Records Track. The concept-based representation improved retrieval effectiveness over the term-based alternative, and combining concepts with the weighting scheme produced further improvement.[5]
The more interesting finding concerns where the gain landed. The inferential matching was most useful on the hard queries, the ones that performed poorly on a term-based system.[5] That is the pattern a semantic method ought to produce if it is doing what it claims: on queries where the words happen to line up, meaning adds little, and on queries where they do not, meaning is the only thing that can close the gap. A gain averaged over all queries would understate this, because the easy queries dilute it.
The measurement problem that undercuts the comparison
There is a caveat that applies to every figure above, and it is not a small one. Test collections are built by pooling: the documents returned by the systems being compared are gathered, human assessors judge which are relevant, and the judgments become the ground truth against which later systems are scored. A document that no participating system returned is never judged, and under the usual convention it counts as not relevant. A semantic system that retrieves genuinely relevant documents outside the pool is therefore penalized for finding things nobody looked at.
This is not hypothetical. The clinical search work found that its inference mechanism returned many documents that term-based systems had never retrieved, and which had therefore never been evaluated for relevance as part of the TREC MedTrack collection. Judging semantic systems against collections where semantic systems did not contribute to the pool may underestimate their effectiveness, and the same work argues that new evaluation techniques are needed as a result.[5] The direction of the bias is systematic rather than random: it falls hardest on exactly the systems that reach material keyword methods miss, which is the property semantic search exists to provide.
The consequence for reading the evidence is that the reported gains are probably floors rather than ceilings, at least where the baseline was a keyword system and the collection was pooled from keyword runs. That does not license the assumption that semantic search always wins. It means the comparisons that exist are tilted against the thing being tested, and a null result on a pooled collection is weaker evidence than it looks.
What the evidence supports
Put together, the results support a conditional claim. Semantic methods retrieve better than keyword matching when the collection is one where vocabulary mismatch is common, as in metadata with spatial queries or clinical records with hard queries, and the advantage is largest on precisely the queries where term matching fails.[5][13] Dense and hybrid methods improve on strong retrieval baselines at scale, with the hybrid keeping the precision that dense encoding loses on long documents.[9] What the evidence does not support is a general ranking of methods independent of collection, query type and baseline, and the pooling problem means even the measured gains are likely conservative.[5]
The question of how to measure these systems properly, and what the standard metrics actually capture, is taken up later, as are the costs and failure modes that come with the gains.
Semantic search tends to retrieve better where vocabulary mismatch is common and on the hard queries specifically; the measured gains are real but conditional, and pooled test collections bias them downward.
Evaluation and the moving target of relevance
A search system's quality is not visible from the outside. Two engines can return lists that look equally plausible, and only a comparison against some independent account of what should have been returned can separate them. That account is built from relevance judgments: a person reads a document in the light of a query and records whether it answers it. Once a collection carries such judgments, the standard measures apply. Recall is the share of the relevant documents in the collection that the system actually returned. Precision is the share of what it returned that was relevant. F-measure folds the two into a single number, which is why a clinical system's performance is often quoted that way: SemEHR reached an F-measure of 93 percent for hepatitis C and 99 percent for HIV when identifying patients who truly had the condition.[2] Neither figure stands alone as a verdict on the system, since each belongs to one condition in one record collection.
Ranking needs a measure that cares about order, not just membership. Normalized discounted cumulative gain, or nDCG, credits a system for placing relevant documents near the top of its list and discounts those found further down, then normalizes the result so that a perfect ordering scores one. CO-Search was scored on nDCG along with precision, mean average precision and binary preference when it was evaluated on the data of the TREC-COVID challenge, and it obtained top performance on the datasets of the first and second rounds across those metrics.[16] A shared challenge of that kind is what makes the claim meaningful: many teams answer the same queries against the same collection, and the judgments are made once for all of them.
The pool problem
The difficulty is where those judgments come from. Building a test collection by judging every document against every query is impossible at scale, so the usual method is pooling: the documents returned by the systems under comparison are gathered, the overlap is judged, and documents nobody returned are treated as not relevant. The shortcut is harmless when the systems being compared return roughly the same documents. It fails when one of them reaches material the others never found.
That is precisely what a semantic system does. The clinical search work found that its inference mechanism returned many documents that term-based systems had never retrieved, and which had therefore never been assessed for relevance as part of the TREC MedTrack collection. Judged against that collection, the system was penalized for finding relevant documents nobody had looked at, and the authors argue that evaluating semantic systems against pools they did not help build may underestimate their effectiveness, and that new evaluation techniques are needed.[5] The bias runs in one direction: it falls hardest on the systems that reach what keyword methods miss.
Relevance is not fixed
Underneath the measurement problem sits a conceptual one. Relevance is a relation between a query, a document and a person with a purpose, and the same document can be relevant to one searcher and useless to another. A clinician checking whether a patient qualifies for a trial and a researcher counting cases of a disease may pose the same words and want different things. A judgment recorded once fixes one reading of the query, and a system optimized against it is optimized for that reading. This is why the measures above are best treated as comparisons between systems on a stated task rather than as properties of an engine.
Languages and scarce data
The judgments themselves are expensive, and they exist mostly for English and for a handful of well-studied collections. A team building search for a language or a specialty with no judged data faces the question of what can be transferred. Work organized as a guide for training multilingual dense retrieval models separates three situations: a multilingual model is available but relevance judgments in the language and domain of interest are not; both model and data are available; and data are available but no suitable model is. The guide examines the role of multi-stage fine-tuning, the strength of cross-lingual transfer under various conditions, the usefulness of out-of-language data, and the relative merits of multilingual and monolingual transformers, with the aim of helping practitioners build search for low-resource languages.[17] The practical upshot is that evaluation and training draw on the same scarce resource, and a domain rich in documents but poor in judgments can have a working system long before it can be measured well.
Recall, precision, F-measure and nDCG compare systems against human judgments; when those judgments were pooled from keyword systems, a semantic engine is scored on a collection that never contained what it found.
Risks and limits
Costs, errors and limits
A semantic search system is a chain of inferences, and every link can fail. The text has to be read correctly, the mentions in it resolved to the right concepts, the concepts placed in a structure that covers them, and the query interpreted in the same terms. A keyword engine has one failure mode, that the words do not match; a semantic engine has several, and they can compound. Knowing where they arise is what makes a result set readable rather than mysterious.
Noise in what comes back
The first limit is that retrieval brings back material that is irrelevant or of poor quality, and adding more machinery does not remove it. A review of retrieval-augmented systems in healthcare, covering 30 peer-reviewed studies, names retrieval noise, meaning irrelevant or low-quality retrieved information, as one of the persistent challenges in the field.[18] The phrase describes the same experience a searcher has with any semantic engine: the system returns documents that are close in meaning without being useful, and the closeness that let it reach the right document also lets it reach the wrong ones. A representation that blurs distinctions to gain recall will blur them everywhere.
Domain shift is the second named challenge in that review: performance degrades when a model is applied to data whose distribution differs from what it was trained on.[18] A system tuned on one hospital's notes, one journal's vocabulary or one language carries assumptions that may not hold in the next collection, and the degradation is quiet, since the system keeps returning results with the same confidence. The clinical case makes the point concretely. SemEHR's reported F-measure of 93 percent for hepatitis C and 99 percent for HIV belongs to those two conditions in one record collection, and says nothing about a condition whose vocabulary is less distinctive.[2] A number measured on one task is not a property of the engine.
The structure is never complete
Ontologies and annotations are built by people, and they are always partial. The same holds for the annotation itself: a mention the extractor missed is a concept the document does not carry, and a mention resolved to the wrong identifier is a false statement about what the document says. Because the representation is built once and used for every query, these errors propagate silently into every search that touches the document.
Coverage is also uneven across the material. In the annotated literature corpus, more than 21,400 of about 172,000 articles contain SNPs mentioned only in the full text and not in the abstract, and the overall number of SNP mentions falls by 57.2 percent if full-text mentions are ignored.[3] A search over abstracts alone is not a smaller version of a search over the whole literature; it is missing a substantial share of the entities, and the papers discussing them only in their body text are unreachable. The general lesson is that the reach of a semantic index is set by what was annotated, not by what exists.
Records that are wrong to begin with
There is a further problem underneath all of this: the source records may themselves be incomplete, inconsistent or inaccurate, and a semantic layer over them inherits every flaw. SemEHR's designers note that the patient-level views their system presents can reveal data quality issues to researchers or clinicians, so that action can be taken before conclusions are drawn, and give the example of a longitudinal document view that shows at a glance how abundant or detailed a patient's record is, helping identify patients with incomplete records who might need to be removed from a study. Making users aware of such issues is only a first step; the authors state that data incompleteness, inconsistency and inaccuracy need to be addressed systematically, and that some of these challenges require attention at the level of the institution rather than the study.[2] A search system can surface a bad record, but it cannot make the record good.
Speed and explanation
Two further costs are practical rather than conceptual. Generation and retrieval latency is among the persistent challenges identified in the healthcare review, meaning the delay before a result arrives.[18] The staged pipeline described earlier buys quality by spending time, and each added stage that reads a query and a document together costs more than the fast first pass it follows. The other cost is explainability, the ability to say why a particular document was returned. The same review lists limited explainability as a persistent challenge, and the reason is structural: a vector representation compresses a document into numbers whose dimensions do not correspond to named ideas, so when a result looks wrong there is no link to inspect.[18] A concept-based system can trace a result through named relations, but only as far as its ontology and annotation are correct, which returns the problem to the gaps described above.
None of these limits makes semantic search useless; they set the terms on which its results should be read. A returned document is a candidate whose relevance still has to be judged, and a reported accuracy belongs to the task and collection that produced it.
Every stage of a semantic engine can fail quietly: noisy retrievals, models applied outside their training distribution, incomplete ontologies and annotations, flawed source records, latency, and results that cannot be explained.
Later developments
Semantic search inside retrieval-augmented generation
A language model asked a factual question answers from what it absorbed during training. That knowledge is frozen at the moment training ended, it is unevenly detailed, and the model has no way to show where any particular claim came from. A model can therefore state something false with the same fluency it brings to something true, and it cannot know about a paper published last month. Retrieval-augmented generation, or RAG, addresses this by putting a search step in front of the generation step: before the model writes an answer, a retriever fetches relevant material from an external store, and that material is supplied to the model as context to work from.[19] The model's own knowledge is combined with a repository it can be pointed at, which lets the answers reflect documents the model never saw in training and gives a reader something to check.
The retrieval half of that arrangement is where semantic search enters, and it enters for the same reason it enters any search problem. The person asking a question phrases it in their own words, and the passage that answers it is phrased in the author's. A retriever that matches strings will miss the passage, and the model will then answer without it, which is worse than returning nothing, because the answer still sounds confident. A retriever that compares meaning can reach the passage, and the quality of everything downstream is bounded by whether it did. A survey of the RAG literature describes the paradigm as having moved through three broad forms, which it calls naive, advanced and modular, distinguished by how much work goes into the retrieval and how the retrieved material is folded into generation.[19] The progression is a way of organizing a fast-growing body of work rather than a sequence of dated releases, and it makes the point that most of the engineering in a RAG system sits on the retrieval side.
When the retrieved material has structure
Ordinary retrieval hands the model a ranked list of passages. That works when the answer sits inside one passage, and it struggles when answering requires joining facts that live in different places, because a flat list gives the model no account of how those facts connect. A knowledge graph supplies exactly that account: a store of entities and the labelled relations between them, so that a fact is recorded as a link rather than as a sentence that happens to mention two things. The graph variant of the paradigm, usually called GraphRAG, uses the structure at all three stages, indexing the material as a graph, guiding retrieval along its relations, and feeding the connected material into generation.[20] Retrieval then becomes a walk over relations rather than a similarity comparison alone, and the model receives not just passages but the paths that tie them together.
The reported gains from one such system give a sense of what the structure buys. KG-RAG adds a second retrieval channel to a conventional RAG pipeline: dense passage retrieval handles unstructured text as usual, while a graph neural network, a model that propagates information along the edges of a graph, retrieves semantic paths through a knowledge graph, and a path attention mechanism filters those paths down to the most relevant chains of entities and relations before they are injected into the generation step. On the Natural Questions dataset the system's ROUGE-L score rose from 41.2 to 46.9 and its BLEU score from 31.5 to 38.7 against the original RAG model, while a measure of factual consistency called FactScore improved by 13.6 percent. On PubMedQA, a medical question-answering task, it reached an accuracy of 81.3 percent, an improvement of 6.8 points over RAG.[21] Those figures belong to those two datasets and that comparison; they show that adding relational structure to retrieval improved the generated answers on the tasks measured, not that a graph is always the better store.
The reason it helped is worth separating from the numbers. A dense retriever returns passages that are close in meaning to the question, and closeness is a blunt instrument when the question requires a chain of facts. The graph channel returns the chain itself, already assembled, so the model does not have to infer the connection from passages that each mention only part of it. That is the same division of labour seen in the staged pipelines described earlier, where a cheap first pass casts wide and a more expensive stage judges what it caught, except that here the second channel is organized by relations rather than by finer reading of the text.
What the arrangement inherits
A RAG system does not escape the limits of its retriever; it concentrates them. If the search step returns irrelevant or low-quality material, the model works from it, and the failure is harder to see than an empty result because the output remains fluent. The same difficulties that attach to semantic search generally therefore attach to the generation it feeds, and the question of how to measure the whole arrangement, rather than its search half, remains open.
What RAG changes about semantic search is its position in the chain. In a classical engine, retrieval is the product: a person reads the ranked list and decides. In a RAG system, retrieval is an input to something that writes, and the reader sees the answer rather than the list. That makes the retriever's accuracy matter more, not less, since an error is no longer visible as a missing document but is absorbed into prose that reads as though it were sourced. It also gives semantic search a new reason to care about structure, since a model can use relations that a human reader would have had to reconstruct. Where the approach is heading, including the open problems of multimodal and exploratory interfaces and of extending coverage to concepts a system has never seen, is covered later.
RAG puts a semantic retriever in front of a language model so the answer can rest on documents rather than on training memory; the retriever's reach sets the ceiling, and a knowledge graph adds the relational paths a flat list of passages cannot supply.
Where the field is heading
The problems that remain open are not the ones a better model alone will settle. They are problems of interface, of coverage and of combination, and each follows from something the earlier sections established about how semantic search works.
Interfaces that fit how people search
A search system is used, not just evaluated, and the way a person interacts with it shapes what it can return. A review of semantic search tools argues that supporting iterative and exploratory search modes matters for the usability of all search systems, and it reviews four modes of user interaction in existing semantic search systems: keyword-based, form-based, view-based and natural language-based.[22] Each mode suits a different kind of question. A form with labelled fields is good for a precise request whose parts the searcher already knows; a natural language box is good for a request the searcher cannot decompose; a view-based interface lets someone recognize what they want by seeing it rather than by describing it.
The same review identifies the types of semantic query users actually need to make, the issues that arise from the search environment, and the problems intrinsic to semantic search in particular, then points future development toward multimodal systems that exploit the advantages of more than one mode of interaction at once, and toward engines able to search heterogeneous semantic metadata across the open semantic web.[22] The recommendation is a recognition that no single mode carries every query. A searcher who does not know which concepts an ontology contains cannot fill in a form that asks for them, and a searcher with a precise structured request is poorly served by a free-text box that forces the structure back out of prose.
Heterogeneous metadata is the harder half of that goal. The open web does not share one vocabulary, so the same fact is described under different terms by different publishers, and a system that reasons over meaning has to reconcile them before it can search across them. Source considers ontology matching and merging among the advanced issues in semantic search.[1]
Combining what each method does well
The evidence on sparse and dense retrieval points away from a winner and toward a blend. A fixed-length encoding has limited capacity to represent a long document, and the longer the document, the more precision the encoding loses, which is why a simple neural model blending the efficiency of a dual encoder with some of the expressiveness of costlier architectures, and sparse-dense hybrids built to keep the precision of sparse retrieval, outperformed strong alternatives in large-scale retrieval. The source proposes sparse-dense hybrids to capitalize on the precision of sparse retrieval, and these models outperform strong alternatives in large-scale retrieval.[9]
Dense retrieval itself is an active area rather than a settled one. A survey of pretrained-language-model-based dense retrieval organizes the field by architecture, training, indexing and integration, and collects more than 300 reference papers across those four aspects.[8] The breadth is the point: the choices that determine whether a dense system works well are spread across how the encoder is built, how it is trained, how its vectors are indexed for fast search, and how it is wired into a larger pipeline, and progress in one does not automatically carry to the others.
Reaching concepts nobody anticipated
A general-purpose extraction system cannot enumerate in advance every concept its users will need. SemEHR's designers treat this as a design requirement rather than an afterthought: to serve different uses well, the terminology has to be extendable to cover unseen concepts, to handle the language of a particular subcorpus, to support use-case-specific extraction, and to allow performance to be tuned with domain knowledge or a researcher's expertise. Their answer is a study-based learning engine that collects user feedback and applies rule-based and machine learning techniques to study-specific difficulties on a continuing basis.[2]
That arrangement makes the person searching part of the system. A concept the terminology lacks is noticed when a user's query fails to find what the user knows is there, and the feedback closes the gap for later queries. SemEHR provides a study-based learning engine that collects user feedback and uses rule-based and machine learning techniques to tackle study-specific challenges and requirements in a continuous manner.[2] Extending a system to concepts it has never seen, without a person to point at what is missing, remains the open question that the feedback loop only partly answers.
The remaining work is less about better matching than about better fit: interfaces that let people search the way their question is shaped, combinations that keep what each retrieval method does well, and systems that can grow to cover concepts nobody listed in advance.
Key studies
| Year | Study | Sample | Design | Finding |
|---|---|---|---|---|
| 2012 | Thomas et al.[3] | annotated search engine | A search for the identifier rs4680 returned 672 articles, against 448 hits for a direct name search in PubMed. | |
| 2014 | Li et al.[13] | NASA SEDAC metadata in ISO19115 format | search engine comparison | The SIR engine outperformed keyword matching such as Lucene in both recall and precision. |
| 2014 | Koopman[5] | clinical queries and the TREC Medical Records Track collection | three semantic search models, the Bag-of-concepts model, the Graph-based Concept Weighting model and the Graph Inference model, all tested on clinical queries against a real-world set of clinical records from the TREC Medical Records Track | Concept-based representations improved retrieval effectiveness, and the inference model was suited to hard queries that perform poorly on a term-based system. |
| 2018 | Wu et al.[2] | 18 million free-text documents from a London mental health records database | deployment and retrieval evaluation | SemEHR identified 94 of 100 hepatitis C positive patients and 21 of 23 true positive HIV patients, and recruitment criteria checking fell from days to minutes. |
| 2019 | Canakoglu et al.[14] | multi-ontology search system | GenoSurf enriched 10 attributes with ontologies and let users combine attribute-based and keyword-based search. | |
| 2021 | Luan et al.[9] | passages of 50 to 400 tokens drawn from Wikipedia collections | theoretical and empirical comparison of retrieval models | Dense dual encoders lost accuracy as documents grew longer, while full cross attention stayed nearly perfect. |
| 2021 | Zhang et al.[4] | three retrieval benchmarks | adversarial retriever-ranker experiments | AR2 reached Natural Questions R@5 of 77.9% (+2.1%) and MS-MARCO MRR@10 of 39.5% (+1.3%). |
| 2022 | Mohamed & Shokry[15] | Quranic verses annotated against Mushaf Al-Tajweed | tool building and evaluation | QSST reached precision of 76.91%, recall of 72.23% and F-score of 69.28%, and three Islamic experts gave an average precision of 91.95%. |
| 2024 | Zhao et al.[8] | 300+ reference papers reviewed | survey of dense retrieval | Denoised hard negatives improved MRR@10 by 3.1 percentage points, and data augmentation added 0.6 percentage point. |
| 2024 | Zhang et al.[17] | eleven typologically diverse languages | empirical experiments with Mr. TYDI in eleven typologically diverse languages | Hybrid dense retrieval plus BM25 scores were generally better than BM25 results alone. |
| 2025 | Wang et al.[21] | Natural Questions and PubMedQA datasets | knowledge-graph RAG model comparison | KG-RAG raised the ROUGE-L score from 41.2 to 46.9 and reached 81% accuracy on medical question answering. |
See also
References
- Bast, H., Buchhold, B., & Haussmann, E. (2016). Semantic Search on Text and Knowledge Bases. Foundations and Trends® in Information Retrieval, 10(2-3), 119-271. doi:10.1561/1500000032
- Wu, H., Toti, G., Morley, K. I., Ibrahim, Z. M., Folarin, A., Jackson, R., Kartoglu, I., Agrawal, A., Stringer, C., Gale, D., Gorrell, G., Roberts, A., Broadbent, M., Stewart, R., & Dobson, R. J. (2018). SemEHR: A general-purpose semantic search system to surface semantic data from clinical notes for tailored care, trial recruitment, and clinical research*. Journal of the American Medical Informatics Association, 25(5), 530-537. doi:10.1093/jamia/ocx160
- Thomas, P., Starlinger, J., Vowinkel, A., Arzt, S., & Leser, U. (2012). GeneView: a comprehensive semantic search engine for PubMed. Nucleic Acids Research, 40(W1), W585-W591. doi:10.1093/nar/gks563
- Zhang, H., Gong, Y., Shen, Y., Lv, J., Duan, N., & Chen, W. (2021). Adversarial Retriever-Ranker for dense text retrieval. arXiv. doi:10.48550/arxiv.2110.03611 Free full text
- Koopman, B. (2014). Semantic Search as Inference: Applications in Health Informatics. ACM SIGIR Forum, 48(2), 116-117. doi:10.1145/2701583.2701601
- Li, H., & Xu, J. (2014). Semantic Matching in Search. Foundations and Trends® in Information Retrieval, 7(5), 343-469. doi:10.1561/1500000035
- Hashimoto, T. B., Alvarez-Melis, D., & Jaakkola, T. S. (2016). Word Embeddings as Metric Recovery in Semantic Spaces. Transactions of the Association for Computational Linguistics, 4, 273-286. doi:10.1162/tacl_a_00098
- Zhao, W. X., Liu, J., Ren, R., & Wen, J. R. (2024). Dense Text Retrieval Based on Pretrained Language Models: A Survey. ACM Transactions on Information Systems, 42(4), 1-60. doi:10.1145/3637870
- Luan, Y., Eisenstein, J., Toutanova, K., & Collins, M. (2021). Sparse, Dense, and Attentional Representations for Text Retrieval. Transactions of the Association for Computational Linguistics, 9, 329-345. doi:10.1162/tacl_a_00369
- Esteva, A., Kale, A., Paulus, R., Hashimoto, K., Yin, W., Radev, D., & Socher, R. (2021). COVID-19 information retrieval with deep-learning based semantic search, question answering, and abstractive summarization. npj Digital Medicine, 4(1). doi:10.1038/s41746-021-00437-0
- Althammer, S., Askari, A., Verberne, S., & Hanbury, A. (2021). DoSSIER@COLIEE 2021: Leveraging dense retrieval and summarization-based re-ranking for case law retrieval. arXiv. doi:10.48550/arxiv.2108.03937 Free full text
- Soto, A. J., Przybyła, P., & Ananiadou, S. (2019). Thalia: semantic search engine for biomedical abstracts. Bioinformatics, 35(10), 1799-1801. doi:10.1093/bioinformatics/bty871
- Li, W., Goodchild, M. F., & Raskin, R. (2014). Towards geospatial semantic search: exploiting latent semantic relations in geospatial data. International Journal of Digital Earth, 7(1), 17-37. doi:10.1080/17538947.2012.674561
- Canakoglu, A., Bernasconi, A., Colombo, A., Masseroli, M., & Ceri, S. (2019). GenoSurf: metadata driven semantic search system for integrated genomic datasets. Database, 2019. doi:10.1093/database/baz132
- Mohamed, E. H., & Shokry, E. M. (2022). QSST: A Quranic Semantic Search Tool based on word embedding. Journal of King Saud University - Computer and Information Sciences, 34(3), 934-945. doi:10.1016/j.jksuci.2020.01.004
- Esteva, A., Kale, A., Paulus, R., Hashimoto, K., Yin, W., Radev, D., & Socher, R. (2020). CO-Search: COVID-19 Information Retrieval with Semantic Search, Question Answering, and Abstractive Summarization. arXiv. doi:10.48550/arxiv.2006.09595 Free full text
- Zhang, X., Ogueji, K., Ma, X., & Lin, J. (2024). Toward Best Practices for Training Multilingual Dense Retrieval Models. ACM Transactions on Information Systems, 42(2), 1-33. doi:10.1145/3613447
- Neha, F., Bhati, D., & Shukla, D. K. (2025). Retrieval-Augmented Generation (RAG) in Healthcare: A Comprehensive Review. AI, 6(9), 226. doi:10.3390/ai6090226
- Gao, Y., Xiong, Y., Gao, X., Jia, K., Pan, J., Bi, Y., Dai, Y. Q., Sun, J., Meng, W., & Haofen, W. (2023). Retrieval-Augmented Generation for Large Language Models: A Survey. arXiv. doi:10.48550/arxiv.2312.10997 Free full text
- Peng, B., Zhu, Y., Liu, Y., Bo, X., Shi, H., Hong, C., Zhang, Y., & Tang, S. (2026). Graph Retrieval-Augmented Generation: A Survey. ACM Transactions on Information Systems, 44(2), 1-52. doi:10.1145/3777378
- Wang, S., Yang, H., & Liu, W. (2025). Research on the construction and application of retrieval enhanced generation (RAG) model based on knowledge graph. Scientific Reports, 15(1). doi:10.1038/s41598-025-21222-z
- UREN, V., LEI, Y., LOPEZ, V., LIU, H., MOTTA, E., & GIORDANINO, M. (2007). The usability of semantic search tools: a review. The Knowledge Engineering Review, 22(4), 361-377. doi:10.1017/s0269888907001233
Cite this page: Atlas Nova editors. (2026). Semantic search. Atlas Nova. https://velocer.io/atlas/semantic-search/