본문으로 건너뛰기

Mini Checkpoint — Retrieval Before Generation

Complete this checkpoint after L9.7.

1. Failure boundary​

A final answer is wrong. Give two traces:

  • one where retrieval failed before generation;
  • one where retrieval succeeded but grounded generation failed.

State what evidence distinguishes them.

2. Chunk design​

Design chunk metadata for a policy corpus. Include source identity, section, update time, access group, and stable chunk ID. Explain one failure caused by a bad boundary.

3. Embedding contract​

Explain why query and chunk vectors from incompatible embedding models should not be compared even if their dimensions happen to match.

4. Similarity​

For:

q = [1, 0]
a = [2, 0]
b = [1, 1]

calculate dot-product ranking and cosine ranking. Explain why magnitude changes one score more than the other.

5. Index​

Describe the difference between vector row number and stable chunk ID. Then explain why top-k is a trade-off, not a quality guarantee.

Give:

  • one exact-identifier query that favors lexical search;
  • one paraphrase query that favors semantic search.

Describe how you would combine them.

7. Reranking​

A relevant chunk is ranked 18th by the first stage but candidate k is 10. Can reranking place it in the final top 3? Explain.

Check your reasoning after you try
  • Separate retrieval evidence from generation evidence. If the needed chunk never entered the candidate set, generation cannot repair the retrieval miss. If the right chunk was present but the answer contradicted it, the later grounding step failed.
  • Stable chunk identity should survive index rebuilds; vector row numbers usually do not.
  • Query and chunk embeddings must share the same embedding space. Equal vector length does not prove that coordinates have the same meaning.
  • Here, dot products rank a above b (2 vs 1). Cosine also ranks a above b (1 vs about 0.707), but cosine removes the magnitude advantage along the same direction.
  • Lexical search is strong for exact identifiers; semantic search is useful for paraphrases. Hybrid retrieval combines both candidate signals before a later ranking step.
  • If first-stage candidate k=10, an item ranked 18th is absent from the reranker input. The reranker cannot promote evidence it never received.

Pass condition​

You are ready for L9.8 when you can trace a query through chunk identity, embedding/similarity, candidate retrieval, hybrid search, and reranking without relying on the generator to hide retrieval mistakes.

Lesson actions

Completion is stored locally on this device.

View progress