Flashcard: what is an embedding in a RAG pipeline, and what role does it play?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
An embedding is a fixed-length vector that places text at a point in high dimensional space, so semantic similarity becomes vector distance.
Imagine every sentence in the world gets a numeric address, like coordinates on a giant map. Sentences with similar meaning live close together, even when they use different words. 'Cancel my subscription' and 'how do I quit my plan' end up as next door neighbors, while 'best pasta recipes' lives in a completely different neighborhood. A special address maker computer reads each sentence and writes down its address. In RAG, you give every chunk of your documents an address ahead of time and store all the addresses. When a user asks something, you compute the address of their question, then look up which document chunks live nearest. You are no longer searching for matching words. You are searching for matching meaning, which is the whole reason RAG can answer paraphrased questions at all.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: define embedding as a vector address for meaning, walk through index-time and query-time encoding, name 2026-current models, and call out the same model and re-index rules.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating an embedding as part of the LLM's weights. It is a separate artifact computed by a separate model and stored ahead of time, not something the chat model produces during generation.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.