What is RAG: AI that answers from your documents

AIR Editorial Team
What is RAG (Retrieval Augmented Generation)?RAG (Retrieval Augmented Generation) is a technique where, before answering, the AI searches your documents for the useful passages and uses them as the basis for its answer.
The short version

A language model knows a lot in general, but it does not know your price lists, your manuals or your procedures. With RAG the system works in two steps. First it searches your documents for the pieces most relevant to the question. Then it passes them to the model together with the question, and asks it to answer from them.

It is the most common way to build an assistant that knows your business without training a new model. When you update a document, you just re-index it and the answers follow the new version.

An example in an SMB

A company that sells industrial spare parts has hundreds of technical data sheets in PDF. With RAG, a salesperson types "which gasket fits model X at high temperatures?" and gets the answer with a pointer to the data sheet it comes from. Before, the same search meant opening several PDFs or calling the technical office.

The most common mistakes

  • Uploading old or contradictory documents: the system answers from what it finds, even if it is out of date.
  • Thinking it is enough to upload the files: how the documents are split and indexed decides the quality of the answers.
  • Not showing the source of the answer: without the pointer, nobody can check it.

All the AI terms explained simply are in the glossary.

Frequently asked questions

Is RAG better than fine-tuning?

For teaching the model company information that changes, almost always yes: it is cheaper and updates straight away. Fine-tuning is more useful for changing style or behaviour.

Do my documents end up in the model's training?

With RAG, documents are read at the moment of the question, not used to train the model. What the provider may keep or use is set by its contract: read it before uploading files.

Read next

Want to understand what your business really needs, without the jargon? Let's talk.

Text and graphics created with the support of AI. Method and content are AIR's.

Talk to us