RAG

RAG: RAG for companies: definition, sources, limits, security.

Retrieval-augmented generation explained: how a knowledge system answers questions from your own documents with sources, what it needs and where its limits are.

In short: RAG means answers from your own documents, with sources. The system searches for relevant passages and uses them to draft an answer. Documents can be updated in line with the connected source.

Explanation

Answers from your documents – not from the model’s memory.

A language model only has internal knowledge if it is provided with it. With RAG, the system first searches for relevant passages and then uses them to draft an answer. The answer should name the source used.

Quality depends on the search, document preparation and permissions – not primarily on the model. That is why RAG Engineering is a topic in its own right.

RAG
RAG vs. alternatives

Approaches to company knowledge compared.

ApproachHowAdvantageLimit
RAGSearch + answer from documentsup to date, with sources, no training costsneeds well-maintained sources
Fine-tuningAdapt the model to your own dataStyle, technical languageexpensive, outdated, no source
Prompt with uploadAttach the document to each questionsimpleno permissions, no scaling
Full-text searchKeywordsexactno answer, only hits
Decision guide

When RAG makes sense.

  • Knowledge exists in documents but is hard to find → RAG.
  • Permissions must apply per user → RAG with permissions in retrieval.
  • Technical language or format is very specific → RAG first, fine-tuning only as an exception.
  • The knowledge is not documented anywhere → document it first.
Sources

What this article is based on.

  • Patrick Lewis et al., “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks” (2020): https://arxiv.org/abs/2005.11401
  • Own project experience at Swiss AI Labs with knowledge systems; no external study
Frequently asked questions

Frequently asked questions: RAG

Does RAG invent answers?

RAG can reduce unsupported answers, but it cannot rule them out. Source references and behaviour when there are no matches must be tested.

Does RAG run locally?

Local operation is possible. The operating model depends on sources, architecture and requirements.

Next step

Have a specific process assessed.

The AI potential assessment examines the benefits, prerequisites and risks of the process.