Many GenAI systems share a common set of core components: an API layer that handles requests and streams responses, an orchestrator that builds prompts, a router that selects models, a retrieval system that provides relevant context, and guardrails that check inputs and outputs.
Understanding this common architecture gives you a starting point for GenAI system design interviews. Instead of designing each system from scratch, you can build on a shared foundation and focus on the requirements and challenges unique to each problem.
In this chapter, we'll explore the main layers of a GenAI system, what each does, and how they work together.