What is RAG?
RAG is a technique that combines a pretrained language model with an external searchable store of documents, so generated text can draw on passages retrieved at query time.
Also written: retrieval-augmented generation, retrieval augmented generation
Explained
The term comes from a 2020 paper by Patrick Lewis and colleagues, posted to arXiv in May 2020 and accepted at NeurIPS 2020. The authors start from a limitation: large pretrained language models keep factual knowledge in their weights, but their ability to access and precisely manipulate it is limited. The paper also lists giving provenance for outputs and updating world knowledge as open problems.
Their proposal pairs two kinds of memory. Parametric memory is a pretrained sequence-to-sequence model whose knowledge lives in its parameters. Non-parametric memory is an external store, in the paper a dense vector index of Wikipedia, searched by a pretrained neural retriever. The retriever finds passages, and the generator conditions on them while writing its answer. The paper compares one variant that uses the same retrieved passages for the whole output with another that can use different passages for each token.
The authors report strong results on three open-domain question answering tasks and say the generated language was more specific, diverse and factual than a parametric-only baseline. Those results are specific to that paper's models and datasets. The abstract does not prescribe a particular retriever or index beyond the dense vector index it describes.
Primary source
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (arxiv.org), read Oct 26, 2026
This entry paraphrases the page above. Sources change; check it for the current wording.
Listings that use this
The 5 top-ranked listings tagged for RAG. Rank weighs adoption, freshness, documentation and publisher identity; how we rank and grade. Money never changes the order.
- 0.872score
ai-pipeline-orchestration
devops-skills
Orchestrate AI/ML pipelines for data ingestion, model training, batch inference, and RAG indexing using Prefect, Airflow, or Dagster.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.853score
LlamaIndex
LlamaIndex
Open-source Python toolkit for RAG and agents over your own data, with event-driven workflows and 300+ integration packages.
HarnessAFreshness: A★ 52.6K↓ 1.4M/wk - 0.849score
memory-rag-poisoning-detection
TencentOfficial
Detect persistent-memory poisoning and RAG/knowledge-base contamination via dialogue testing.
SkillAFreshness: A★ 7.1KClaude Code +9 - 0.845score
ai-llm-app-attack
AIPentest
AI/LLM应用攻击:提示注入,Agent工具滥用RCE,RAG投毒,MCP供应链,torch.load pickle RCE。Use when testing LLM apps, agents, RAG, MCP plugins, or AI model file risks.
SkillAFreshness: A★ 8KClaude Code +9 - 0.803score
haiku.rag
ggozad
Local-first agentic RAG with citations - hybrid search, reranking, multimodal document retrieval
ConnectorAFreshness: ALocal★ 636↓ 806/wkClaude Code +5
Related
Cite this page
What is RAG?. Agent Mart. https://agentmart.dev/glossary/rag (last updated 2026-10-26)
Written Oct 26, 2026, updated Oct 26, 2026. All glossary terms