Definition
RAG (Retrieval Augmented Generation) is an architecture for AIArtificial Intelligence - technology that enables machines to perform tasks that normally require human intelligence, such as language understanding, pattern recognition, and decision-making. applications in which a language model is supplemented with information dynamically retrieved from a knowledge base. Rather than relying solely on knowledge embedded during training, a RAG system searches its own documents, databases, or APIs and sends the most relevant fragments to the model as context. This reduces hallucinations and makes it possible to keep AI responses up to date without retraining the model. The architecture consists of three parts: indexing (documents are vectorised), retrieval (semantic search finds relevant fragments), and generation (the model responds based on these).