What Is Semantic Search?

Semantic search ranks documents by the distance between embedding vectors rather than by the words a query and a passage share. Two texts with no vocabulary in common can be ranked as close, which is the whole point of the method and also the origin of its characteristic errors.

Get Assessment Full glossary →

Vectors, indexes and approximate neighbours

The pipeline has two halves. Offline, each passage is embedded and stored. At query time the query is embedded into the same space and the stored vectors nearest to it are returned. Comparing against every stored vector is exact and gets slower as the store grows, so production systems use an approximate nearest-neighbour index that trades a small, tunable share of recall for a large gain in speed.

The index is a separate design decision from the embedding, and their failure modes are separate too. A wrong neighbourhood is an embedding problem. A right neighbourhood searched incompletely is an index problem. Diagnosing one as the other is the most common way a search deployment gets tuned in the wrong direction for a month.

The approximate indexes in general use come in two broad shapes, and the difference between them is operational rather than semantic. Graph-based indexes link each stored vector to a set of neighbours and walk that graph from an entry point toward the query, spending memory to shorten the walk. Partition-based indexes divide the space in advance and search only the partitions closest to the query, spending recall to reduce how much of the store is touched. Both expose a knob that buys recall back with latency, and neither alters which vectors are near which — that was settled by the embedding model before the index existed.

Which retrieval method suits which query
Query characteristic Method that serves it
A paraphrase of the target wordingSemantic. Shared meaning without shared vocabulary.
An exact identifier, code or citationLexical. The exact string is the requirement.
A rare proper nounLexical, usually. Rare terms are weakly represented in embedding space.
A conceptual or descriptive questionSemantic. There is no specific wording to match on.
A negation or an exclusionNeither, dependably. Both rank on presence rather than absence.

This is why hybrid retrieval is the common production answer: run both, and combine the rankings, rather than choosing a method and then discovering which queries it was never going to serve.

What semantic ranking does not encode

Distance in an embedding space is not truth, recency, permission or authorship. A superseded document sits exactly as close to a query as its replacement does, and a passage stating the opposite of the answer is frequently closer than one stating it, because the two share a subject and nearly all their vocabulary.

Working systems handle this outside the ranking: metadata filters for recency and access, a re-ranking pass that reads the candidates more carefully than the index did, and explicit deduplication of near-identical passages that would otherwise fill the result set with one document. None of these refine the distance measure. They are separate stages, added because distance does not carry that information and never will.

How the Registry classifies a semantic search task

Ranking a documentation corpus against a natural-language query by embedding distance and returning the closest passages is filed as information retrieval here: existing material is located and narrowed, and every part of the result was already in the store.

The Registry's canonical brief for this entry is filed as: Rank a documentation corpus against a natural-language query using embedding distance and return the closest passages. Submitted for assessment it is classified as Information retrieval, and its wording is hashed once — to d0fb006dd977ef4b…, the first sixteen of sixty-four hexadecimal characters — with the wording itself never stored. The hash is what the derivation reads. That class's own page is /tasks/retrieval.

Classification is one of three inputs. The other two are the configuration submitted with the task, and the permanent chart derived from that configuration — fixed by the model name, the training cutoff and the temperature alone, and never reading the task at all. The same ascendant, ruling planet and harmony therefore appear on every assessment a given configuration receives, whatever it was asked to do. The derivation is published in full at /method.

What this page does not claim about semantic search

Which embedding space the ranking happens in decides what "closest" means, and the canonical brief above does not fix one — the operation is the task, the space is a deployment decision.

The Registry does not run this task, does not inspect any system's output for it, and validates no assessment it issues against what afterwards happens. What it does is compute — from a published method, for one submitted task and one submitted configuration — a verdict and a recommended execution window. It computes neither on this page.

Questions about semantic search

What is semantic search?
Semantic search ranks documents by the distance between embedding vectors rather than by shared keywords, so a query and a passage that use different words for the same thing can still be matched. It requires an embedding model to define the space and an index to search it quickly.
How is semantic search different from keyword search?
Keyword search matches the terms that are present, which makes it exact and literal. Semantic search matches positions in a vector space, which makes it tolerant of paraphrase and unreliable for identifiers, rare names and negation.
What is hybrid search?
Hybrid search runs a lexical and a semantic query and combines the two rankings, commonly with a fusion rule or a re-ranking pass. It exists because the two methods fail on different queries, so combining them covers more of the query distribution than tuning either one further.
Why does semantic search return the opposite of what I asked for?
Because a statement and its negation share nearly all their vocabulary and their subject, so they sit close together in most embedding spaces. Distance measures relatedness, not agreement, and excluding something is not expressible as a direction in the space.
Why do results get worse after more documents are added?
Two things change at once. A larger store puts more vectors near any given query, so passages that were previously returned now compete with near-duplicates of themselves; and an approximate index examining the same fraction of a larger space returns a smaller share of the true nearest neighbours. Neither effect raises an error, which is why it presents as a slow decline in answer quality rather than as a failure anyone gets paged for.

Order an assessment for information retrieval tasks

The Registry issues a permanent, numbered task risk assessment for one submitted task and one submitted configuration. EUR 1.90 Standard, EUR 4.90 Extended, EUR 14.90 Full Chart, which adds the permanent chart. Assessments from EUR 1.90; machine-readable at /pricing.json.

Get Assessment