RAG engineering notes

Everything I wish I'd known before shipping RAG.

Short, practical write-ups on retrieval quality, evaluation, and the failure modes that only show up after the demo. No hype, no listicles.

Fundamentals

Why your RAG demo works and your production system doesn't

The four failure modes that appear around document 10,000 — and the order to fix them in.

8 min read
Evaluation

RAG evaluation metrics that actually tell you something

Recall@k, MRR, nDCG, and faithfulness — what each one measures and when it lies to you.

9 min read
Ingestion

Chunking is a retrieval decision, not a preprocessing step

Fixed, recursive, semantic, and metadata-aware chunking — with the tradeoffs nobody mentions.

7 min read
Retrieval

Hybrid search: why vector-only retrieval fails on real documents

When BM25 beats embeddings, how to combine scores, and how to tune the mix.

8 min read
Strategy

Fine-tuning vs RAG: a decision framework

Facts belong in an index. Behavior belongs in weights. Here's how to tell which you need.

7 min read
Trust

Citations and refusal: the two features that make RAG safe

How to verify that an answer is supported, and how to make the system say "I don't know."

8 min read
Fundamentals

RAG architecture from scratch: components and data flow

Offline and online pipelines, every layer, and the failure point at each stage.

7 min read
Ingestion

Document parsing for RAG: PDFs, scans, and tables

Why parsing is where most quality is lost — and the checks that catch it.

7 min read
Retrieval

Choosing an embedding model for RAG (and measuring it)

Dimensions, domain fit, multilingual coverage, and why leaderboards mislead.

6 min read
Infrastructure

Vector databases for RAG: what actually matters

pgvector, Qdrant, Weaviate, Pinecone, FAISS — filters, hybrid support, and operations.

6 min read
Retrieval

Reranking explained: the cheapest quality win in RAG

Retrieve broadly, rank narrowly. How cross-encoders fix what bi-encoders miss.

6 min read
Generation

Context window budgeting for RAG: more is not better

Deduplication, ordering, labels, and why stuffing more context lowers accuracy.

6 min read
Ad slot — activate after AdSense approval