Course overview

Keep meaning intact when you retrieve

A useful sentence can become misleading when cut apart

Suppose a menu says “Peanut noodles: contains peanuts. Tofu rice bowl: no peanut ingredient listed; shared kitchen.” A poor split can separate a dish name from its warning. Chunking divides documents into searchable pieces while preserving enough context to understand each piece.

For this small menu, use one complete item record as a chunk: name, description, tags, source, and freshness. Do not join a warning to a different dish just because it is nearby in the source.

Check your understanding

How should you chunk a small menu for this prototype?

Similarity finds candidates, not truth

An embedding represents text as numbers that can be compared for semantic similarity. Keyword search matches terms; semantic retrieval can connect related wording. Neither proves that a dish satisfies a dietary requirement.

Hybrid retrieval combines lexical and semantic signals. A reranker reorders retrieved candidates using another relevance assessment. Add either when measured misses justify the extra complexity. The lab’s transparent keyword score gives us an inspectable baseline, not a disguised embedding model.

Check your understanding

Match the retrieval component to its job.

Inspect retrieval before blaming the answer

If the right item never reached the answer stage, rewriting the answer prompt may not fix the problem. Inspect the query, candidate records, exclusions, and final context.

Try “tofu” versus “plant based” in the lab. A keyword mismatch is an observable limitation. You can add a small synonym rule as a learning exercise, then discuss when semantic retrieval would generalize better. Keep the dietary filter independent of the relevance score.

Check your understanding

The answer omitted the right tofu dish. What do you inspect first?

Build checkpoint

Open the Retrieval Lab and follow the practice above. Each lab explains its inputs, its actual logic, and its limits. Save your observations below; your check-ins and reflection remain in Product Academy.

For an AI-assisted code change, download the lab bundle from the lab page. Ask your coding assistant to explain the relevant function first, change one behavior, and add one test that could fail. Compare the result with your prediction.

Save your experiment and check-in

Record your prediction, what you tried, what happened, and the evidence for your conclusion. Name one thing you can now do independently and one uncertainty to revisit.

Key takeaways

  • Preserve item identity and caveats when chunking.
  • Similarity is a candidate signal, not proof.
  • Diagnose retrieval misses before rewriting generation prompts.
Ask AI
AI Learning Assistant