A finance director asks two questions: “What does our credit policy say?” and “Which customers exceeded their credit limits yesterday?” Both involve company information, but they need different evidence and different checks.
Document retrieval is useful for finding relevant policy text. A validated database tool is usually a better starting point for calculating an operational total over structured records. Some assistants need both. The architecture should follow the question and the source of truth, rather than treating every enterprise AI task as a document-search problem.
For legacy software, this distinction helps prevent a common mismatch: a convincing explanation built from old reports when the user expected a current business answer.
What is RAG, and what does a database tool do?
Retrieval-augmented generation, or RAG, supplies retrieved information to a model so it can answer with relevant context. Microsoft's RAG overview discusses retrieving relevant content and preparing it for useful answers.
A database reporting tool runs an implemented calculation over approved structured data. It may return a customer balance, an order count or a stock position, together with scope and freshness information.
These are not mutually exclusive categories. RAG can include structured sources, and a tool can retrieve documents. The practical distinction is between finding evidence to explain and executing a defined calculation to obtain an operational answer.
Which approach fits the business question?
| Question | Evidence needed | Suitable starting point |
|---|---|---|
| What is our returns policy? | Approved policy and effective date | Document retrieval with source references |
| What was net sales last month? | Defined transactions and adjustments | Validated aggregation over structured data |
| Why was this return rejected? | Decision record plus applicable policy | Combined retrieval and authorised record lookup |
| Which orders are late? | Order state, promise date and exceptions | Bounded operational reporting tool |
| How do staff process a return? | Current operating instructions | Document retrieval with version control |
A weekly PDF report might contain the answer to an old sales question. It cannot establish today's total unless its coverage and freshness match the request.
Ask what the user expects the answer to mean. “Current” could mean the last completed overnight update, the latest posted transaction or the live source state. The integration should disclose which meaning it can support.
Why not put the whole database into a vector index?
A similarity search can identify relevant content, but retrieving a handful of similar records is not the same operation as counting every qualifying transaction. An index also needs an update strategy and permissions appropriate to the copied data.
For an illustrative receivables question, searching for invoices associated with a customer may retrieve useful records. Establishing the total outstanding balance additionally requires the complete eligible set, allocated receipts, credit notes and a reporting date.
If a search pipeline provides those capabilities reliably, evaluate it on that basis. Do not assume that adding embeddings has resolved financial definitions or reconciliation.
A business entity layer can make a structured calculation explicit and reusable, regardless of which assistant presents its result.
How should a combined answer work?
Imagine a fictional manufacturer asks, “Which orders are overdue, and what escalation process applies?” The assistant needs an operational result and the current escalation policy.
A sensible design separates the evidence:
- Obtain overdue orders through an authorised tool using the agreed definition of overdue.
- Retrieve the escalation procedure that applies to the relevant business unit.
- Present the operational result with its reporting timestamp.
- Cite the policy version separately from the order information.
- Flag missing or conflicting evidence instead of inventing a recommendation.
If the policy refers to working days while the operational query uses calendar days, resolve that mismatch before presenting a joined explanation. Fluent prose should not conceal incompatible definitions.
What should you test differently?
For document answers, check whether the relevant passage was retrieved, whether it is current and whether the response accurately represents it. A genuine citation can still point to an obsolete policy.
For structured tools, check completeness, joins, filters, calculation rules and the expected result. A correctly executed query can still implement the wrong business definition.
For combined answers, check source selection and the final explanation. Can a reviewer see which facts came from the policy and which came from operational records? Does the assistant acknowledge that the order data was refreshed overnight?
Use negative tests too. A branch manager should not obtain restricted records simply because a related policy document is visible to everyone. The security guide covers permission boundaries across the whole data path.
What does this mean for existing ERP software?
An older ERP can remain the operational source while an integration layer supplies approved reporting capabilities. Separately, a knowledge retrieval system can support manuals, procedures and product documentation.
You do not necessarily need both in the first release. Start with the questions users actually struggle to answer and select the smallest architecture that can provide dependable evidence.
For example, stock-by-location reporting may need structured data and clear allocation rules, while a warehouse procedure assistant may primarily need current documents. Combining them becomes valuable only when the workflow benefits from both.
Decide from evidence, rather than a technology label
Bring representative questions and identify the record, report or document that should settle each answer. Mark the ones requiring exact totals, live state, explanatory text or a combination.
Tranz Technologies offers RAG development for approved knowledge access and Legacy AI Integration for assessed access to existing business systems. The right boundary depends on the answer your team needs to make a decision.
Discover what AI can do with your existing software.
Bring one reporting challenge and assess the data access, business rules and security requirements.
Discuss your project ↗