In this guide
Every small business has the same quiet problem. The answers exist, but they are buried in a staff handbook, a folder of supplier contracts, last year's pricing sheet and an email thread nobody can find. People ask the same questions again and again, and the person who knows the answer is busy. Retrieval-augmented generation, usually shortened to RAG, is the most common way to let an AI assistant answer those questions from your own files instead of from whatever it half-remembers from the internet. This guide to RAG for small business documents explains how it works in plain language, what a good answer looks like, why a refusal path is essential, and how to test the thing before anyone relies on it. You can watch a scripted version in the simulated AI integration demo.
What RAG means in plain language
A language model on its own answers from patterns it learned during training. It knows nothing about your refund policy or your onsite safety rules, and when it is asked it may produce something fluent and wrong. RAG changes the order of work. When someone asks a question, the system first searches your documents for the passages most likely to contain the answer. It then hands those passages to the model together with the question and instructs it to answer using only that material.
Think of an open-book exam. The model is the student, your documents are the book, and the retrieval step is the student flipping to the right pages before writing anything. The quality of the answer depends heavily on whether the right pages were found, which is why most of the engineering effort in a RAG project goes into the finding, not the writing.
The short version: RAG does not teach the model your business. It lets the model read the relevant page of your files at the moment of the question, then answer from that page.
How the pipeline works, step by step
Under the hood there are two phases. One happens ahead of time, when documents are prepared. The other happens each time someone asks a question.
- Collect. Gather the files you want the assistant to know: PDFs, Word documents, web pages, spreadsheets exported to text. Decide who owns each source and which version is current.
- Split. Cut each document into passages, often a few paragraphs long, keeping the title, section heading and page number with each piece so it can be cited later.
- Index. Store the passages in a search index. Many systems use embeddings, which are numeric representations that let the search match meaning rather than exact words, often combined with ordinary keyword search.
- Retrieve. When a question arrives, find the handful of passages that best match it. Filter them by what the person asking is allowed to see.
- Answer. Ask the model to write a short reply using only those passages, with a reference to each one it used.
- Check. Decide whether the retrieved material was good enough. If not, return a refusal and route the person to a human or a form.
None of these steps is exotic. Open-source tooling for each of them is widely used and popular on GitHub, which is a useful sign of maturity, though popularity is not the same as proof that a particular setup suits your business. The craft is in the details of your own documents.
What a good answer looks like: citations
An answer without a source is a claim you have to take on trust. An answer with a source is a claim you can verify in a few seconds. For a business tool, that difference decides whether staff use it or quietly go back to asking a colleague.
A good answer in a RAG assistant has four features. It is short and directly answers the question asked. It names the document and section it came from, ideally with a link that opens the file at the right page. It distinguishes between what the documents say and anything the assistant is inferring. And it shows the date or version of the source, because a correct answer from an out-of-date policy is still a wrong answer today.
| Question | Weak answer | Strong answer |
|---|---|---|
| How many days notice for a cancellation? | "Usually 48 hours." | "Customers must give 48 hours notice (Booking Terms v3, section 4.2)." with a link to the page. |
| Can I approve a refund over the limit? | "Probably, ask your manager." | "The documents set the limit at the figure in the Refund Policy, section 2. They do not say who may approve above it, so please ask the owner." with the source. |
| What is our policy on remote work in another country? | A confident paragraph with no source. | "I could not find a policy on this in the documents I can see. Please contact HR." |
The third row is the most important. It brings us to the refusal path.
The refusal path: when the assistant should say it does not know
Models are built to produce text, so left alone they will happily fill a gap with something plausible. The defence is to design the refusal in from the start. If retrieval returns nothing relevant, or only weak matches, the assistant should answer with a plain statement that the documents do not cover the question, and then offer a useful next step: the name of the person to ask, a link to the contact form, or a prompt to rephrase.
There are three common refusal cases to plan for.
- Not found. The topic is simply not in the documents. Say so, and log the question, because a pile of not-found questions is a free list of documents you should write.
- Not allowed. The answer exists but the person asking lacks permission to see it, such as salary bands or another client's contract. Respect the same access rules your file storage already has.
- Out of scope. The question is about something the assistant was never meant to handle, such as legal advice or a medical question. Decline and hand over to a human.
You can step through all three on the AI integration demo, where the answers are scripted so you can see the behaviour without any real model involved. The page is labelled as simulated for that reason: it shows the shape of the experience, not the output of a live system.
Where small-business RAG projects go wrong
Most disappointing results trace back to the documents rather than the AI. A few patterns come up repeatedly.
Contradictory versions. The folder holds Pricing_2024, Pricing_2025 and Pricing_FINAL_v2. The assistant cannot know which one is right unless you tell it. Archive old files or tag each one with a status and an effective date.
Scanned images instead of text. A photographed contract has to go through text recognition first, and errors there flow straight into answers. Check a sample of the extracted text before indexing.
Tables and forms. A price list laid out in a table can lose its structure when it is split into passages. Test the questions that depend on tables specifically.
Passages cut in the wrong place. If a rule and its exception end up in different passages, the assistant may retrieve only the rule. Keep related text together and keep headings attached.
Over-broad access. If everything is indexed into one pool, a junior member of staff could ask a question and get an answer drawn from a document they could never open. Carry permissions through to retrieval.
Treating retrieved text as instructions. A document, or an email pasted into the folder, might contain wording like "ignore your previous rules". Retrieved content should be treated as data to quote, never as commands. This is part of the prompt-injection topic covered in our guide to agent guardrails.
How to test it before anyone relies on it
You do not need a research lab to evaluate a document assistant. You need a list of real questions and a sensible way to mark the answers. Collect twenty to fifty questions that staff or customers actually ask. For each one, write down the correct answer and the document it should come from. Include a handful of questions that the documents cannot answer, because the right result for those is a refusal, and include a few that touch restricted material.
Run the whole list whenever anything changes: new documents, a different model, a changed setting. For each question, mark three things separately. Was the right passage retrieved? Was the answer faithful to it? Was the citation correct? Keeping those apart tells you whether to fix the search or the writing. Keep the scores as your own record and watch whether they move in the right direction. We deliberately do not quote accuracy figures here, because they depend entirely on your documents and your questions, and any universal number would be invented.
The demo includes a small evaluation panel in the same spirit: a set of golden questions marked pass or fail, so you can see what a regression check looks like.
Privacy, data location and who sees what
A RAG system moves your documents through several places: the file store, the index, and usually a model provider. Before you start, write down where each copy lives, who can read it and whether the provider keeps or learns from what is sent. Remove anything the assistant does not need. Personal data in HR files and customer records deserves particular care, and you should be able to delete a document from the index when it is deleted from the source.
For Irish and EU teams
Under the GDPR, a document assistant that handles personal data needs a lawful basis, a clear data flow and an updated privacy notice, and the Data Protection Commission has published guidance on AI and data protection. EU-region storage and processing options are worth asking about from day one. On the EU AI Act, our research notes that the transparency duties in Article 50, such as telling people when they are talking to an AI system, were scheduled for 2 August 2026, with a later date of 2 December 2026 for some generative systems already on the market. Dates have moved before, so check the current position with a qualified adviser. Most small-business document assistants are low-risk uses, but the disclosure point applies to customer-facing chat.
A sensible first project
Start narrow. Pick one audience, such as new staff or the support inbox, and one body of documents that is reasonably clean, such as the staff handbook and the product FAQ. Define the refusal behaviour first, build the question list, then connect the retrieval. Put it in front of five people for two weeks and read every not-found question they generate. That log will tell you whether to widen the scope, fix the documents or stop.
If you would like help, our AI automation and agents service covers document answers and the wider integration around them, and the AI demos let you try our own apps first. For the full list of what we offer, see our services, or tell us about your documents and we will suggest a starting scope.
Try it live
Open the real thing: demos run in a new tab with sample data, apps link to their own page.
- ALive demoAI integration demo: RAG simulatorA scripted question, retrieved passages with citations and a not-found case. Simulated, nothing sent.
- ZBrowse allZenocta AI demosTry KnowOcta and AgentOcta, our AI apps, alongside the simulators.
- AServiceAI automation and agentsHow we add document answers and agents to a business that already runs on files.
- ABrowse allAll servicesAutomation, integrations, consulting and support.
- TBrowse allTalk about your documentsTell us which files staff search most and we will suggest a starting scope.
Frequently asked questions
01What does RAG stand for and what does it do?
RAG means retrieval-augmented generation. The system searches your documents for the passages that match a question, then asks an AI model to write an answer using only those passages, usually with a citation back to each source.
02Does RAG train the AI on my company documents?
No. Your files are indexed for search and the relevant passages are shown to the model at the moment of the question. The model itself is not retrained, although you should still check how your provider handles the data you send.
03Why does the assistant need a refusal path?
Language models tend to fill gaps with plausible text. A designed refusal makes the assistant say the documents do not cover the question and point to a human, which protects staff and customers from confident wrong answers.
04How do I test a document assistant before launch?
Write twenty to fifty real questions with known answers and sources, include some the documents cannot answer, and rerun the list after every change. Score retrieval, faithfulness and citation separately so you know what to fix.
05Is the /demos/ai-integration RAG demo using a real AI model?
No. It is a scripted simulation that shows retrieved passages, citations and a not-found case. No language model is used, nothing is sent or saved, and the figures shown are examples only.

