04

July 5, 2026 · View on GitHub

Reusable RAG design patterns that cut across the architectures in 02_interview_bank/.

Contents

FilePatternWhen to Use
01-router-fallback.mdRouter + FallbackRoute queries to cheapest retriever; fall back to expensive tiers only on failure
02-fan-out-fan-in.mdFan-Out / Fan-InDecompose multi-aspect queries into sub-queries, retrieve in parallel, merge with RRF
03-migration-path.mdMigration PathUpgrade Naive → Advanced → Modular → Agentic incrementally with forcing functions
04-anti-patterns.mdAnti-PatternsFive most common RAG design mistakes and how to avoid them

How to Use These Patterns

These patterns are not architectures (those are in 02_interview_bank/). They are design decisions that sit on top of any architecture:

  • A Modular RAG system can use the Router + Fallback pattern to pick its retrieval strategy
  • An Advanced RAG system can use Fan-Out to improve recall on multi-aspect queries
  • Any system benefits from the Migration Path framework when deciding which upgrade to make next
  • The Anti-Patterns apply to all architectures