164
embedding
A vector that puts similar things near each other. It is not a summary you can read, and it is not search by itself.
What is embedding?
An embedding maps an object to a dense vector so that distance means similarity. You still need a neighbor index, a decision about what “similar” is for, and a way to filter by permission. Nearest neighbor without an access check leaks private documents.
Why does embedding matter when vibe coding?
Models “add embeddings” and cosine-search the whole table from the app process. No index, no tenant filter. Name both.
How do you do embedding?
Say what is embedded and what question distance answers. Index it. Filter by tenant before or during the search. Do not treat the vector as an explanation.
How do you ask a model for embedding?
Embed (objects) for (similarity task). Store vectors in an index, not a linear scan. Apply the tenant permission filter. Do not show neighbors the caller cannot read. Do not use the vector as a human-readable summary.
What goes wrong with embedding?
Mixing embeddings from two models in one index. Distances between them mean nothing.