RAG: Answers from Company Documents vs the Warehouse
RAG lets an AI answer from company documents and cite its source, while a data warehouse computes the numbers. The difference, and which job suits which tool.

A new employee asks: 'How many days of annual leave can I carry over?' Someone else asks: 'What was the Aegean region's revenue last quarter?' Both could go to an AI assistant, but the two questions need different kinds of information. The first is written in a piece of text; the second is the result of a calculation. Mix them up and you get either a wrong number or an invented clause.
What RAG is
RAG (retrieval-augmented generation) means that before answering, a language model finds the relevant pieces of documents and puts them into its context. The paper that introduced the idea (Lewis et al., 2020) describes combining a model's pre-trained memory with a retriever that accesses a vector index; in the original work that index is Wikipedia. In a company setting, the index is your own documents. Source: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.
Which question goes to which tool
- Document question (RAG): procedure, contract clause, policy, product manual, past correspondence. The answer sits in a text and its source can be shown.
- Number question (data warehouse): revenue, stock, receivable balance, variance. The answer needs summing, filtering and comparing, and must come from a measure whose definition is written in one place.
- Mixed question: 'What is the gap between the payment term in this customer's contract and their actual collection time?' The first half comes from a document, the second from the warehouse; you have to take them from separate tools and combine them.
The risk of using RAG for numbers
RAG retrieves pieces of documents. It can pass on a number written in a retrieved piece, but if it tries to sum, filter or compare periods from document pieces, the room for error is large. 'Retrieving' a table inside a PDF report does not verify that table's definition or freshness. For numbers the model should not do arithmetic; the calculation belongs in the warehouse, and the model is left only with describing the result.
When you build a RAG
- Document inventory: which documents enter the index, who owns them, how current are they? Old and contradictory versions corrupt the answer.
- Access rights: a user must not get an answer from a document they could not normally see. Apply permissions at retrieval time, not after the answer.
- Showing the source: every answer should point to the document and section it rests on, so the user can verify.
- Saying 'not found': if no relevant document exists, the assistant should not guess.
- Testing with real questions: write down about fifty questions users actually ask, with their correct sources, and rerun them after every change.
- Personal data: if files such as HR records or customer correspondence will enter the index, do the data-protection assessment first.
Where Floemdata stands
RAG is not a Floemdata feature. In the product documents the AI assistant is on the roadmap, and one recorded design decision is that the dashboard and the assistant take their numbers from the same measure compiler. We found no record that the assistant will search company documents; that is not verified. This article is general knowledge and does not describe a Floemdata feature today.
To begin, sort the questions your staff asked over the last month into two piles: those answered by a document and those that need calculating. The ratio shows where to invest. Questions are welcome at info@floemdata.com or via Floemdata.