Skip to content
Nitmonk
RAG & Knowledge

RAG (Retrieval-Augmented Generation)

Ground LLM answers in external, up-to-date knowledge.

RAG (Retrieval-Augmented Generation) — infographic explaining Ground LLM answers in external, up-to-date knowledge.
RAG (Retrieval-Augmented Generation) — visual explainer by Nitmonk.

RAG (Retrieval-Augmented Generation) combines retrieval from external knowledge sources with the generation ability of LLMs to deliver accurate, up-to-date, context-aware answers. Instead of relying only on what the model memorised, RAG fetches relevant information and feeds it in as context.

In simple terms

Retrieve relevant information first, then let the LLM answer using it — with citations.

How it works

  1. 1User asks a question in natural language.
  2. 2Retrieve relevant information: the system searches a knowledge base for the most relevant documents.
  3. 3Augment the prompt: the retrieved context is added to the prompt sent to the LLM.
  4. 4Generate answer: the LLM uses the provided context to write a high-quality answer.
  5. 5Return answer with sources: the final answer comes back with citations.

Key points

  • More accurate — uses real data to reduce hallucinations.
  • Up-to-date — retrieves current or private information without retraining.
  • Transparent — provides citations users can verify.
  • Cost-effective — smaller model plus retrieval beats a huge model.

Why it matters

RAG is the standard way to make LLMs answer from current or private knowledge. It grounds responses in real sources, cuts hallucinations, and avoids the cost of retraining the model on your data.

Frequently asked questions

How is RAG different from fine-tuning?
Fine-tuning changes the model's weights for style or behaviour; RAG injects external facts at query time, ideal for changing or private data.
Does RAG stop hallucinations?
It greatly reduces them by grounding answers in retrieved sources, but good retrieval and guardrails still matter.