Embeddings & Vector Search interview questions

30 questions from the Embeddings & Vector Search course, each with the correct answer and an explanation. Try to answer before you open the answer.

What Embeddings Are

1. What should be true of the embeddings of two sentences with similar meaning?

  1. Their vectors are far apart
  2. Their vectors are identical
  3. Their vectors are close together
  4. They have the same length in characters
Show answer

Answer: Their vectors are close together

Embedding models are trained so that similar meaning gives nearby vectors.

Lesson: From Words to Coordinates

2. Why can vectors from two different embedding models not be compared?

  1. Each model defines its own space and coordinates
  2. They always have different lengths in bytes
  3. Models forbid it by licence
  4. It is only slow
Show answer

Answer: Each model defines its own space and coordinates

Dimension 17 means something different in every model.

Lesson: Where Embeddings Come From

3. For unit-length vectors, what is true?

  1. L2 gives the opposite ranking
  2. Cosine is always zero
  3. Dot product is meaningless
  4. Dot product equals cosine similarity, and L2 gives the same ranking
Show answer

Answer: Dot product equals cosine similarity, and L2 gives the same ranking

Normalising removes length, leaving only direction.

Lesson: Similarity Measures: Dot, Cosine and Euclidean

4. Is a higher-dimensional embedding model always better?

  1. Yes, always
  2. No: it costs more storage and time, so test on your data
  3. Only if it is free
  4. Dimensions never matter
Show answer

Answer: No: it costs more storage and time, so test on your data

Quality gains from extra dimensions often flatten while costs keep growing.

Lesson: Dimensions and the Curse of Dimensionality

Creating and Choosing Embeddings

5. What lets LSA match "vacation" with a document that says "leave"?

  1. A dictionary of synonyms
  2. Related words appear in the same documents, so they share dimensions
  3. Exact string matching
  4. Random chance
Show answer

Answer: Related words appear in the same documents, so they share dimensions

Embeddings learn relatedness from patterns of co-occurrence.

Lesson: A Learned Embedding You Can Inspect

6. When does keyword search beat embeddings?

  1. Finding synonyms
  2. Matching paraphrases
  3. Cross-language matching
  4. Looking up an exact error code or product id
Show answer

Answer: Looking up an exact error code or product id

Exact identifiers have no "meaning" to generalise; the literal token matters.

Lesson: Keyword Search vs Semantic Search

7. Why test candidate models on your own questions rather than rely on a leaderboard alone?

  1. Leaderboards average over tasks that may not resemble your domain or languages
  2. Leaderboards are always wrong
  3. Your questions are secret
  4. It is required by law
Show answer

Answer: Leaderboards average over tasks that may not resemble your domain or languages

Use leaderboards to shortlist and your own data to decide.

Lesson: Choosing an Embedding Model

8. What often happens to text longer than a model's maximum input length?

  1. It is translated
  2. It is embedded perfectly
  3. It is silently truncated, losing the end
  4. The model trains on it
Show answer

Answer: It is silently truncated, losing the end

Chunk below the limit so nothing important is cut.

Lesson: Preparing Text: Chunking, Truncation, Query vs Document

Searching Vectors: Exact and Approximate

9. Why start with brute force?

  1. It needs a GPU
  2. It is always the fastest at any size
  3. It is exact and gives ground truth to judge approximate methods
  4. It cannot filter
Show answer

Answer: It is exact and gives ground truth to judge approximate methods

You cannot measure recall without exact answers to compare against.

Lesson: Exact k-Nearest Neighbours

10. What does raising nprobe (IVF) or efSearch (HNSW) do?

  1. Raises recall and also latency
  2. Lowers both recall and latency
  3. Changes the embedding model
  4. Deletes vectors
Show answer

Answer: Raises recall and also latency

More search effort finds more true neighbours but takes longer.

Lesson: Approximate Search: IVF and HNSW

11. What does quantisation trade?

  1. Nothing
  2. Memory for more accuracy
  3. Security for speed
  4. A little accuracy for much less memory
Show answer

Answer: A little accuracy for much less memory

Fewer bits per number means smaller vectors but some rounding error.

Lesson: Compression: Scalar and Product Quantisation

12. Which index is a sensible start for 20,000 vectors?

  1. Product quantisation with 32x compression
  2. A flat (exact) index
  3. A sharded cluster
  4. No index at all, guessing
Show answer

Answer: A flat (exact) index

At small sizes exact search is fast enough and removes tuning.

Lesson: Choosing an Index

Beyond Plain Nearest Neighbours

13. Where should "this user may see only their own documents" be enforced?

  1. Only in the prompt
  2. In the retrieval query as a filter
  3. Only in the UI
  4. Nowhere
Show answer

Answer: In the retrieval query as a filter

Documents the user may not see must never be retrieved.

Lesson: Metadata Filtering

14. Why is a cross-encoder applied only to a shortlist?

  1. It replaces the filter
  2. It cannot read text
  3. It only works on images
  4. It is accurate but too costly to run on the whole collection
Show answer

Answer: It is accurate but too costly to run on the whole collection

Fast retrieval narrows candidates; the expensive model refines them.

Lesson: Hybrid Search and Reranking

15. How should a near-duplicate threshold be chosen?

  1. By inspecting real pairs for your model, since scales differ
  2. Always 0.5
  3. Always exactly 1.0
  4. At random
Show answer

Answer: By inspecting real pairs for your model, since scales differ

Similarity distributions vary by embedding model and data.

Lesson: Clustering, Topics and De-duplication

16. What does a multilingual embedding model enable?

  1. Removing the need for chunking
  2. Translating text word for word
  3. Matching a query in one language to documents in another
  4. Encrypting text
Show answer

Answer: Matching a query in one language to documents in another

A shared space lets meaning match across languages.

Lesson: Multi-Vector, Multilingual and Multimodal Embeddings

Evaluating and Improving Retrieval

17. What does MRR reward?

  1. Using bigger vectors
  2. Returning more results
  3. Placing the first relevant result near the top
  4. Lower latency
Show answer

Answer: Placing the first relevant result near the top

A first relevant result at rank 1 scores 1; at rank 4 it scores 0.25.

Lesson: Recall@k, MRR and nDCG on a Golden Set

18. A relevant chunk is retrieved but ranked 14th. What is the most direct fix?

  1. Add a reranker to reorder the shortlist
  2. Delete the filter
  3. Double the dimensions
  4. Ignore it
Show answer

Answer: Add a reranker to reorder the shortlist

The evidence is found, so improve ordering rather than recall.

Lesson: Error Analysis and Improving Quality

19. How should you roll out a new embedding model?

  1. Never change models
  2. Mix old and new vectors in one index
  3. Replace the model and keep the old vectors
  4. Build a new index alongside the old one, compare, then switch
Show answer

Answer: Build a new index alongside the old one, compare, then switch

A parallel index lets you verify quality and roll back safely.

Lesson: Model Changes, Re-Indexing and Drift

Running Vector Search in Production

20. What is an advantage of a vector extension in a database you already run?

  1. It is always faster than every other option
  2. Vectors sit with your data, reusing backups, access control and SQL filters
  3. It needs no storage
  4. It removes the need for embeddings
Show answer

Answer: Vectors sit with your data, reusing backups, access control and SQL filters

One system to operate often beats two, until scale demands otherwise.

Lesson: Where Vectors Live

21. How should a changed document be updated in the index?

  1. Add the new chunks and keep the old ones
  2. Re-embed it and replace its old chunks by source document ID
  3. Rebuild nothing and hope
  4. Edit the vector numbers by hand
Show answer

Answer: Re-embed it and replace its old chunks by source document ID

Leaving old chunks behind returns outdated, contradictory results.

Lesson: Updates, Deletes and Freshness

22. What is a first thing to do when vectors do not fit in memory?

  1. Switch off search
  2. Ignore the problem
  3. Delete the metadata only
  4. Apply quantisation or reduce dimensions, then consider sharding
Show answer

Answer: Apply quantisation or reduce dimensions, then consider sharding

Compression is the cheapest lever before adding machines.

Lesson: Scaling, Cost and Latency

23. How should vectors derived from confidential documents be treated?

  1. With the same sensitivity as the source documents
  2. As public because they are just numbers
  3. As anonymous data
  4. As harmless test data
Show answer

Answer: With the same sensitivity as the source documents

Embeddings can leak information about their sources.

Lesson: Security and Privacy of Embeddings

Applications of Embeddings

24. How can an item's vector be used for "more like this"?

  1. Convert it back to the original text
  2. Delete it
  3. Use it as the query to fetch its nearest neighbours
  4. Add it to the model
Show answer

Answer: Use it as the query to fetch its nearest neighbours

An item is a point in the space; its neighbours are similar items.

Lesson: Semantic Search and Recommendations

25. Why include a similarity threshold in nearest-centroid routing?

  1. To avoid embeddings
  2. To make vectors longer
  3. So off-topic inputs become "unknown" instead of a forced wrong label
  4. To speed up training
Show answer

Answer: So off-topic inputs become "unknown" instead of a forced wrong label

Nearest-neighbour methods always return something; a threshold allows abstaining.

Lesson: Classification, Routing and Few-Shot Labelling

26. What is the main limit on a RAG answer's quality?

  1. The relevance of the evidence that retrieval finds
  2. The colour of the UI
  3. The number of vector dimensions alone
  4. The length of the API key
Show answer

Answer: The relevance of the evidence that retrieval finds

If the evidence is missing or wrong, the model cannot answer faithfully.

Lesson: Embeddings for RAG and Agent Memory

Putting It Together

27. Why is exact (flat) search used first in this design?

  1. Because flat is always faster
  2. Because HNSW cannot work with 400,000 vectors
  3. To avoid embeddings
  4. To get ground truth for tuning the HNSW index and measuring recall
Show answer

Answer: To get ground truth for tuning the HNSW index and measuring recall

Approximate recall is only meaningful relative to exact answers.

Lesson: Case Study: Semantic Search for a Help Centre

28. A user searches for "time off work" but the policy says "annual leave". Which approach most directly fixes this?

  1. Exact string matching only
  2. Embedding (semantic) search, ideally combined with keyword search
  3. Increasing nprobe
  4. Using int8 vectors
Show answer

Answer: Embedding (semantic) search, ideally combined with keyword search

Semantic embeddings bridge vocabulary mismatch; keyword search still covers exact terms.

Lesson: Revision: Cheat Sheet and Self-Check

29. You upgrade the embedding model and only re-embed new documents, leaving the old vectors. What goes wrong?

  1. Nothing, vectors are interchangeable
  2. Old and new vectors live in different spaces, so comparisons become meaningless
  3. The index becomes smaller
  4. Only latency changes
Show answer

Answer: Old and new vectors live in different spaces, so comparisons become meaningless

Re-embed everything into a new index when the model changes.

Lesson: Revision: Cheat Sheet and Self-Check

30. Your HNSW index has recall@10 of 0.93 against exact search. What is a sensible next step?

  1. Switch to a smaller model without testing
  2. Declare it perfect
  3. Delete the index
  4. Raise efSearch (or index parameters) and re-measure against the target recall and latency
Show answer

Answer: Raise efSearch (or index parameters) and re-measure against the target recall and latency

Recall and latency trade off; tune until the target is met at acceptable cost.

Lesson: Revision: Cheat Sheet and Self-Check

← Back to the course