Modularity divides a system into components that can be developed, deployed, scaled, and replaced independently. In retrieval-augmented generation (RAG), a retriever finds information and a generator presents it, while a separate document index holds replaceable factual knowledge. section 1.5.3 section 4.1.3
This split supports specialization and lets the index change without retraining the generator. For production systems, standard interfaces and orchestration allow components to be substituted or routed to different resources; search and generation can scale on infrastructure suited to their different workloads. section 4.1.3 section 1.5.3
When choosing a modular design, weigh its operational benefits against the work of coordinating components:
- Separate retrieval from generation to specialize each component and scale them independently. section 4.1.3
- Standardize interfaces and routing so modules can be replaced or combined for different queries. section 1.5.3
- Account for orchestration engineering, whether the system uses microservices or a modular monolith. section 1.5.3
Updating a customer service assistant
When a new product is announced, update the document index so the assistant can use the new information without retraining its generator. section 4.1.3















