What are embeddings?
An embedding is a list of numbers that places a piece of text so that texts with similar meanings sit close together. How they are made and compared, what they are good at, and the questions they reliably get wrong.
An embedding is a fixed-length list of numbers, a vector, that represents a piece of text. The numbers are not meaningful one by one. What matters is position: an encoder places texts so that ones with similar meaning end up near each other, and ones about different things end up far apart. "The invoice is overdue" and "they have not paid the bill" land close together even though they share no words.
That property is what makes embeddings the usual first step in retrieval-augmented generation. If questions and stored passages are embedded the same way, finding relevant passages becomes finding nearby vectors.
How they are produced
An embedding comes from an encoder model: a neural network trained, usually on huge numbers of pairs of related texts, so that related pairs come out close and unrelated pairs come out apart. You pass in a sentence or a paragraph and get back a vector of a set size, the model's dimensions. Common sizes run from a few hundred to a few thousand numbers. More dimensions can hold finer distinctions and cost more to store and compare.
Each encoder also has a maximum input length. Text beyond it is usually cut off silently, so a long document has to be split into pieces or embedded a window at a time, or its later parts never reach the index.
How they are compared
The usual measure is cosine similarity, the angle between two vectors, which runs from 1 for the same direction down through 0 for unrelated. A search embeds the question, compares it with stored vectors, and returns the closest.
Comparing against every stored vector is fine for thousands of items and too slow for millions, so production systems use a vector index: an approximate nearest-neighbour structure (HNSW is the common one) that finds very probably the closest vectors without checking them all. Many databases now offer this directly, which is why a separate vector database is often unnecessary.
What they are good at
Embeddings are excellent at paraphrase and fuzzy recall. They find the passage that answers the question even when it uses different words, cope with typos and synonyms, and work across languages if the encoder was trained that way. They let a system find a customer by what it is ("the client who keeps missing payments") rather than by what it is called.
What they are bad at
The same smoothing that makes paraphrase work blurs the distinctions that matter most in company data.
Exact identifiers. INV-0185 and INV-0182 are nearly identical to an encoder and are two different invoices. So are two order numbers, two account codes or two people called Clark.
Numbers. "Revenue rose to £4.2m" and "revenue fell to £2.4m" sit close together.
Negation. "The contract was renewed" and "the contract was not renewed" are mostly the same words and often the same neighbourhood.
Dates and order. An encoder has little sense of which of two facts is newer, or that one replaced the other.
Identity. Whether Acme Travel Ltd in the CRM and acmetravel.com in the helpdesk are the same customer is a question about records, and resemblance is a weak answer to it. That is the job of entity resolution and a knowledge graph.
There is also a structural weakness. The question and the passage are embedded separately, and the encoder never sees them together, so a passage that shares a prominent word with the question can score as well as one that answers it. This is why many pipelines add a second stage, a slower model that reads each shortlisted passage alongside the question and re-scores the pair.
Changing the encoder
Vectors from different encoders are not comparable. Each model lays out its own space, so a question embedded by a new model cannot be matched against passages embedded by the old one. Switching encoders therefore means re-embedding everything stored, and the thresholds tuned for the old model (what similarity counts as relevant) have to be found again, because each encoder spreads its scores differently. Teams that treat the encoder as an interchangeable component tend to find this out after the swap.
Where Memtro stands
In Memtro, embeddings are one signal among several. Memory is searched by vector similarity over memories and entity summaries, by full-text rank, and through the knowledge graph (the facts attached to the entities a question names, and their neighbours), the results are fused, and a cross-encoder re-scores the shortlist. Matching a new name to an existing entity starts from external ids and exact names, and uses embeddings only to confirm a fuzzy match. The memory documentation describes how the signals fit together.