[Home](https://helqu.com/) / [Answers](https://helqu.com/answers) / Artificial intelligence
# What is RAG (retrieval-augmented generation)?
RAG means finding and retrieving relevant passages from your company’s documents before a language model answers, and basing the answer on those passages. This way the model responds with current, company-specific information and the risk of made-up answers goes down.

## In detail

### How does it work?
Documents are split into chunks and written to an index that can be searched by meaning. When a user asks a question, the system finds the most relevant chunks and asks the language model together with those chunks; the model grounds its answer in these sources. This way, company knowledge that wasn’t in the model’s training can be used.

### What determines quality?
What matters is clean and up-to-date documents, sensible chunking, search quality and showing the source of the answer. A system that retrieves the wrong chunk can produce a fluent but wrong answer. That’s why you need to add source links to answers and test regularly with evaluation questions.

### When RAG, and when fine-tuning?
RAG is suitable if information changes often or you need to show sources. Fine-tuning is considered when you need to teach the model a style or a specific task. For most enterprise knowledge-retrieval work, RAG is more practical and easier to keep up to date.

## Follow-up questions

### Does RAG completely prevent hallucination?
It reduces it but doesn’t completely prevent it. If the right source isn’t found, the model can still give a wrong answer; so it should be designed to be able to say “I don’t know” and to show its sources.

### Will my documents leave my environment?
It depends on the setup. If the language model and the index run in your own environment, the data doesn’t leave it; if a hosted model is used, the relevant chunks are sent to that service.

Platform interfaces change over time; check the platform’s official help pages for current steps.

[Artificial intelligence: See the service](https://helqu.com/services/ai)

## Related questions

- [What is an AI agent?](https://helqu.com/answers/what-is-an-ai-agent)
- [What is a local LLM and when do you need one?](https://helqu.com/answers/what-is-a-local-llm-and-when-do-you-need-one)
- [How do I set up an AI-powered WhatsApp bot for my business?](https://helqu.com/answers/how-do-i-set-up-an-ai-powered-whatsapp-bot-for-my-business)
- [Which tasks in my company can be automated with AI?](https://helqu.com/answers/which-tasks-in-my-company-can-be-automated-with-ai)[All answers](https://helqu.com/answers)

---
Source: https://helqu.com/answers/what-is-rag-retrieval-augmented-generation
Title: What is RAG (retrieval-augmented generation)? | Helqu
Description: RAG means finding and retrieving relevant passages from your company’s documents before a language model answers, and basing the answer on those…
Language: en
Alternates: tr=https://helqu.com/tr/cevaplar/rag-geri-getirmeyle-zenginlestirilmis-uretim-nedir.md de=https://helqu.com/de/antworten/was-ist-rag-retrieval-augmented-generation.md fr=https://helqu.com/fr/reponses/qu-est-ce-que-le-rag-generation-augmentee-par-recuperation.md ru=https://helqu.com/ru/otvety/chto-takoe-rag-generatsiya-s-dopolneniem-vyborkoy.md ar=https://helqu.com/ar/ajwiba/what-is-rag-retrieval-augmented-generation.md
