All insights
Applied AI / RAG

Running a private RAG system on confidential documents

By RJ Data Voyage · 20 July 2026 · 6 min read

Your most valuable knowledge is probably locked inside documents you can’t paste into a public chatbot. Here is how to point capable AI at it anyway, with not a single byte leaving your own servers.

The short version

If your files hold client data, patient records, privileged advice or unpublished deals, the public chatbots are off-limits, and often unlawful to use. The usual conclusion is that modern AI just isn’t for you. It is. You simply keep it inside your own walls.

What ‘private RAG’ actually means

Retrieval-augmented generation sounds harder than it is. Instead of trusting whatever a model memorised in training, you fetch the most relevant passages from your own documents at the moment a question is asked, and hand them to the model as context. It answers from that material, and cites it.

‘Private’ is the part that matters: the model, the index and the embeddings all run on hardware you own. Nothing is sent to anyone.

You take on the engineering. In return, confidentiality is designed in, rather than promised in a vendor’s terms.

Why local, not cloud

Regulation and contracts

‘We sent your data to a US AI provider’ is not a defensible sentence in finance, law, healthcare or government.

Confidentiality

Deal terms, unpublished research, internal strategy. A private system answers ‘could this leak into someone’s training data?’ with a flat no.

Control

Public endpoints change, deprecate and re-price. A system you host behaves the same next year as it does today.

The honest trade-off: more engineering up front, and a local model won’t top the largest cloud models on raw cleverness. For grounded document questions that barely matters, because the win is in retrieval, not raw intelligence.

How it works

A private RAG system is really five stages, each of which you can tune on its own.

01Ingestion02Chunking03Embedding& indexing04Queryrouting05Generation& grounding
The five stages of a private RAG pipeline. Each one can be tuned on its own.
  1. 01
    Ingestion. Pull clean text out of a messy estate of PDFs, scans, spreadsheets and emails. A recent build handled more than twenty-five formats, OCR included.
  2. 02
    Chunking. Split documents into passages small enough to pinpoint but large enough to keep their meaning. Respect the structure; don’t chop every few hundred words.
  3. 03
    Embedding and indexing. Turn each passage into a vector and store it. Semantic search then finds the right one even when the question’s wording doesn’t match the document’s.
  4. 04
    Query routing. A precise clause lookup and a ‘summarise every supplier agreement’ question are different jobs. A good system sends them down different paths.
  5. 05
    Generation and grounding. The model answers from the retrieved passages, cites them, and says so when the documents simply don’t hold the answer.

Where these projects go wrong

Most disappointing deployments fail for the same few reasons, and ‘the model isn’t clever enough’ is rarely one of them.

Retrieval is the bottleneck, not the model

If the right passage never surfaces, no model can save the answer. Poor results almost always mean chunking or embeddings, not a weak LLM.

Confident hallucination

A plausible invented clause is worse than ‘not found’. Grounding, and permission to say ‘the documents don’t cover this’, are non-negotiable in regulated work.

No evaluation

Shipping on a handful of good demo questions is tuning blind. You need a real test set with known answers to see whether a change helped or hurt.

Underestimating the mess

Real shared drives are full of duplicates, near-duplicates, scans and inconsistent formatting. That gap, not the model, is where the effort goes.

Should you build one?

Worth it when
  • Your useful knowledge is trapped in documents, not databases
  • That knowledge is too sensitive to send to a public model
  • People currently lose hours searching by hand
  • Regulated review, contract search, internal knowledge bases, due diligence
Skip it when
  • Questions a database or dashboard already answers cleanly
  • A handful of non-sensitive files
  • You need the absolute frontier of model capability more than privacy

The discipline is scoping it to where the confidentiality constraint and the document-heavy workflow genuinely overlap. Everywhere else, a simpler tool wins.

Done well, it is unremarkable in the best way: a capable model, pointed at your own material, running entirely on kit you control. Ask it where your data went, and the answer is, simply, nowhere.

RJ Data Voyage builds privacy-first applied-AI systems: local LLMs and retrieval-augmented generation that run entirely on your own infrastructure. If you’re weighing up a private document-AI project, get in touch.