Loading patterns…
Modular RAG(MRAG)
Flexible RAG architecture with interchangeable modules supporting iterative, adaptive, and non-sequential retrieval patterns
In 30 seconds
- What
- Swaps retrieval components (search, memory, routing) in and out to adapt how an agent finds and uses knowledge across queries.
- When to use
- Systems needing different retrieval strategies for different query types, or where retrieval quality improves by learning from past interactions.
- Watch out
- High complexity and many moving parts make debugging failures hard; unclear which module caused poor results.
Ask the AI expert about this pattern
Opens the assistant with your question prefilled. You review it before sending.
Modular RAG: Overview
Flexible RAG architecture with interchangeable modules supporting iterative, adaptive, and non-sequential retrieval patterns
- Modular component architecture
- Search modules
- Memory modules
- Routing modules
- Iterative retrieval patterns
- Adaptive retrieval strategies
The Agent Architect
One pattern, one tradeoff, one production failure story. A short weekly briefing for people building agentic systems.
Weekly email, one-click unsubscribe. We only use your address to send the briefing.
References
The papers, specifications, and repositories this pattern is based on.
- Modular RAG: Transforming RAG Systems into LEGO-like Reconfigurable Frameworks (Zhang et al., 2024)arXiv:2407.21059
- RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processing (Zhao et al., 2024)arXiv:2404.19543
- Seven Failure Points When Engineering a Retrieval Augmented Generation SystemarXiv:2401.05856
- Retrieval-Augmented Generation for Large Language Models: A Survey (Gao et al., 2023)arXiv:2312.10997
- LlamaIndex Modular Architecture: Building Blocks and Interfaces
From the engineer behind this catalog
Get your agent architecture reviewed
This page documents one pattern. Your system runs dozens, and most failures live in how they fit together. Have the whole design reviewed against the 288 patterns in this catalog: architecture, reliability, evaluation and cost, every finding mapped to the pattern that fixes it.
€750 instead of €1,500, one week, written report and walkthrough call, until 30 September