GenAI + RAG Agents (DS Lite)
Back to M1 — Embeddings + Retrieval

Chunking Strategies + Stores

Run a 2x2 chunking benchmark; report P@K/Recall/MRR.

3 minutesReading
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.

Run a 2x2 benchmark: chunk sizes {256, 512} x overlaps {10%, 20%} on the DS program RAG corpus; report P@K / Recall / MRR per cell and pick a winner.

1. Why chunking decides retrieval

Embeddings compare chunks, not documents. Oversized chunks dilute the signal; slivers lose context. The benchmark harness in the starter fixes the queries and embeddings so only chunking varies — that isolation is the whole experiment.

2. Stores: FAISS-local-first

Default to local FAISS (zero cost, reproducible). pgvector note: same vectors + metadata in Postgres when the app already lives there; accept the ops cost only at serving time, never for the benchmark.

3. Metrics

P@K: is a gold chunk in the top K? Recall: fraction of golds retrieved. MRR: 1/rank of first gold, averaged. Report all three per cell; choose by MRR with Recall as tiebreak; note cost/latency per embedding dim (768/1536/3072).

Loading progress...