AI and assistants

What is RAG? AI that answers from your own documents

RAG finds the right pages in your own files, then answers from them and shows the source. Here's when it pays off for a small business and when it doesn't.

RAG stands for retrieval-augmented generation. That's a mouthful for a simple idea. Before the AI answers your question, it looks up the right pages in your own files. Then it writes the answer from those pages and tells you which page it used.

Think of a new hire who has to answer a customer question. A bad way: guess from memory. A good way: pull the binder, find the page, read it, then answer. RAG is the binder method, done by software. Here's what it can and can't do for a shop or office in Lancaster County.

How RAG works, in plain words

There are two steps.

The idea comes from a 2020 research paper by Patrick Lewis and colleagues, Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. The authors noted that language models are hard to update and hard to trace back to a source. Giving the model a searchable set of documents was their fix. IBM's research team describes it the same way: retrieving facts from an external knowledge base, so users can see the sources and check the claims.

A plain chatbot answers from what it learned in training. It has never seen your work instructions. RAG hands it your pages first.

  • **Find.** Your documents are read in advance and cut into small pieces, like pages or paragraphs. When someone asks a question, the software searches those pieces for the ones that match best.
  • **Answer.** The question and those few pieces go to an AI language model (the kind of AI that writes text). It writes an answer using only what it was handed, and points back to the pages.

A made-up example

This one is invented, to show the shape of the job. Picture a machine shop with 40 years of binders: setup sheets, work instructions, inspection specs, and old quotes. The newest operator asks: "What's the torque on the cover bolts for the 3-inch pump housing?"

Without RAG, someone walks to the shelf, or asks the one person who remembers. With RAG, the operator types the question on a tablet. The tool finds the setup sheet, answers in a sentence, and shows "Work Instruction 14, page 3." The operator opens the page to check. If the sheet has two revisions, a good tool shows both and says which is newer.

That's the whole point. The answer comes with the page, so a person can verify it in ten seconds. This is the same idea behind our Ask your documents automation. It suits manufacturers and distributors with shelves of binders.

When it's worth it

RAG pays off when three things are true.

  • **You have a lot of documents.** Manuals, work instructions, specs, SOPs (standard operating procedures), safety sheets, past quotes. Too many to hold in anyone's head.
  • **The same questions come up often.** "What's our return policy on custom orders?" "Which gasket did we quote last time?" If one person answers these all week, that's the pile.
  • **People are new.** New hires and seasonal help can't ask the veteran every time. A tool that answers with the source page lets them learn the paperwork faster.

When it isn't worth it

Be honest with yourself here. RAG is often more than a shop needs.

We'll tell you if a folder rename is the better answer. We size a job before we build it. How it works shows the steps.

  • **You have a few documents.** If everything fits in one folder, you don't need AI. A shared folder with good file names does the job. "2026-pump-housing-setup-rev-C.pdf" beats any chatbot.
  • **Your documents are a mess.** RAG doesn't fix scans nobody can read or three versions of the same sheet. Clean up first. That cleanup may be most of the value.
  • **The answer must be exact every time.** For a legal or safety call, a person reads the real document. RAG can point to it. It shouldn't replace the reading.

Where it goes wrong

Four things to watch.

  • **Out-of-date files.** The tool answers from whatever you give it. If last year's price sheet is still in the pile, it may quote last year's price. Someone has to own what goes in and what gets retired.
  • **Confident wrong answers.** AI models can state something false in a calm voice. This is often called a hallucination. IBM says RAG reduces the chance of this, not that it ends it. The retrieval step can also pick the wrong page. That's why showing the source matters.
  • **Permissions.** Who may see what? If payroll files and shop manuals sit in one pile, a question about "raises" could pull from the wrong one. The tool should only search what the person asking is allowed to open. Decide this before you build, not after.
  • **Gaps.** If the answer isn't in your files, the tool should say so. A tool that always has an answer is a tool that makes things up.

How to judge one

Two questions tell you most of what you need.

Then try five questions you already know the answers to, including one trick question. Ask a person who does the job to judge the results, not the person selling it.

  • **Does it show the page it used?** An answer with no source is a guess. You want a document name and a page, and ideally a link that opens it.
  • **Can it say "I don't know"?** Ask it something you know isn't in your files. If it answers anyway, don't trust it with real questions.

The privacy question

This is where owners should push, so here's the straight version.

Most RAG tools use a hosted model, meaning one that runs in a provider's data center. When someone asks a question, the question and the few snippets found by the search are sent to that provider so the model can write the answer. Your whole library doesn't go, but the pieces that match the question do.

What the provider does with that data depends on the plan you pay for. For example, OpenAI says that by default it doesn't use inputs or outputs from its business products or API for training. Consumer accounts work differently. Other providers have their own terms, and they change. Read the data terms for the exact plan, and ask about how long they keep logs.

If a file can't leave the building at all, the model has to run on your own hardware. That's possible, but it needs a computer with a strong graphics card and costs more to set up. It's a bigger build and not the default. We'll say which one fits your files before we start.

What we do

We build this for small shops: the search over your files, the answer that shows its page, and the rules about who sees what. It runs from your own files and updates when the documents do. Office work is similar. See offices. To see how a job starts and ends, read how it works. Some jobs come with our "Pay only if you keep it" promise: 30 days, a price fixed in writing, or we turn it off and you owe nothing. Bigger builds like a shop server or local AI hardware are quoted and paid separately. They're not part of that trial. When you're ready, tell us the job.

Questions

What does RAG stand for?

Retrieval-augmented generation. "Retrieval" means finding the right pages in your files. "Generation" means the AI writes an answer from them. The term comes from a 2020 research paper by Lewis and colleagues.

Is RAG the same as training an AI on my documents?

No. Training changes the model itself. RAG leaves the model alone and hands it the right pages at question time. That's why the answer can show a source page, and why updating a document updates the answers.

Will it make things up?

It can. RAG lowers the chance, according to IBM, but doesn't remove it. Pick a tool that shows the page it used and says "I don't know" when the files don't cover the question.

Do my documents get sent to an AI company?

With a hosted model, the question and the matching snippets are sent, not the whole library. Check the data terms of the exact plan. A fully local setup keeps everything in your building but needs your own hardware.

Can I just use a shared folder instead?

If you have a few documents with clear file names, yes, and you should. RAG earns its keep when there are too many documents for anyone to search by hand.

Written by John at Automate Lancaster. Made-up examples are labeled.