What does a RAG solution over your own documents cost?
A RAG solution that lets you query your own documents typically costs SEK 300,000–1.5 million to build. 40–60 percent of the budget goes to data cleanup and structure rather than AI technology. On top of that comes an operating cost per query for embedding, retrieval, and answer generation, usually fractions of a krona to a few kronor.
Being able to ask questions against a company’s own knowledge – contracts, manuals, policies, project documentation – is the most common AI use case at Swedish companies right now. The technology behind it is called RAG, retrieval-augmented generation: the system retrieves relevant passages from your documents and lets a language model formulate the answer from them. In 2026, a solution like that typically costs SEK 300,000–1.5 million to build. Where you land in that range is decided almost entirely by your documents, not by the AI technology.
The pricing: the documents call the shots
| Starting point | Typical cost | Characteristics |
|---|---|---|
| Well-structured document set | SEK 300,000–600,000 | One source, consistent format, clear ownership, open access |
| Mixed starting point | SEK 600,000–1,000,000 | Multiple sources, varying quality, some permission control |
| Scattered and sensitive data | SEK 1,000,000–1,500,000 | Many systems, duplicates and outdated content, per-document permissions |
Half the budget goes to the data, and that’s as it should be
Expect 40–60 percent of the budget in a RAG project to go to data cleanup and structure rather than AI. That sounds backward but is entirely logical: the system can never answer better than the material it retrieves from.
The work that falls under that line item:
- Inventory. Which documents exist, where, and which are actually current?
- Cleaning out duplicates and outdated content. Three versions of the same policy produce three different answers – the system doesn’t know which one applies unless someone tells it.
- Structure and chunking. Documents need to be split into searchable passages with metadata like date, owner, and validity.
- Permissions. Who gets to see what? Payroll data and board minutes shouldn’t show up in the wrong employee’s answer.
A vendor that puts nearly the entire quote toward AI components and a single line for “data preparation” has either misjudged your starting point or is pushing the cost ahead of them onto change-order invoices.
The operating cost: what does a query cost?
Every query to a RAG solution has three cost steps: embedding the question (making it searchable), retrieval (finding relevant passages), and generation (formulating the answer with a language model). Embedding and retrieval cost mere fractions of a krona in practice; generation is what dominates the cost.
A worked example: assume an answer uses on average the equivalent of 3,000 tokens in (question plus retrieved passages) and 500 tokens out. With a mid-tier model, the cost often lands around SEK 0.05–0.15 per query; with a top-tier model, maybe SEK 0.50–1.50. If 200 employees ask 5 questions a day, that’s 1,000 queries daily – somewhere between a couple hundred kronor and just over a thousand kronor a month with a cheaper model, or SEK 10,000–30,000 with a top-tier model. On top of that comes hosting, the vector database, and indexing, often SEK 3,000–15,000 a month.
The point isn’t the exact figures – model prices move fast – but that the math should be done before the decision, using your volumes and your model choice.
What a complete solution includes
Beyond the search-and-answer function itself, a production RAG solution needs a number of parts that rarely show up in the demo but decide whether the tool can be trusted:
- Source citations in every answer, so the user can verify against the original document.
- Automatic re-indexing when documents are created, changed, or removed – otherwise the knowledge base starts aging from day one.
- Permission filtering per user, connected to your identity solution.
- Logging and tracking of which questions get asked and which ones don’t get good answers – that’s your best map of which documents are missing or need improving.
- An evaluation set of scored questions that runs after every change, so quality is measured instead of assumed.
Those are the parts that separate an internal tool people trust from a demo that impresses for two weeks.
A good way to start is with a scoped PoC on your messy reality, not on a cleaned-up selection, so the data cleanup need shows up in numbers before the main investment is decided. Want to know where your starting point places you in the price range? Get in touch and we’ll look at your document set together.
Frequently asked questions
What does RAG mean?
RAG stands for retrieval-augmented generation. Instead of the language model answering from its general memory, the system first retrieves the most relevant passages from your own documents and lets the model formulate the answer from them. That gives answers grounded in your knowledge, with source citations.
Why not just upload the documents to ChatGPT?
For a handful of documents, that works. But a business solution requires permission control, automatic syncing when documents update, source citations, logging, and control over where the data ends up. That difference, not the AI model, is what makes a RAG solution cost money to build.
How are answers kept current as documents change?
The solution needs an indexing pipeline that automatically catches new and changed documents, for example through a connection to your intranet or document system. Without it, the knowledge base ages fast and trust in the answers disappears. Require that automatic updating is included in the quote.
Can a RAG solution give wrong answers?
Yes. The most common failure is retrieving the wrong or outdated passages and building a well-formulated answer on the wrong source material. The risk is reduced with good data cleanup, source citations in every answer, and an evaluation set of scored questions that runs regularly, but it never disappears entirely.
How long does it take to build a RAG solution?
A scoped solution against a well-structured document set often takes 2–3 months. If the documents are scattered across many systems, of mixed quality, or permission-sensitive, expect 4–6 months, most of which goes to the data work rather than the AI part.