Tools-First, Then RAG
Check what shape your knowledge is in before you choose search, then pick the simplest way to reach each source.
Description
Before you build RAG (retrieval-augmented generation), check whether the knowledge really needs search at all. Data that lives in a database or behind an API is best reached with a direct query or API call. A small, stable set of text can just be pasted into the prompt. Only large piles of unstructured text actually need search over embeddings. Reaching for RAG by default wastes effort and gives fuzzy answers in cases where a direct query would have been exact.
When to apply
Use this when you start any agent or app that answers from a body of knowledge: a support bot, an internal Q&A tool, a docs helper, a policy assistant. Run it before you commit to a vector store. Don't apply it if you already know the knowledge is large and unstructured, because then RAG is the right choice from the start.
What it involves
- Inventory the knowledge
- Sort each source by how you reach it
- Build the tools first
- Paste in the small sets of text
- Build RAG only for what's left
- Measure correctness end to end
Open the full interactive page →
Diagram, neighbourhood map, code examples, related patterns and full provenance.