For the complete documentation index, see llms.txt. Every page on this site is also served as Markdown: append `.md` to any URL, or send `Accept: text/markdown`.
Attensira Logo
Attensira
SEO Glossary

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 KallasmaaKarl-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.

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.

  1. 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.
  2. Repetition buys nothing. There is no phrase being counted. Saying the same thing five times adds tokens and no signal.
  3. Write the question you are answering into the heading. Headings are usually embedded with the passage and are often what a match lands on.
  4. 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.
  5. Spell out identifiers. Codes, versions and product names should be present as text, not implied by context.
  6. 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.

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.

Frequently Asked Questions about Semantic search

By comparing vectors rather than strings. Documents and the query are converted into embeddings, defined by OpenAI as lists of floating point numbers where the distance between two vectors measures their relatedness, and the nearest documents are returned.

No. Semantic search is a retrieval method that returns documents. AI search is a product in which a model reads retrieved documents and writes the answer. Semantic retrieval is usually a component of AI search, and it long predates it.

Exact tokens. A part number, error code, SKU or legal citation has no meaningful neighbourhood in meaning space, so similarity search can return something that resembles it rather than the thing itself. This is why production systems normally combine vector and lexical matching.

It means matching a phrase exactly is no longer the mechanism. The words still matter, because they are what gets embedded, and because exact identifiers still need to be present as literal text for lexical matching to find them.

State each idea once, plainly, in a section of its own. Similarity is computed over the whole chunk, so a section covering several unrelated topics produces a vector that sits near none of them, and repeating a phrase adds nothing because there is no phrase to match.
Share this term

Track how your brand shows up in ChatGPT, Claude, and Google AI

Attensira monitors your visibility across AI search platforms so you know exactly when and how you're being recommended.