Answers from your documents, with the sources to prove it.
Retrieval-augmented generation (RAG) lets AI answer from your policies, contracts, manuals and wikis instead of its general training. We build RAG systems that find the right passage, cite it, respect who may see what, and admit when the answer is not there. Built AI-first and measured from day one.
What happens between a question and a cited answer
Every stage below can fail on its own. Knowing which one failed is the difference between fixing a RAG system and endlessly rewriting prompts.
Ingest
Stage 1Documents are pulled from SharePoint, Google Drive, Confluence, databases or file shares and parsed properly, including tables, headings and scanned pages that need OCR.
Chunk and index
Stage 2Content is split along natural boundaries such as sections and clauses, tagged with date, owner and access rights, then indexed for both keyword and semantic search.
Retrieve and rerank
Stage 3A question triggers hybrid search, a reranking model reorders the candidates, and permission filters remove anything the user is not allowed to open.
Generate with citations
Stage 4The model answers only from the retrieved passages, links each claim to its source, and says plainly when the documents do not contain an answer.
Evaluate continuously
AlwaysRetrieval and answer quality are scored separately against a question set, so a drop in accuracy points to a cause rather than a guess.
Why RAG answers go wrong, and what fixes them
When a RAG chatbot gives a bad answer, the language model is usually not the culprit. These are the patterns we see most when reviewing existing systems.
| Usual cause | What fixes it | |
|---|---|---|
| Misses an obvious document | A chunk split the key passage, or exact terms lost in vector search | Structure-aware chunking and hybrid search |
| Quotes an outdated policy | Old versions still indexed without dates | Version metadata, recency ranking, archive rules |
| Right document, wrong detail | Too many loosely related passages in context | Reranking and fewer, better passages |
| Garbled figures from tables | PDF parsing flattened the table | Layout-aware parsing, tables kept as structured data |
| Shows content a user should not see | Permissions checked after retrieval, or never | Access filters enforced at query time |
| Plausible answer with no source | Model filling gaps from general knowledge | Strict grounding and faithfulness checks |
Is your content ready for an AI knowledge base?
A RAG system is only as good as what it retrieves. We check these points early, because fixing content is often cheaper than tuning retrieval.
Is there one current version of each document?
Duplicates and old drafts compete to answer the same questions. Decide what counts as authoritative before indexing anything.
Does every document have an owner?
Someone must update the source when a policy changes, or the AI will keep quoting the old one, faithfully and with a citation.
Are access rights recorded in the source systems?
If permissions exist only as informal knowledge, sensitive content has to be separated before it goes anywhere near an index.
How much is scanned, handwritten or in images?
These need OCR or vision models first, which adds cost and a new source of errors to test for.
Can your experts write fifty real questions with known answers?
That set becomes the benchmark. If nobody can write it, the use case may not be clear enough yet.
RAG development measured like any other system
We start every RAG project by building the evaluation set, not the chatbot. AI drafts candidate questions from your documents in bulk, your subject experts correct and approve them, and the finished set measures retrieval recall and answer faithfulness on every change. It is the quickest way to stop debating whether the system "feels" accurate.
Grounding matters most where claims carry consequences. SwishX, an AI content platform for pharma and medtech marketing, links claims to approved evidence so reviewers can check each statement. The same principle holds for an HR policy assistant or a contracts knowledge base: an answer without a traceable source should not be trusted.
Delivery follows the same AI-native habit. Parsers for awkward file formats and connectors to your document stores are repetitive code that AI coding agents handle well, which frees senior engineers to spend their hours on retrieval design and access control. If your documents cannot leave your environment, the whole pipeline can run on a privately hosted model.
Questions we often hear
What is RAG in AI?
Retrieval-augmented generation is a technique where an AI system first searches a set of documents for relevant passages, then writes an answer using only those passages. It lets a general model answer questions about your private, current information without retraining, and makes citing sources possible.
Is RAG better than fine-tuning a model?
For answering questions from company knowledge, RAG is usually the better starting point: it costs less, reflects document changes as soon as they are re-indexed, and can show sources. Fine-tuning suits teaching a model a style, format or specialised task. Our RAG vs fine-tuning guide covers when to combine them.
How accurate can a RAG system be?
Accuracy hinges on document quality and how specific the questions are, which is why we measure against your own question set rather than quoting a generic figure. A well-built system answers most in-scope questions correctly and declines the rest. Human review is still wise for high-stakes answers.
Do we need a vector database for RAG?
Not necessarily. Many projects work well with vector search added to a database you already run, such as PostgreSQL with a vector extension, or a search engine that supports hybrid queries. Dedicated vector databases make sense at larger scale or with demanding latency requirements.
Can a RAG chatbot respect document permissions?
Yes, if permissions are part of the design from day one. Access rights are stored with each indexed passage and enforced at query time, so users only retrieve what they could open in the source system. Adding permissions afterwards is one of the most common and serious RAG mistakes.
Related reading and tools
Tell us what your people keep asking.
Where do your documents live, who needs answers from them, and how sensitive are they? Answer those three and we will come back within 24 hours with a realistic view of accuracy, effort and a sensible starting point.
Working with companies globally · Response within 24 hours