When is retrieval (RAG) not enough, and what should you use instead?
How basic retrieval works, and where it stops
Basic retrieval splits your documents into chunks, converts each chunk into a numerical representation, and finds the chunks closest in meaning to the question. The model then writes its answer from those chunks. This is a strong design for handbooks, policies and knowledge bases, where the answer usually sits in one place.
The design assumes the answer is contained in a few passages. When it is not, retrieval returns the wrong chunks or too few of them, and the model can answer confidently from partial evidence without signalling that anything is missing.
Which questions need more than matching text
Some questions require the system to count, filter, sort or join information, not just find it. Ask whether the answer depends on every record in a set, rather than on one passage.
- Totals and averages across many records, such as the revenue for one region in a chosen period.
- Comparisons between two groups, such as which product is returned more often than another.
- Filters on structured fields, such as all open quotes above a set value, or customers who have not ordered recently.
- Multi-step lookups, where the first answer decides the next question, such as finding a customer’s latest invoice and then its payment status.
- Questions where the latest state matters and the documents describing it are out of date.
Option one: let the model query the data through tools
For structured data such as orders, invoices or CRM records, the most accurate design is to give the model a tool that runs a database query. The model turns the question into a query, the database returns exact rows, and the model explains them. The database does the arithmetic, not the language model, so totals are exact.
Keep the tool narrow. Offer a small set of named queries, or a read-only query tool limited to approved tables, and return results with the query shown beside them.
Option two: agentic retrieval, where the model plans its searches
In agentic retrieval, the model does not get one search. It decides what to look for, runs a search, reads the results and searches again based on what it found. This handles multi-step questions, such as finding the policy that applies to a contract and then the exceptions listed in a later amendment.
Agentic retrieval needs limits. Cap the number of searches for each question, log every search, and stop with a clear message when the sources do not answer the question. Without limits, the loop can repeat a search that never returns anything new.
Option three: pre-computed summaries and aggregates
Many totals and comparisons do not need to be worked out at question time. A scheduled job can calculate the figures your team asks for most often, store them in a summary table, and let the model read that table. The answer is fast, inexpensive and consistent, because every question about last month’s revenue reads the same stored figure.
The trade-off is coverage and freshness. A summary table only holds the questions you planned for, and it is only as current as its last refresh. Show the time of that refresh next to every answer.
How to choose and test the right design
Match the design to the question. Test each design with a list of real questions, including the ones your team finds hardest, and record whether each answer was right, partly right or wrong. Check any figure against the system of record before you trust it, especially for money or compliance.
- Use basic retrieval when the answer lives in one passage of a document set.
- Use database tools when the answer is an exact figure or a filter over records.
- Use agentic retrieval when the answer needs several steps across sources, with limits in place.
- Use pre-computed summaries when the same figures are requested again and again.
How Hundred Seas helps
Hundred Seas is a product studio in Taipei. We build AI agents and AI CRM systems on Claude and on OpenAI models, and we choose each model on cost, speed, quality and where your data has to stay. When a question needs exact figures from your records, we typically combine read-only database tools with a retrieval layer for documents, and we test both against questions your team already knows the answers to.
Work with us begins with a scope step of about one week at a fixed price, ending in a written plan, a clickable prototype and a firm quote. The build runs in weekly releases of working software over two to four weeks, and a monthly run plan keeps the data access, definitions and models current.
Questions
- Can I solve this by adding more documents?
- Adding documents helps only when the answer is written in one of them. If the question needs a count or a comparison across many records, more text makes retrieval noisier rather than more accurate. Decide what kind of question you are answering first, then choose the data design to match it.
- Does a larger context window solve the problem?
- A larger context window lets the model read more text at once, but it does not make arithmetic exact or filtering reliable. For totals over a database, a query returns the exact figure faster and at lower cost. Check your model provider’s current documentation for the limits that apply to your model.
- Is agentic retrieval safe to use on company data?
- It can be, with the same controls you would apply to any agent: read-only access, narrow permissions, a cap on steps, logging of each search and a clear rule for when the system must stop. Limit the sources to documents each user is allowed to see, and test with questions the system should refuse.
- How do I know the database answer is right?
- Compare it with a figure the team already trusts, such as a finance report, for a sample of questions. Show the query or filter beside each answer, so a staff member can check the logic. Track every disagreement and fix the underlying definitions before the system is opened to more people.
- Do I need a vector database for every project?
- No. A vector database helps when you need to find similar passages across large document collections. Many structured questions need only a relational database and a few well-named queries. Choose storage that matches the questions, and add infrastructure only when your test questions show that you need it.