Skip to content

AI glossary

Retrieval-Augmented Generation

Retrieval-augmented generation (RAG) is a technique that improves a large language model's answers by first retrieving relevant information from a specified knowledge base and then giving it to the model as context. The model generates its response from those documents, which improves relevance and accuracy and helps reduce hallucinations.

When a user asks a question, a RAG system searches the organization's documents, often using vector embeddings that match by meaning rather than exact keywords. The most relevant passages are added to the prompt, and the LLM writes an answer based on them, often with citations to the sources it used.

For example, a plant could connect a chat assistant to its maintenance manuals, standard operating procedures, and past work orders. A technician asking how to clear a specific fault gets an answer drawn from the plant's own documents rather than from the model's general training.

RAG differs from fine-tuning. Fine-tuning changes the model's weights by training it on new data, while RAG leaves the model unchanged and supplies fresh information at question time. That makes RAG easier to keep current, and access controls can limit which documents each user's questions can draw on.

Can’t wait? Contact us today.

The ClearObject team of AI experts is here to help you get started.

Talk to an expert