liveBook · Manning

Modularity

As explained in Introduction to Generative AI, Second Edition

A modular architecture divides a system into separate components that perform distinct functions and can be designed or modified independently.

Modularity divides a complex system into separate components, each responsible for a distinct function. In generative AI, retrieval, generation, validation, and safety filtering can operate as coordinated parts rather than one end-to-end model invocation. section 10.20

Separating responsibilities gives developers more control: they can intervene in one component, inspect failures, or modify a pipeline without redesigning everything. The tradeoff is added complexity. Coordination can create new failure points and make overall behavior harder to interpret, so modularity does not automatically improve reliability. section 10.20 section 8.24

A modular AI pipeline

One component retrieves relevant documents, another generates a draft, and a final layer screens the response for safety. In agentic systems, modular design can also support human-in-the-loop processes and evaluation suited to long-term, open-ended behavior. section 10.20 section 8.24

Figure 10.4 A schematic diagram for an LLM accessing data stored in a vector database and retrieving search results from the web
A white circle with black text

AI-generated content may be incorrect.

Use the schematic to visualize how retrieval can function as one module within a larger language-model system. section 10.20

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Explains component separation, advantages, and failure risks, but stops short of implementation details.
Examples
Uses document retrieval, draft generation, safety screening, persistent audit logs, and runtime safeguards as system components.
What it assumes
Assumes only a high-level understanding of generative AI systems and explains modular components through plain-language functions.
What you can do after
Evaluate modular and end-to-end architectures by comparing control, reliability, interpretability, complexity, and deployment demands.
How it connects
Connects retrieval, generation, validation, safety filtering, end-to-end architectures, observability, and human-in-the-loop processes.

Also explained in

Compare how 10 books explain modularity →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Introduction to Generative AI, Second Edition. The section links point to the parts of the book it draws on.