Embeddings
How a chunk becomes a vector: cosine, dot and L2, query and document prompts, vector size and how to shrink it, and how to shortlist and test a model on your own questions.
Last updated
After this section you can
- Compare two texts with cosine, dot and L2, and say when the three rank chunks alike
- Apply the right query and document prompts, and stamp every vector so a mismatched model is caught
- Shortlist an embedding model by licence, language and input cap, and decide on your own questions
Embeddings: Text In, Vector Out
How a chunk becomes a vector: cosine, dot and L2, query and document prompts, vector size, and choosing a model.
An embedding model turns a text into a vector, a fixed-length list of numbers, so similar meanings land close together. Search is then arithmetic: embed the question, find the nearest chunk vectors. Both sides need the same model and version, each with the prompt that model expects; a mismatch can be silent.
Pans sideways on narrow screens.