What is an embedding, and what does "similar" actually mean when you search with one?
What they are really testing: Embeddings power almost every retrieval system you will touch, and the subtlety, that similarity is semantic and model-defined rather than keyword overlap, is what explains most retrieval bugs.
A real interview question
What is an embedding, and what does "similar" actually mean when you search with one?
What most people say
drag me
“An embedding is a vector representation of text, and similar vectors mean similar text.”
Circular and consequence-free. It restates the definition without saying what similar means in practice or when it fails, and the failures are the actual job.
The follow-ups they ask next
Why does swapping the embedding model force a full re-index?
Vectors are only comparable within the space of the model that produced them. Query vectors from model B against stored vectors from model A are meaningless.
A user searches for an invoice number and gets nothing useful. What is happening?
Exact identifiers are semantically thin, dense retrieval fails on them. The fix is hybrid search so the keyword side catches exact matches.
What the interviewer is listening for
- Explains similarity as meaning, with a concrete example pair
- Volunteers the exact-match failure and hybrid search as the fix
- Knows model changes invalidate the whole index
What sinks the answer
- Cannot say what cosine similarity is comparing
- Believes semantic search strictly dominates keyword search
- Treats similarity thresholds as universal constants
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“An embedding is [a vector from a model trained so similar meanings land close together]. Similar means [close by cosine similarity, tracking meaning, not shared words]. That is powerful for [paraphrased queries] and weak for [exact codes and names], which is why production search is usually [hybrid: dense plus keyword].”
Keep going with rag & retrieval
Foundation
Explain RAG to me, and tell me what problem it solves that a bigger model does not.
Foundation
Do you actually need a dedicated vector database to ship a RAG feature? Walk me through how you would decide.
Junior
How do you decide how to chunk documents for a RAG system, and what goes wrong with naive chunking?
Mid
What are hybrid search and reranking, and when does a RAG system actually need them?
Foundation
What is a token, and why does it matter that models bill and limit by tokens rather than words?
Foundation
Why do language models hallucinate, and why can you not simply prompt them to stop?
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free