Beyond the Prompt

Module 4 — RAG

Lesson 10: Improving RAG

Last updated: 2026-10-09

Vanilla RAG is a starting point. Chunking, hierarchical retrieval, and techniques like HyDE can dramatically improve accuracy.

Lesson 10: Improving RAG

Blackboard

From basic retrieval to precision

10 min
Concept 1

Chunking

Instead of embedding whole documents, you split them into chapters, sections, or paragraphs. The vector database stores both document-level and chunk-level embeddings. This allows retrieval to be more precise — finding the right section, not just the right document.

Concept 2

HyDE: Hypothetical Document Embeddings

A clever technique: use the LLM to generate a fake answer to the user's question, embed that fake answer, and use it to search the vector database. The fake answer's embedding is often closer to the real document than the original short query would be.

Concept 3

The breadth of RAG research

Between 2020 and 2025, dozens of RAG variations were published: re-ranking retrieved documents, speculative RAG, hybrid search combining keyword and semantic retrieval, and more. The field is moving fast.

Concept 4

Is RAG future-proof?

If context windows grow to infinity, does RAG become irrelevant? Probably not. The search engine analogy holds: even if you could read the entire web, you would still want a search engine to narrow down where to look. Targeted retrieval is faster, cheaper, and provides sources.

Pause and Think

If you embed an entire 200-page document as one vector, what information do you lose?

Flashcards

Key Terms

Click or press Enter to flip a card. Review these before the practice question.

Additional Resources
Practice Question

A user's short query retrieves the wrong documents because the query embedding is too far from the relevant document embedding. Which technique specifically addresses this problem?

Does not count for certificate
Choose one answer, use the hint if needed, then check your answer.
Use the hint before checking if you need a nudge.