AI Basics Evergreen

Part of How AI Actually Works

What Is an Embedding? And Why Search Suddenly Got Good

The idea behind AI search finding the right document when you used none of the same words.

Nathan Nobert
Nathan Nobertwith help from my agents, of course.
7 min read

The Search That Should Not Have Worked

Someone types "can I send it back if I changed my mind" into a support search. The document that answers it is titled "Returns and Refunds Policy" and does not contain the words "send", "back", "changed", or "mind" anywhere in it. Old-fashioned keyword search returns nothing. The new kind returns the right document first.

That gap — between the words people use and the words the document uses — is the reason internal search has been quietly terrible in most businesses for twenty years. Embeddings are what closed it, and the idea underneath is genuinely graspable in a couple of minutes.

Meaning, Turned Into Coordinates

DefinitionEmbedding
A list of numbers that represents the meaning of a piece of text, positioned so that things which mean similar things end up near each other. Full definition

Picture a map where every phrase gets a location. "Refund policy" lands somewhere. "Can I get my money back" lands very close to it, because they mean nearly the same thing. "Delivery times" lands some distance away. "Staff parking" is off in another region entirely.

Now searching stops being about matching letters and becomes about measuring distance. Take the question, work out where it sits on the map, and return whatever is nearby. The words never have to match, because you are comparing positions rather than spellings.

Watch phrases become positions
Search for:
  • Billing
  • Scheduling
  • Complaints
  • Hiring

Nearest matches to “money we are owed”

  1. 1Send the invoice 86% match
  2. 2Chase the unpaid bill 86% match
  3. 3Payment is overdue 86% match

Simplified Real embeddings use hundreds of dimensions, not two, and positions are learned rather than placed by hand. The idea is identical: text becomes coordinates, and closeness means similar meaning — which is why search works even when you use none of the same words.

Phrases placed by meaning, then searched. Try a query that shares no words with the document you want.

A real embedding is not a two-dimensional map — it is a list of several hundred or a couple of thousand numbers, and the "distance" is arithmetic rather than something you could point at. But nothing about the intuition changes when you add dimensions. Close together means similar. Far apart means unrelated.

What This Actually Lets You Do

The capabilities that all come from the same trick:

  • Search that works when the customer and the document use different vocabulary — the common case, not the edge case
  • Retrieval for AI assistants: find the three relevant paragraphs out of four hundred pages and hand only those to the model
  • Grouping support tickets or reviews by what they are actually about, without anyone writing categories first
  • Spotting near-duplicates — two policies that say the same thing in different words
  • "More like this" recommendations that are not based on tags somebody forgot to maintain
Why this matters even if you never build oneEmbeddings are the retrieval half of retrieval-augmented generation. When a vendor says their AI "knows your documents", this is almost always the mechanism — your material is embedded once, and each question is embedded and matched against it. Knowing that tells you what questions to ask about it.

Where It Goes Wrong

Semantic search is a large improvement and it is not magic. The failure modes are specific, and worth knowing before you rely on it for anything customer-facing.

FailureWhat happensWhat helps
Similar but wrong"Refund policy" and "returns policy" sit close together. If you have separate documents for each, retrieval may fetch the wrong one confidently.Make near-duplicate documents genuinely distinct, or merge them.
Exact terms get fuzzyPart number A-4471 and A-4771 are nearly identical as meaning, and completely different as facts.Combine keyword and semantic search. Exact identifiers need exact matching.
Nothing relevant existsDistance is always measurable, so something always comes back — including when the answer is not in your documents at all.Set a relevance threshold and let the system say it does not know.
Badly split documentsA paragraph cut mid-sentence embeds as something meaningless and never matches anything.Split on real boundaries — sections and headings, not fixed character counts.
Negation gets lost"We do offer weekend delivery" and "we do not offer weekend delivery" land close together, because they are about the same thing.Keep the retrieved passage visible so a person can read what it actually says.
The last two cause most of the real-world disappointment.
The one that catches everyone"Nothing relevant exists" is the dangerous one. A search that always returns its closest match will confidently hand an AI assistant a passage about parking when someone asked about refunds — and the assistant will then write a fluent answer based on it. If you take one thing from this article, it is that the system must be allowed to say it found nothing.

What This Means If You Are Buying It

Questions worth asking a vendor selling AI search over your documents:

  • "What happens when the answer is not in our documents?" — the answer should be that it says so
  • "Can we see which passage an answer came from?" — if not, nobody can check anything
  • "How is our material split up?" — on headings and sections, not fixed-size chunks
  • "Does it handle exact identifiers?" — part numbers and codes need keyword matching alongside
  • "How do updates get in?" — re-embedding should be routine, not a project

The Short Version

Key takeaways

  • An embedding turns text into a position, placed so similar meanings land near each other.
  • Search becomes distance rather than spelling, which is why it works when no words match.
  • This is the retrieval half of RAG — the mechanism behind "AI that knows your documents".
  • It is weak on exact identifiers and on negation, and it always returns something even when nothing fits.
  • The system must be able to say it found nothing. Without that, an assistant will answer from the wrong passage.
What is an embedding in AI?

A list of numbers representing the meaning of a piece of text, arranged so that texts meaning similar things end up numerically close together. It lets software compare meaning by measuring distance instead of matching words.

What is the difference between semantic search and keyword search?

Keyword search matches the letters you typed against the letters in the document, so "money back" misses a page that says "refund". Semantic search compares meaning, so it finds that page anyway. The trade-off is that semantic search is fuzzier — it is weaker on exact codes and part numbers, where keyword search is exactly right.

Do embeddings mean AI understands my documents?

Not in any deep sense. They capture what text is broadly about well enough to find it again, which is genuinely useful. They routinely miss distinctions that matter to a business — most notably negation, where "we do offer this" and "we do not offer this" sit very close together because they are about the same subject.

Do I need a vector database?

Only at scale. For a few thousand documents, plain arithmetic over stored embeddings is fast enough, and several ordinary databases now handle this natively. A dedicated vector database is an optimisation for large collections, not a prerequisite for getting started.

How often do embeddings need updating?

Whenever the underlying document changes, because the stored position reflects the text as it was when embedded. Any system worth buying re-embeds changed documents automatically. If updating means a manual re-index somebody has to remember, the search will quietly go stale.

Nathan Nobert
Nathan Nobertwith help from my agents, of course.Co-Founder & AI Consultant

Want to go deeper?

The learning hub walks through how AI actually works — free, structured, and built to be understood without a technical background.