IonBin
All pages
Search
Concept

Retrieval-augmented generation (RAG)

Retrieval-augmented generation supplies external information to a model when it answers. Retrieval can select passages from a library larger than the context window, using keyword, vector or hybrid search. Relevance, permissions and source freshness still need checks; retrieved text does not guarantee a correct answer.

Verified Oct 18, 2026 Review by Apr 16, 2027 2 sources

What it is

Retrieval-augmented generation connects a model with information fetched from external sources. The term comes from a 2020 research paper by Lewis et al. Rather than loading a whole knowledge base into the context window, the system finds the few passages most likely to matter and passes those along.

How it works

  1. Documents are split into chunks.

  2. In a vector-based implementation, each chunk is turned into an embedding. Keyword or hybrid retrieval are other options. Google, for example, offers Gemini Embedding models for semantic search and RAG.

  3. When a question arrives, the system finds candidate chunks matching the query, potentially reranking or filtering them and adds them to the prompt.

  4. The model answers from those chunks, ideally citing them.

Benefits

  • Scale. Works on libraries far larger than any context window.

  • Freshness. Updating sources and their index can expose new information without retraining the generator. Stale indexes, caches or retrieval failures can still return old material.

  • Citations. Answers can point back to the exact source chunk.

Limits and risks

  • Omissions. Retrieval can miss necessary passages. Measure retrieval coverage separately from answer quality, and check cited passages actually support the answer.

  • Chunking is a design decision. Splitting documents badly breaks cross-references.

  • Permissions matter. Filter retrieval using the requesting user’s access rights; an index must not make private documents available to everyone.

  • More systems to run. An index, an embedding model and a retrieval service: each one is a place to fail.

Best-fit stacks

Stack 05

Customer support

Answer faster from a help desk your agent can search, with help-center drafts a person approves.

Agent compatibility

Tool in this entryHow agents connect
Notion MCPAPI/CLIFile import
Google Workspace (Gmail, Drive, Sheets) MCPAPI/CLIFile import

Levels come from each tool's recorded, sourced compatibility. How the levels work.

Related entries

Sources

  1. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks · Lewis et al.reference accessed Oct 18, 2026
  2. Gemini embeddings · Googleofficial accessed Oct 18, 2026

Practitioner views are restated in our words and labeled as views, not measured results. Product facts come from official sources dated above.

Suggest an edit

IonBin's wiki isn't user-edited. Corrections go to our Directory Curator, who checks them against primary sources before anything changes. Spot something wrong or out of date on “Retrieval-augmented generation (RAG)”? Email us with a link to a primary source.

Suggest an edit by email or write to contact@ionbin.com