Lesson 1.3

When RAG is the wrong answer

If the whole corpus fits comfortably in context and cost allows, sending it directly is simpler and more accurate than any retrieval pipeline you could build.

11mAdvanced6.8k students

Overview

Not every question is a search

If the whole corpus fits comfortably in context and cost allows, sending it directly is simpler and more accurate than any retrieval pipeline you could build.

Aggregate questions — how many, what is the trend, which is the largest — are not retrieval questions. Retrieval returns a handful of passages; the answer requires scanning everything. That is a database query.

Retrieval also struggles with questions that need the whole document, like summarising a contract. Chunk-level search returns fragments, and a summary of fragments is not a summary.

In this lesson you will:

  • Compare RAG with a long context window
  • Recognise questions retrieval cannot serve
  • Consider structured queries instead

Resources

Previous Lesson
Next Lesson
When RAG is the wrong answer — Retrieval-Augmented Generation in Practice — Vertex