Esc

Embeddings

Lists of numbers that stand for text, built so that similar meanings end up close together. Semantic search runs on them.

An embedding model turns a piece of text into a list of numbers, anywhere from a few hundred to a few thousand. Meaning shows up as geometry: two passages on the same topic sit near each other even when they share no words.

That is how semantic search works. Embed your documents once and store them in a vector-database. At request time embed the query and return the nearest neighbours. It is also the retrieval half of rag.

Each embedding model has its own space. Vectors from two models cannot be compared, so switching models means embedding everything again.

Where this comes up

Prompts, configs and tutorials in the library that touch this term.