---
title: "Retrieval-Augmented Generation (RAG)"
description: "Retrieval-Augmented Generation is a methodology used in the field of Generative AI. It combines the benefits of both retrieval-based and generative systems for language processing. RAG utilizes an external
knowledge source to retrieve relevant documents or information, and then uses a generative model to create
a contextually appropriate response or output. This approach enhances the model's ability to generate detailed,
accurate, and context-specific responses, making it particularly useful in applications such as chatbots, question-answering systems, and content creation tools."
canonical_url: "https://promptmetheus.com/resources/llm-knowledge-base/retrieval-augmented-generation-rag"
---

> Index of every page on this site: [llms.txt](https://promptmetheus.com/llms.txt)

Retrieval-Augmented Generation is a methodology used in the field of [Generative AI](https://promptmetheus.com/resources/llm-knowledge-base/generative-ai). It combines the benefits of both retrieval-based and generative systems for language processing. RAG utilizes an external
knowledge source to retrieve relevant documents or information, and then uses a generative model to create
a contextually appropriate response or output. This approach enhances the model's ability to generate detailed,
accurate, and context-specific responses, making it particularly useful in applications such as [chatbots](https://promptmetheus.com/resources/llm-knowledge-base/chatbot), question-answering systems, and content creation tools.

RAG is also a core [context engineering](https://promptmetheus.com/resources/llm-knowledge-base/context-engineering) technique. Retrieval quality, chunking, metadata filters, [hybrid search](https://promptmetheus.com/resources/llm-knowledge-base/hybrid-search), [reranking](https://promptmetheus.com/resources/llm-knowledge-base/reranking), and the amount of evidence inserted into the prompt all affect whether the model receives useful context.

When retrieval uses live web or database sources to verify claims during generation, it supports [real-time fact-checking](https://promptmetheus.com/resources/llm-knowledge-base/real-time-fact-checking). Protocols such as [NLWeb](https://promptmetheus.com/resources/llm-knowledge-base/nlweb) apply a similar idea at the website level by exposing structured natural-language query behavior over site content. In an agent system, [Agentic RAG](https://promptmetheus.com/resources/llm-knowledge-base/agentic-rag) may retrieve reference documents or [agent memory](https://promptmetheus.com/resources/llm-knowledge-base/agent-memory) dynamically as the task evolves. Retrieved content should be treated as untrusted data because it may contain inaccurate information or indirect [prompt injection attacks](https://promptmetheus.com/resources/llm-knowledge-base/prompt-injection-attack).

## Sitemap

See the full [sitemap](https://promptmetheus.com/sitemap.md) for all pages.
