Semantic search
Retrieval by meaning rather than by matching strings, what it is genuinely better at, and the class of query where it reliably fails.
Karl-Gustav Kallasmaa, Founder & CEOLast updated Semantic search retrieves documents by meaning rather than by matching the characters of a query against the characters of a document. A query about "how do I stop bots taking my content for model training" can return a page that never uses any of those words, because the comparison happens between representations of meaning rather than between strings.
The mechanism, in one paragraph
Documents are split into chunks and each chunk is converted into an embedding. OpenAI's documentation defines an embedding as a vector, a list of floating point numbers, where the distance between two vectors measures their relatedness, and lists search — results ranked by relevance to a query string — as the first of its use cases. The query is embedded the same way and the nearest document vectors are returned. Vector size is a model property: text-embedding-3-large returns 3,072 dimensions by default and text-embedding-3-small returns 1,536.
Nothing about that process looks at whether a word in the query appears in the document. That is the whole point, and it is also the source of the failure mode below.
How it differs from lexical search, and from AI search
Three terms are used as if interchangeable and are not:
- Lexical search matches terms, with weighting for how rare and how frequent they are. It is exact, cheap, explainable, and defeated by synonyms and paraphrase.
- Semantic search matches meaning. It handles paraphrase, translation-like restatement and vocabulary mismatch, and it is defeated by exactness.
- [AI search](/glossary/ai-search) is a product built on top of retrieval, in which a model reads what was returned and writes the answer. Semantic retrieval is usually a component of it, but semantic search on its own returns documents, not prose.
Semantic search is also considerably older than the current wave of assistants. It became a standard part of web search well before generated answers appeared; what changed is that it is now the first stage of a pipeline whose output is a paragraph rather than a list.
Where it reliably fails
Exact identifiers. A part number, an error code, a SKU, a version string or a legal citation has no useful neighbourhood in meaning space — the closest vectors are things that look similar rather than the thing itself. A user searching for a specific code and receiving a page about a different but similar code has had a perfect semantic result and a useless one.
This is why serious systems are hybrid, running lexical matching alongside vector similarity and fusing the two result sets. It also means the advice "stop worrying about the exact words" is half right at best: paraphrase is handled, but a literal identifier still has to be present as literal text.
How to write for it
The practical implications are different from keyword-era advice and mostly simpler.
- One idea per section. Similarity is computed over an entire chunk, so a section that covers four unrelated things produces a vector near none of them. This is the single highest-value change for retrievability.
- Repetition buys nothing. There is no phrase being counted. Saying the same thing five times adds tokens and no signal.
- Write the question you are answering into the heading. Headings are usually embedded with the passage and are often what a match lands on.
- Keep qualifiers in the same sentence as the claim. A retrieved passage arrives without the paragraphs above it, so a caveat left upstream is simply lost — the same constraint that retrieval-augmented generation imposes on every cited passage.
- Spell out identifiers. Codes, versions and product names should be present as text, not implied by context.
- Cover adjacent phrasings once each, rather than stuffing variants into one paragraph. Distinct sections give the retriever distinct things to choose between.
Frequently asked questions
How does semantic search work?
By embedding documents and queries as vectors and returning the nearest ones by distance.
Is it the same as AI search?
No. It returns documents; AI search has a model write an answer from them.
What is it bad at?
Exact identifiers, which have no meaningful neighbourhood in meaning space.
Do keywords still matter?
The words still matter as the thing being embedded, and identifiers still need to appear literally.
Terms related to Semantic search
Vectors of floating point numbers whose distance measures relatedness, the representation underneath semantic search and retrieval.
The architecture that retrieves documents at query time and has a model write from them, and the reason your page can be quoted without ever being trained on.
Search where a model composes the answer and fetches pages through named crawlers, rather than returning a ranked list of links for you to read.
The units a language model actually reads and writes, why they are not words, and why every limit and price you meet is denominated in them.