Skip to main content
Retrieval examples enact the layers of a RAG pipeline. Sources under examples/retrieval/.

How to run

Pick a starting point

  • First time touching RAG? retrieval_rag_pipeline is the canonical flow.
  • Re-indexing a corpus? retrieval_indexing_rag — incremental updates with a RecordManager.
  • Improving retrieval quality? retrieval_reranking adds a cross-encoder pass.

See also

Building RAG

The user guide for every layer.

Patterns → Code Q&A

A worked RAG over a Rust codebase.

Reranking & compression

Why reranking matters.