RAG for Private Company Data: A Practical Architecture
RAG for private company data: one narrow use case, permission boundaries, retrieval tests, human review and cost caps for Australian product teams.

RAG for private company data lets staff ask questions in plain language and get answers drawn only from documents they are allowed to read, with the source named. Retrieval-augmented generation (RAG) finds relevant passages in your own files at question time and hands them to a language model to write the answer. The model is not retrained on your data, so quality depends heavily on retrieval and permissions, not only on the model.
This guide gives Australian product owners and development leads a practical architecture: one narrow use case, permission boundaries, retrieval tests, human review and cost controls. It complements our guide to a local LLM for business, which covers running a model on your own hardware, and our guide to an AI chatbot for a business website, which covers a spending cap on a public assistant.
Key Takeaways
- Start with one document set, one user group and one kind of question, and widen only after a fixed test set passes.
- Apply permissions at retrieval, before the model sees any text.
- Test retrieval and written answers separately, with pass marks agreed before the build.
- Keep a person on answers with no source and on anything that triggers an action, and set a monthly cost cap.
What Does RAG Add to a Local Model or a Chatbot?
RAG changes what the model is shown at question time, not what the model is. A 2020 research paper, Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, described the pattern.
Fine-tuning changes a model's behaviour using your examples. RAG suits documents that change weekly, answers that must cite a source and files that different people may read. If your whole content set fits inside one prompt, skip retrieval and the index entirely.
Which RAG for Private Company Data Use Case Should Come First?
The best first use case is an internal assistant for one team, answering one kind of question from a short list of sources. Support leads asking about product procedures fit well: the sources are the runbook, release notes and written-up resolved tickets, and a wrong answer costs minutes rather than a customer. Write these decision inputs down before choosing any tool:
- Sources. Which systems hold the documents, who owns each and how often does it change?
- Audience. Which roles may ask, and which documents may each role read?
- Questions. Collect real ones from the team and mark those the sources cannot answer.
- Consequence. What happens if an answer is wrong and nobody notices?
- Ceiling. What monthly spend and response time are acceptable?
Leave HR files, contracts and personal information out of phase one until the permission model has passed its own test.
How Does a Practical RAG Architecture Fit Together?
A practical architecture has six stages. The index can be a dedicated vector database, a Postgres extension or a search service, and that choice matters less than the stages around it.
- Ingest. Pull documents on a schedule, record version and owner, mask personal information the assistant does not need.
- Split. Cut documents along headings and numbered steps, and attach source, version, owner and the groups allowed to read each passage.
- Index. Store passage text, embedding and metadata together, so a permission change applies to the passage itself.
- Retrieve. Filter by the user's permissions first, then search, then keep the few best passages. Pair meaning-based search with full-text search so exact codes and acronyms still match.
- Answer. Give the model the question and passages, and instruct it to cite them and to say so when the sources are silent.
- Review and log. Record question, passages, answer, cost and reviewer decision so every answer can be traced.
Where Do Data and Permission Boundaries Belong?
Permissions belong at retrieval, before any text reaches the model. OWASP's guidance on vector and embedding weaknesses lists unauthorised access and data leakage first among its RAG risks and recommends permission-aware stores with strict partitioning between user groups.
- Copy permissions with the content. Store allowed groups on every passage and re-sync them when the source changes, or a revoked user keeps access through the index.
- Deny by default. A passage with no recorded permissions goes to nobody.
- Filter on every query. Microsoft's documentation on security filters in Azure AI Search says the application must authenticate users, apply filters to every query and prevent bypasses. The same discipline applies to any index.
- Treat ingested files as untrusted. OWASP describes hidden text in a document steering the model, and recommends validating documents before they enter the knowledge base.
Australian guidance adds to this. The OAIC's guidance on commercially available AI products points to APP 11 on protecting personal information, asks where cloud servers sit and whether personal information could be disclosed outside Australia, and says a local or on-premises set-up is likely to be more privacy-preserving. The ACSC's Engaging with artificial intelligence adds two actions: learn how an AI tool uses and stores your data, and check its results. This is design input, not legal advice, and nothing here guarantees security.
How Do You Test Chunking and Retrieval Before Launch?
Test retrieval separately from the written answer. If the right passage never reaches the model, no prompt will rescue the answer, and judging both together hides which stage failed. Build a fixed test set before the build: real questions, each paired with its answering passage, plus questions the sources cannot answer and questions a given role must not be able to answer. Then measure four things:
- Retrieval. Did the correct passage reach the model, and how much of what was sent was irrelevant? The Ragas metric list calls these context recall and context precision.
- Grounding. Does every claim appear in the cited passages? Ragas calls this faithfulness.
- Refusal. Does the assistant decline when the sources are silent?
- Permissions. Do restricted questions return nothing from restricted documents, for every role?
Most retrieval misses start with chunking, where passages cut a procedure in half or drop the heading naming the product. Change one setting at a time and re-run the test set.
Acceptance gate. Agree pass marks with document owners before testing: zero permission leaks across every role, every cited source opens and supports its answer, and correct-passage and refusal rates meet figures your team chose in advance. No standard sets those figures, so write your own and hold them fixed while you tune.
Where Does Human Review Belong, and What Does It Cost?
Human review belongs on any answer the assistant cannot back with a source and on any answer that leads to an action outside the chat. The OAIC guidance says a human user should verify the accuracy of personal information obtained through AI and be able to overturn decisions made. Keep a first release read-only: it answers and cites, and sends, edits or approves nothing. Treat each flag from a document owner as a defect in the source, the splitting or the retrieval, and add the question to the test set.
Cost has four drivers: re-indexing, passages sent per question, model output and reviewer time. The NIST AI Risk Management Framework and its Generative AI Profile help teams identify generative AI risks and plan actions for them. Set cost controls early:
- Limit passages and output length to what the test set allows.
- Re-index only changed documents by tracking versions.
- Set a monthly budget with an alert before the limit and a switch that turns the assistant off at the cap.
- Log cost per answered question each month.
Decision Guide: Which Choice Fits Which Situation?
- All content fits in one prompt - skip retrieval and use a cached prompt, so there is no index to secure.
- Documents have different readers - filter by stored permissions before retrieval, and leave out any source whose permissions you cannot map.
- Data must stay inside your environment - host the index and a local model yourself, then test whether a smaller model meets your gate.
- Answers could trigger an action - require human approval before anything leaves the chat.
Which Failure Modes Should You Monitor?
- Stale answers - an old policy is cited after a new one replaced it. Track cited-document age and re-index lag.
- Permission drift - a person changes role but passages keep old groups. Run the restricted-question tests on a schedule.
- Silent retrieval misses - a new document type or acronym stops matching. Track the share of answers with no cited source.
- Citation mismatch - the source opens but does not support the claim. Sample answers weekly for a human check.
Related Resources
- scoping AI from one workflow
- private AI on your own hardware
- OAIC guidance on AI products and privacy
- OWASP on vector and embedding weaknesses
- NIST AI Risk Management Framework
- ACSC guidance on engaging with AI
Common Questions About RAG for Private Company Data
1. Is RAG safe to use with confidential documents?
RAG is as safe as its permission filter, hosting choice and logging. Test for leaks on every role. That reduces risk without guaranteeing security.
2. Do we need to fine-tune a model as well?
Usually not at the start. RAG supplies current facts and sources, while fine-tuning changes how a model writes or classifies. Add tuning only if a test shows a gap that better retrieval cannot close.
3. How do we know the assistant is ready to release?
It passes the gate you wrote before testing: no permission leaks, citations that support the answers and retrieval and refusal rates at the marks your team set.
4. Who should review the answers?
The people who own the source documents. They can tell a wrong answer from a missing or outdated document, and they can fix the source.
Write the Test Set Before the Build
RAG for private company data works when the boundaries are drawn before the model is chosen. Pick one team and one source set, write the test set and pass marks first, then build the six stages and keep a person on anything unsourced. For teams weighing a build, the AI-powered platform options page lists advanced RAG systems grounded in a company's own knowledge base among the work 9Byte does.


