# RAG

> Retrieval-augmented generation: the model first finds the right documents, then answers based on them. It's how an AI agent answers from your company's knowledge base

Источник: https://pachca.com/en/glossary/rag

RAG (retrieval-augmented generation) is an approach where a language model doesn't answer from memory alone. First, the system finds passages in a knowledge base that match the question. Then it passes them to the model along with the prompt, and the model builds its answer from them.

What RAG gives you:

- Answers from internal docs the model never saw in training
- Up-to-date data without retraining the model
- Source links you can easily check
- Fewer made-up facts

This is how AI agents in Pachca answer from a knowledge base: the agent finds the answer in company docs and conversations and cites the source. New hires don't have to wait for a teammate to free up, and your chat and thread history becomes shared company context.

For developers

[Docs on dev.pachca.com →](https://dev.pachca.com/guides/ai-agents/overview?utm_source=pachca.com&utm_medium=glossary&utm_campaign=dev-portal)
