Embeddings explained without the linear algebra

06/09/2026 — admin@byqreal.test
Embeddings explained without the linear algebra

An embedding model converts text into a list of numbers positioned so that related meanings land close together. Distance between two embeddings approximates relatedness, which is what lets search match on meaning rather than keywords — and why "related" sometimes includes opposites.

Here is the whole idea without a single matrix. Imagine placing every sentence you own somewhere on a very large map, positioned so that sentences about the same thing end up near each other. An embedding model is what assigns the coordinates.

Meaning as position

Feed a piece of text to an embedding model and you get back a fixed-length list of numbers — a few hundred to a few thousand of them. That list is a location. The individual numbers mean nothing to a human, and you never need to read them.

What you use is the distance between two of them. Text about invoicing lands near other text about invoicing, regardless of whether both used the word "invoice". That is the entire trick, and it is enough to build search that matches on meaning.

Why this beats keyword matching

A keyword index fails when the user and the document chose different words for the same thing. "How do I cancel my plan" and "ending a subscription" share almost no vocabulary and a great deal of meaning. Embeddings put them next to each other.

The failure worth knowing about

Relatedness is not the same as agreement, and this catches people out. A sentence and its negation are extremely close in embedding space, because they share topic, vocabulary and structure. Only one small word differs.

So a semantic search for "which regions support this feature" can happily surface the passage listing regions that do not. Retrieval found related text, which is what you asked it for. Deciding what the text actually says is a separate job, and it needs a step that reads.

Spaces do not interoperate

Every embedding model invents its own coordinate system during training. Two models given the same sentence produce different numbers, and comparing across them is meaningless — not merely inaccurate, but arbitrary.

The operational consequence is worth planning for before you need it: upgrading your embedding model means re-embedding your whole corpus. Store the model name and version alongside every vector so that a mixed index is a detectable error rather than a silent one.

What they are good for

Retrieval is the obvious use, and the foundation of RAG. But the same coordinates support clustering documents without labels, deduplicating near-identical text, routing a question to the right handler, and finding the nearest existing item before something new is created.

They are cheap, fast and easy to store. The discipline is remembering what the distance actually measures.

Frequently asked questions

Why does semantic search return the opposite of what I asked?

Because relatedness is not agreement. "The deployment succeeded" and "the deployment failed" share almost all of their meaning — same subject, same domain, same vocabulary — so they sit close together. If the distinction matters, you need a step after retrieval that reads the candidates.

Can I re-use embeddings if I change models?

No. Each model defines its own space, and coordinates from one are meaningless in another. Changing the embedding model means re-embedding everything in the index.

Sign in to react.
Share this post.

Comments

Sign in to join the conversation.

No comments yet. Be the first.

Don't miss this

You might also like

Why models hallucinate, and what actually reduces it
Why models hallucinate, and what actually reduces it
31/08/2026 — admin@byqreal.test

Hallucination is not a glitch that a better model will one day remove. It is what generation does when it has nothing to...

Giving an agent memory without giving it amnesia
Giving an agent memory without giving it amnesia
17/08/2026 — admin@byqreal.test

Memory is not a feature you enable. It is a set of decisions about what to keep, what to summarise and what to let go —...

RAG in one page: retrieve, rank, answer
RAG in one page: retrieve, rank, answer
03/08/2026 — admin@byqreal.test

Retrieval-augmented generation is three steps and a lot of tuning. The architecture is simple; the quality lives almost...