Glossary
What is RAG? (Retrieval-Augmented Generation)
A method in which a language model, before generating a response, retrieves relevant passages from the organization's documents and data sources and uses them as context.
RAG is a common way to run a model with organization-specific and current information without retraining it. Based on the user’s question, relevant document passages are retrieved from a search layer and passed to the LLM together with the prompt; the model grounds its answer in that content.
The method makes it possible to cite sources and keep information current. Quality depends on how the documents are organized, the chunking method and search success. Access permissions must be reflected as well; otherwise a user may receive, in an answer, the content of a document they should not be able to see.
From a security standpoint, content coming from outside can increase prompt injection risk. Teams that want to change the model’s behavior consider fine-tuning; to add knowledge, RAG is usually more suitable. For models running privately within the organization, it is planned together with the inference infrastructure.