Explainer
- Published 22 November 2026
- Last reviewed 22 November 2026
- 5 min read
AI that answers from your own documents
AI that answers from your own documents works in two steps: a search finds the passages most likely to hold the answer, then a language model writes a reply from those passages. The technique is called retrieval-augmented generation.

It does not guarantee correct answers. In a 2025 Stanford study, AI legal research tools built on this technique still hallucinated between 17% and 33% of the time, so test it on your own files before anyone relies on it.
What is AI that answers from your own documents?
It is a search engine bolted to a writing engine. Products call it a knowledge assistant, a company chatbot or "chat with your files", and the technical name is retrieval-augmented generation, or RAG. Microsoft’s documentation defines it as a pattern that extends LLM capabilities by grounding responses in your proprietary content.
How does it work?
Your files are cut into passages and indexed in advance. When someone asks a question, the system finds the best-matching passages and sends them to the model along with the question.
From question to answer
- 1
Files indexed
Documents are split into passages, sometimes called chunks.
- 2
Question asked
A person types it in plain English.
- 3
Search
The system finds the passages that best match.
The right passage can be missed
- 4
Model writes
The question and the passages go to the model, which drafts a reply.
It can misread or overstate
- 5
Person checks
The reply cites its passages, and you open the source.
Two things can go wrong before you see an answer: the search misses the passage, or the model misreads it.
Microsoft’s guidance says models accept limited input, so the search must return highly relevant, concise results, not exhaustive document dumps. Passage size and search quality therefore decide most of what you get.
Where does it go wrong?
In three places, and each has a different fix.
- The search misses the passage. A passage cut from its document can lose its context. Anthropic’s example is a chunk reading "revenue grew by 3% over the previous quarter", which names neither the company nor the period. In Anthropic’s own 2024 tests, the baseline method failed to retrieve the relevant passage in the top 20 results 5.7% of the time, falling to 1.9% with its contextual method plus reranking. Those are one company’s results on its own datasets.
- The model misreads or overstates. Retrieval lowers errors but does not remove them, as the Stanford study of legal research tools showed. It is legal research only, so not a rate for your files. AI hallucinations at work has the figures and ways to design around it.
- Your files are the problem. Two versions of a policy can both be indexed, and the system may quote either. Access is the other risk. Microsoft says Microsoft 365 Copilot only surfaces organisational data to which individual users have at least view permissions. Our reading: if a payroll folder is open to everyone, answers can draw on it. Who should see what and document control for small firms cover the groundwork.
How is it different from search or a general chatbot?
| Option | What it uses | Good for | Weak at |
|---|---|---|---|
| Keyword search | Your files, matched by words | Finding the document | Reading it for you |
| General chatbot | What it learned in training, plus what you paste in | Drafting, explaining general topics | Anything only your files say |
| Answers from your documents | Your files, searched at question time | Questions answered by a passage in a few documents | Questions spanning many files, missing files, access control |
If you already use Microsoft 365, check what Copilot can do over your SharePoint files before buying anything separate.
When do you not need it?
When people can already find what they need. A tidy folder structure and a working search beat a new tool at lower risk.
- Your documents are few enough that people know where each one lives. Our rule of thumb, not a measured threshold: if a new starter can find the answer within a few minutes, leave it.
- The answer must be exact and certified, such as a contract clause or a price. Read the source, or use a lookup rule.
- Your files are out of date or contradict each other. The tool will repeat the contradiction faster. Clean the files first.
- The documents are on paper or in scans nobody has read into text.
How do you test it before you use it?
Write 20 questions from your own files, with the answers known, and run them. Set the pass mark before you start.
| Question type | How many | Example | Pass means |
|---|---|---|---|
| Answer is in one document | 8 | What is the notice period in our standard supplier contract? | Correct, and cites the right document and section |
| Answer needs two documents | 4 | Which rate applies to a weekend call-out under the current service terms? | Correct, and cites both sources |
| Answer is not in the files | 3 | What is our policy on sabbaticals, when we have none? | Says it cannot find an answer, invents nothing |
| Files disagree or one is out of date | 3 | A question on a policy with an old and a new version | Uses the current one, or flags the conflict |
| Person should not have access | 2 | A junior member of staff asks about salary bands | Shows nothing from restricted files |
Our suggestion, an opinion: allow no failures on the last two types. A single invented answer or leaked file shows a design fault, not bad luck. Baseline and acceptance tests covers setting pass marks.
What should you ask a supplier?
- Where do our documents go, and who can see them? If they hold personal data, UK GDPR applies. This is not legal advice, so take advice on the contract. For Microsoft 365 Copilot, Microsoft states that prompts, responses and data accessed through Microsoft Graph are not used to train foundation models. Ask every supplier for the equivalent in writing, and see what leaves your building when staff use AI.
- Does it respect our existing permissions? Ask how, and test it with the access questions above.
- Does every answer cite its passages? You need to open the source in one click.
- How quickly do new and deleted files take effect? OpenAI’s file search documentation notes that listing visibility can lag behind completed indexing, so a new file may not appear at once.
- Can we export the questions asked and the answers given? You will want them for the next test.
Questions people ask
RAG stands for retrieval-augmented generation. When you ask a question, a search first finds the passages in your own documents that look most relevant. Those passages go to a language model together with your question, and it writes an answer from them. The model is not retrained on your files, which is why new documents can be added without rebuilding anything.
It can reduce invented answers but not remove them. A Stanford study of AI legal research tools of this kind found they still produced wrong or unsupported answers in the authors’ tests. Require every answer to cite its source, make the tool say when it cannot find an answer, and test it on questions drawn from your own files.
It depends on the supplier’s terms and set-up. Ask where documents are stored, who can see them, whether prompts and files are used for training, and whether existing permissions carry through. If documents hold personal data, UK GDPR applies, and you should take advice on the contract and any data protection assessment. This is not legal advice.
There is no sourced threshold. As a rule of thumb, if people can find the answer within a few minutes using folders and search, a new tool adds risk without much gain. It starts to earn its place when answers are spread across many files, people ask the same questions repeatedly and the files are kept current. Test on 20 real questions first.
Further reading
- Lewis et al.: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020)
The paper that named RAG. Provenance and updating knowledge as open problems, and the index of documents as the proposal. Free.
- Magesh et al.: Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools (Journal of Empirical Legal Studies, 2025)
Tools from LexisNexis and Thomson Reuters hallucinated between 17% and 33% of the time. Legal research only. Free.
- Microsoft Learn: Retrieval-augmented generation overview (Azure AI Search)
A supplier definition, chunking, the need for concise results and security trimming. Free.
- Microsoft Learn: Microsoft 365 Copilot data, privacy and security (updated 3 November 2026)
Copilot surfaces only data a user has at least view permission to. Prompts and responses are not used to train foundation models. Free.
- Anthropic: Introducing Contextual Retrieval (19 September 2024)
Why chunks lose context, and failed retrieval rates of 5.7% falling to 1.9%. A supplier’s own tests. Free.
- OpenAI: File search guide
How a hosted file search tool works, and the note that listing can lag behind indexing. Free.
AIforCompanies · https://aiforcompanies.co.uk/insights/ai-that-answers-from-your-documents
Have a problem this does not solve?
Book a discovery call. Tell us what is slowing the business down, and we will say what we would build and whether it is worth doing.