Learning Paths

Learn RAG Guide

A structured learning path for retrieval-augmented generation - from embeddings through chunking, vector search, hybrid retrieval, reranking, and evaluation. Ordered steps with prerequisites and time estimates.

12 min readIntermediateLast reviewed: 20 July 2026

Quick Summary

RAG is a six-layer stack - master embeddings and chunking before you touch prompts or models.

One Analogy

Learning RAG is like tuning a radio: fix the antenna (retrieval) before turning up the speaker (generation).

Engineering Rule

Measure retrieval recall@k before changing the LLM - generation cannot recover documents you never found.

Try the Basic RAG Lab

See how a minimal RAG pipeline chunks documents, embeds text, retrieves context, builds a prompt, and generates a grounded answer.

Try Interactive Lab

TL;DR

  • This path teaches RAG in dependency order - each step unlocks the next, from vectors to end-to-end evaluation.

  • Eight core layers: embeddings → chunking → vector search → ANN/index tuning → hybrid search → reranking → advanced retrieval → evaluation.

  • Budget 2–3 weeks at 5–8 hours/week, including a hands-on project indexing 100+ documents.

  • Retrieval work dominates RAG quality — many beginners over-invest in prompts and models while recall stays broken.

  • Each step links to a deep guide - this page is the roadmap, not the textbook.

Why This Matters

RAG is the dominant pattern for building AI applications that answer questions using your own data. Teams that skip foundational retrieval skills — jumping straight to LangChain tutorials or prompt templates — ship systems that hallucinate confidently because the right document never reached the LLM.

This learning path orders topics by dependency: you cannot tune ANN indexes before you understand embeddings; you should not add re-ranking before you can measure recall@k with Retrieval Evaluation. Following the sequence prevents the common failure mode of optimizing generation while retrieval remains broken.

The Problem This Path Solves

RAG documentation is fragmented across embedding APIs, vector databases, chunking blog posts, and framework quickstarts. Without structure, learners:

  1. Prompt-tune before fixing retrieval — the LLM invents answers when chunks are missing.
  2. Pick a vector DB before understanding search — infrastructure choices without recall metrics.
  3. Skip evaluation entirely — no baseline means no improvement signal.
  4. Ignore production concerns — tenant filters, index rebuilds, and latency budgets appear too late.

This path provides a checklist with checkpoints so each layer works before you add complexity.

How We Got Here

RAG learning resources evolved from framework demos to engineering discipline as production failures accumulated.

Diagram: RAG learning path evolution

timeline
    title How teams learn RAG
    2022 : LangChain quickstarts
    2023 : Vector DB marketing tutorials
    2023 : Chunk size blog posts
    2024 : Hybrid + rerank best practices
    2024 : Eval-first RAG engineering
    2025 : Index tuning + quantization ops

Mature teams now treat RAG as a retrieval engineering problem with LLM synthesis on top — not an LLM problem with search bolted on.

What Is This Learning Path?

A ordered curriculum through the Retrieval cluster: the guides, tools, and metrics you need to build production-grade RAG systems. It complements the deep RAG guide — read that for architecture; follow this path for sequence and hands-on checkpoints.

Diagram: Full RAG retrieval stack

flowchart TB
    subgraph offline [Offline indexing]
        L[Load docs] --> CH[Chunk]
        CH --> EM[Embed]
        EM --> IDX[Vector index]
    end
    subgraph online [Online query]
        Q[Query] --> HS[Hybrid search]
        HS --> RR[Rerank]
        RR --> GEN[LLM generate]
    end
    IDX --> HS

Master each offline and online stage in order; measure recall before adding generation polish.

Architecture

The path maps to a deployed RAG architecture:

Layer Guides Outcome
Representation Embeddings, Embedding Models Vectors that preserve semantic similarity
Segmentation Chunking Strategies Retrievable passages with metadata
Storage & search Vector Databases, Vector Search Top-k retrieval with latency SLOs
Index engineering ANN Indexes, Vector Quantization Scale and cost control
Recall boosters Hybrid Search, Metadata Filtering Exact tokens + tenant isolation
Precision Re-ranking, Late Interaction Retrieval Right chunk ranked first
Quality Retrieval Evaluation CI gates and regression detection

Compare vector stores in Best Vector Databases once you reach Step 3.

Step-by-Step Flow

Path at a Glance

RAG model overview - retriever plus generator

Source: Meta AI

Step Topic Time Prerequisite
1 Embeddings 2–3 hr LLM basics
2 Chunking 2 hr Step 1
3 Vector search & storage 3 hr Steps 1–2
4 ANN indexes & quantization 2 hr Step 3
5 Hybrid search & filters 2 hr Step 3
6 Reranking 2 hr Step 5
7 Advanced retrieval 2 hr Step 6 (optional)
8 Evaluation 3 hr Working pipeline
Capstone End-to-end RAG 4–6 hr All steps

Total: ~20–24 hours of focused study + project time


Step 1: Embeddings (2–3 hours)

Read: Embeddings · Embedding Models

What you'll learn: How text becomes dense vectors; API vs open-source models; metric choice (cosine vs dot); model versioning.

Hands-on: Embed 20 sentences; verify paraphrases cluster closer than unrelated pairs.

Checkpoint: Explain why embedding model changes require full re-embedding and index rebuild.


Step 2: Chunking (2 hours)

Read: Chunking Strategies

What you'll learn: Chunk sizes, overlap, structure-aware splitting, metadata (tenant, doc type, URL, embedding model ID).

Hands-on: Chunk one PDF three ways (256, 512, 1024 tokens); test five questions against each.

Checkpoint: Documented chunk strategy with rationale tied to query types.


Step 3: Vector Search & Storage (3 hours)

Read: Vector Search · Vector Databases · RAG (indexing section)

What you'll learn: Top-k retrieval, ANN indexes at a high level, pgvector vs dedicated DBs, incremental indexing.

Hands-on: Index chunks in Qdrant or pgvector; run ten queries; inspect top-5.

Checkpoint: Retrieve-only pipeline with p95 latency logged. Compare options in Best Vector Databases.


Step 4: ANN Indexes & Quantization (2 hours)

Read: ANN Indexes · Vector Quantization

What you'll learn: HNSW vs IVF-PQ, recall@k tuning, when compression is needed, rebuild triggers.

Hands-on: Measure recall@10 vs exact search; try int8 quantization if RAM is tight.

Checkpoint: Document index type and efSearch/nprobe settings with recall numbers.


Step 5: Hybrid Search & Metadata (2 hours)

Read: Hybrid Search · Metadata Filtering

What you'll learn: BM25 + vector fusion (RRF), metadata pre-filters, tenant ACL patterns.

Hands-on: Add BM25; re-run failed queries from Step 3; add tenant_id filter.

Checkpoint: Hybrid search with tenant/doc-type filters enforced at query level.


Step 6: Reranking (2 hours)

Read: Re-ranking

What you'll learn: Retrieve many (20–50), rerank to few (3–5); cross-encoders vs bi-encoders; Cohere vs bge-reranker.

Hands-on: Rerank top-20 to top-5; compare MRR@5 before and after.

Checkpoint: Hybrid → rerank → top-5 pipeline; log reranker scores.


Step 7: Advanced Retrieval (2 hours, optional)

Read: Late Interaction Retrieval

What you'll learn: ColBERT MaxSim, multi-vector storage, when LI beats cross-encoder alone.

Hands-on: Run ColBERT-style rerank on hybrid top-200; compare to cross-encoder only.

Checkpoint: Decision documented: skip LI, rerank-only LI, or first-stage multi-vector.


Step 8: Evaluation (3 hours)

Read: Retrieval Evaluation · RAG Evaluation

What you'll learn: recall@k, MRR, nDCG, golden sets, CI regression gates.

Hands-on: 30-question eval set; score retrieval and generation separately.

Checkpoint: Baseline recall@5 and faithfulness scores; know which layer fails per query type.


Capstone: Production-Ready RAG App (4–6 hours)

Integrate all steps:

  1. Ingest 100+ documents with structure-aware chunking
  2. Index with versioned embeddings in a vector DB (Qdrant, Weaviate, or Pinecone)
  3. Hybrid search + metadata ACL filters
  4. Rerank to top-5 before generation
  5. Citations in every answer
  6. Eval set with weekly regression run

Diagram: Recommended learning sequence

flowchart LR
    A[Embeddings] --> B[Chunking]
    B --> C[Vector DB]
    C --> D[ANN]
    D --> E[Hybrid]
    E --> F[Rerank]
    F --> G[Eval]
    G --> H[Capstone]

Follow left to right; do not skip evaluation.

Real Production Example

A minimal capstone checklist you can implement in a weekend:

# Pseudocode — capstone integration points
PIPELINE = {
    "embed_model": "text-embedding-3-small",  # version in metadata
    "chunk_size": 512,
    "retrieval": "hybrid",  # BM25 + dense
    "initial_k": 25,
    "reranker": "cohere-rerank-v3.5",
    "final_k": 5,
    "filters": ["tenant_id", "doc_type"],
    "eval_gate": {"recall_at_5_min": 0.75},
}

Wire LangChain or LlamaIndex for loaders and retrievers; store vectors in your chosen DB from Best Vector Databases. Head-to-head comparisons: Qdrant vs Pinecone · Pinecone vs Weaviate · Milvus vs Qdrant.

Design Decisions

Decision Beginner default When to escalate
Vector DB pgvector or managed Pinecone Dedicated DB when hybrid ops, sharding, or scale requirements grow
Search Dense only → hybrid SKUs, codes, rare tokens fail dense
Reranker Cohere API Self-host bge at high volume / data residency
Index HNSW defaults IVF-PQ when RAM binds (Vector Quantization)
Eval size 30 queries 100+ before production CI gate

Common sequencing mistakes

Mistake Why it hurts Fix
Prompt tuning before retrieval works Model invents answers Step 8 recall@k first
Skipping hybrid search Misses exact codes and IDs Step 5 before declaring retrieval "done"
k=20 into LLM without rerank Noise degrades answers Step 6: retrieve many, rerank few
No metadata on chunks Cross-tenant leaks Step 5 metadata filters
One giant eval at the end No signal during learning Eval 10 questions after each step

Comparisons

RAG vs alternatives

Approach Best for Weakness
RAG Changing private knowledge Retrieval must work
Fine-tuning Behavior and format Stale facts without retrain
Long context Small static corpus Cost at scale
GraphRAG Multi-hop entity queries Higher complexity

Framework vs custom pipeline

Option Pros Cons
LangChain / LlamaIndex Fast start, loaders Abstraction hides retrieval bugs
Custom retriever Full control, clearer eval More code to maintain

Decision tree: next step after this path

flowchart TD
    A[Completed capstone?] -->|No| B[Finish eval + citations]
    A -->|Yes| C[Multi-hop queries?]
    C -->|Yes| D[GraphRAG path]
    C -->|No| E[Dynamic retrieval?]
    E -->|Yes| F[Agentic RAG]
    E -->|No| G[Scale index ops]
    G --> H[ANN + quantization deep dive]

After this path, branch to GraphRAG or Agentic RAG based on query patterns.

Common Mistakes

  1. Reading the RAG guide once and shipping — depth lives in cluster guides (chunking, hybrid, eval).
  2. Choosing Pinecone vs Qdrant before eval — pick infra after a retrieve-only prototype with metrics.
  3. Ignoring index rebuild cost — embedding model changes are full re-index events.
  4. Evaluating only answer correctness — cannot debug retrieval vs generation without separate metrics.
  5. Skipping metadata ACL — prompt instructions do not replace database-level filters.

Where It Breaks Down

This path assumes English-centric technical documentation and a corpus under ~10M chunks. Beyond that, prioritize ANN Indexes and Vector Quantization earlier. Multilingual corpora need multilingual embedding and reranker models from Step 1.

Teams without GPU access can use API embeddings and Cohere rerank throughout; self-hosted bge models are optional until volume justifies ops.

When NOT to Follow This Path

Skip or shorten this path when:

  1. Corpus is tiny (<50 pages) — long-context or single system prompt may suffice.
  2. Task is pure generation — no external knowledge lookup needed.
  3. You need GraphRAG on day one — relationship-heavy queries; start with Knowledge Graphs path instead.
  4. No time for evaluation — without Step 8, do not deploy to users.

Running in Production

Best Practice

Production checklist before shipping RAG to users.

Dimension Requirement
Embeddings Model ID in chunk metadata; re-index playbook documented
Retrieval Hybrid + rerank in production path; recall@5 ≥ 0.75 on golden set
Security ACL filters at database query level
Observability P95 latency per stage; retrieval logs with scores
Evaluation Weekly regression on golden set; prod failures → new test cases
Citations Every answer links to source documents
  • Embedding model ID stored in chunk metadata
  • Incremental re-index on document change
  • Hybrid search + reranker in production path
  • ACL filters at database query level (not prompt-only)
  • Citations linked to source documents
  • Golden eval set (30+ questions) with CI regression
  • P95 latency per stage: embed, search, rerank, generate
  • Fallback when retrieval returns zero results

Retrieval cluster (read in path order)

Advanced (after capstone)

Rankings

Comparisons

Tools

Interview Questions

  1. What order should you learn RAG components?

    • Expected: embeddings → chunking → search → hybrid → rerank → eval; measure recall before generation.
  2. Why is retrieval evaluation Step 8, not Step 1?

    • Expected: need a working pipeline to eval; but build a small test set early and grow it.
  3. When add hybrid search in the learning sequence?

    • Expected: after basic vector search works; when exact tokens/SKUs fail dense-only.
  4. What checkpoint proves Step 3 is complete?

    • Expected: retrieve-only pipeline with logged latency and inspected top-k results.
  5. RAG vs fine-tuning — when each?

    • Expected: RAG for changing knowledge; fine-tuning for behavior/format.
  6. What triggers moving from managed to self-hosted vector DB?

    • Expected: scale, cost, data residency, need for IVF-PQ / custom index tuning.
  7. Why rerank after hybrid, not before?

    • Expected: rerank needs candidate set; hybrid improves recall of that set.
  8. What belongs in the capstone that tutorials skip?

    • Expected: citations, ACL filters, eval CI gate, embedding version metadata.

Key Takeaways

  • Follow embeddings → chunking → vector search → hybrid → rerank → eval in order.
  • Fix retrieval before generation — measure recall@k at every iteration.
  • Build a small eval set early; grow it as you discover failure modes.
  • Compare vector stores in Best Vector Databases with real recall metrics.
  • The capstone project matters more than completing readings — ship something with citations and scores.
  • Branch to GraphRAG or Agentic RAG after the capstone based on query patterns.

FAQs

Only if queries are pure paraphrases. Many production deployments add keyword search for codes, SKUs, and rare terms — see Step 5.

RAG vs fine-tuning?

RAG for changing knowledge. Fine-tuning for behavior and format. See Fine-tuning after this path if you need both.

Which vector database should I learn first?

Start with whatever minimizes ops for your prototype — pgvector if you already run PostgreSQL, or a managed option from Best Vector Databases. Re-evaluate after Step 8 with recall metrics.

Do I need ANN indexes and quantization for learning?

Not on day one. Add Step 4 when corpus or RAM pressure appears, or when recall@k drops after scaling.

How long until production-ready?

Most engineers reach a credible capstone in 2–3 weeks part-time. Production hardening (ACL, CI eval, monitoring) adds another 1–2 weeks.

Should I learn late interaction retrieval?

Optional Step 7. Add when cross-encoder reranking alone cannot rank compositional queries correctly.

References

Further Reading

Next Topics

Learning Path

Continue Learning

Related Guides

Related Tools

ToolCategoryPurposeWebsiteBest For
LangChain
PopularOpen SourceAPI
frameworksFramework for building LLM-powered applications and workflows.langchain.comRAG systems
LlamaIndex
Open SourceAPI
frameworksData framework for connecting LLMs to private and structured data.llamaindex.aiRAG over documents
Pinecone
PopularAPICloud
Vector DBManaged vector database plus Pinecone Nexus knowledge engine for agent RAG.pinecone.ioRAG systems
Weaviate
MaintainedOpen SourceAPI
Vector DBOpen-source vector database with hybrid search and modules.weaviate.ioEnterprise search
Qdrant
Open SourceAPI
Vector DBOpen-source vector database with filtering and hybrid search.qdrant.techRAG systems

Related Rankings

Related Comparisons