How does a computer know that "refund" and "money back" mean roughly the same thing, when they share almost no letters?

It stops comparing spellings and starts comparing positions.

Meaning gets an address

An embedding converts text into a long list of numbers that act as coordinates in a space arranged so that distance corresponds to similarity of meaning. "Refund", "money back", and "return my payment" land near each other. "Refund" and "refuel" do not, despite looking alike.

That is the machinery under semantic search, and it is genuinely powerful: users can ask in their own words and still reach documents written in yours.

Similarity is not relevance

Embeddings measure similarity. A pipeline that ranks on the similarity score alone is treating it as relevance, and that gap is where production problems start. The two overlap often enough to be convincing and diverge often enough to hurt.

"What is our refund policy?" and "customers furious about refunds" sit close together in embedding space. One is a policy question; the other is a complaints analysis. Semantic closeness narrows the search to the right area, and the scoring function will not tell you whether it found the right document.

The sharpest version of this is that in many embedding models, "eligible" and "not eligible" embed remarkably close together. Negation barely moves the coordinates, and the consequences of getting it backwards are enormous. Any domain where a "not" flips the outcome (eligibility, compliance, safety, permissions) needs a signal that is not purely semantic.

Three ways teams overtrust them

  • Domain vocabulary. General-purpose embedding models are trained on general-purpose text. Your internal product names, acronyms, and jargon may be positioned badly or arbitrarily. Test with the vocabulary your users actually type, not with tidy examples.
  • Version lock-in. The embedding model defines the geography of your index. Change the model and every stored vector becomes meaningless relative to new queries. You must re-embed the entire corpus. If that migration is not planned from day one (a second index built in parallel, evaluated against the first, then swapped in), it eventually happens as an emergency.
  • Confidence theatre. A similarity score of 0.87 looks like a probability of correctness, but it only measures the angle between two vectors in a space you did not design. The threshold that seemed reasonable on sample data may be meaningless on real queries, and it will not survive a change of embedding model.

What to actually do

Use embeddings for broad recall, catching paraphrases and surfacing candidates you would never have matched by keyword, which is what they are excellent at. Then let other components decide precision: exact-match signals for identifiers, metadata filters for permissions and dates, reranking for final ordering. Each of those is another component to run and tune, and a second retriever brings a problem of its own: merging two rankings whose scores are not on the same scale.

The practical test is to find queries in your domain where the semantically closest text is the wrong answer. Every domain has them. If you cannot find any, you have not looked hard enough, and your system is currently trusting similarity as though it were truth.

Start where the user needs an exact match, with order numbers, policy names and eligibility decisions. Confirm that each one is settled by an exact-match path, a metadata filter or structured data, with similarity used only to find candidates.

Terms in this piece

About this explainer

Format
Explainer
Level
Practitioner
Read
2 min read
Published
Jun 5, 2026

Short mental models: one idea, why it matters, what to do about it.

Checklist · · 12 checks

RAG production-readiness checklist

Twelve checks to pass before a retrieval system answers a real user. Tick them locally; progress stays in your browser.