Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

retrieval-augmented generation (RAG)

Looking up relevant text from an external source and injecting it into the prompt before generating an answer, instead of relying only on the model's own trained-in knowledge.

Retrieval-augmented generation (RAG) answers a query by first retrieving relevant passages from an external document collection (via dense or hybrid search over chunked, embedded documents), injecting the retrieved text into the prompt as context, and then generating an answer grounded in that context -- addressing both hallucination and the knowledge cutoff by giving the model current, specific, sourced information it wasn't necessarily trained on.

Examples

  • Instead of guessing from trained-in memory, a RAG system answers "what's our refund window?" by first retrieving the company's actual return-policy document and grounding its answer in that text.

Read the full section →
Graph settings

Calculator