Skip to slide
Chapter 7 · Retrieval: RAG vs Tools vs Long Context
62 / 191

CHAPTER 07 · Retrieval: RAG vs Tools vs Long Context · 3 / 6

When to add search (the hybrid)

Tool-based retrieval assumes the model knows what to fetch. When the corpus is large enough that the model can't enumerate it, give it discovery tools:

  • A list tool ("what documents are in this project?") so it can see what exists.
  • A search tool, which, under the hood, might be keyword search, full-text search, or vector search. This is where RAG techniques re-enter: a search tool backed by embeddings, exposed to the model as just another tool it can call.

This hybrid, tools for reading and acting, plus a search tool (possibly RAG-powered) for discovery, scales from a handful of documents to large corpora while keeping the model in control of retrieval. The crucial framing: RAG becomes a tool the model can choose to call, not the mandatory front door for every query.

← → arrow keys work too