Skip to main content
Menu

RAG (Retrieval-Augmented Generation)

RAG combines a language model with a search over your own documents, so answers are grounded in current, company-specific knowledge instead of training data alone.

RAG stands for Retrieval-Augmented Generation. Before generating an answer, the application searches a connected knowledge base for relevant content.

The retrieved passages are provided to the language model as context alongside the request. The model formulates its response using this additional material.

How RAG works technically

In a typical RAG setup, documents are first divided into suitable passages. These may come from wikis, manuals or issue trackers.

The passages are often stored as embeddings in a vector database and supplemented with the required metadata.

When a request arrives, the system searches for relevant passages. It may compare the request embedding with stored content and supplement the search with filters or additional ranking methods.

The selected passages are passed to the language model as context. Ideally, the application also identifies the sources used.

Why RAG matters in practice

Internal documents and current product information are often absent from the base model. RAG can provide this material at runtime without changing model parameters.

The knowledge base can be updated independently of the model. For changing factual knowledge, this approach is generally easier to maintain and trace than fine-tuning.

Where the technique runs into limits

RAG can reduce hallucination, but cannot eliminate it. Irrelevant or contradictory results may still lead to incorrect conclusions.

Quality depends on document preparation, retrieval and result selection. A robust system also needs rules for outdated content, conflicting sources and traceable attribution.

For sensitive documents, assess which data is sent to the embedding model, vector database and language model.

Contracts, data classification and technical safeguards determine whether an external service, controlled cloud environment or privately operated infrastructure is appropriate.

Related terms

Related terms

Embedding

An embedding represents text, images or other data as a numeric vector. Semantically similar data receives similar vectors.

View term

Vector Database

A vector database stores embeddings and retrieves entries according to their mathematically determined similarity.

View term

Hallucination

A hallucination is a plausibly phrased but factually incorrect or fabricated output from an AI model.

View term

Related topics

Related topics

Private AI Infrastructure

We determine whether private AI infrastructure is appropriate for your use case and which data, security and operational questions need to be resolved first.

View overview

Related services

Related services

Infrastructure

For AI, automation and software systems with clear technical requirements for data, availability and operations.

View overview

What would you like to assess or build?

Briefly describe the situation, your objective and the systems involved. We will respond with a technical assessment and a practical next step.

Send inquiry