GENAI 102
M07 · L02
Designing the System

Choosing the Architecture

Designing an agentic system is a series of structure choices — what to chain, what to run in parallel, and when to lean on plain code versus an LLM. Get these right and the rest of the build gets easier.

01 / 08
GENAI 102
M07 · L02
Four Structure Choices

What Goes Where

Every agentic system comes down to how you arrange the work. Four decisions cover most of it.

  • Chain steps that depend on each other — each one needs the last one's output
  • Parallelize independent steps — nothing waits, so run them at once
  • Use code for anything deterministic — a fixed rule, a lookup, a calculation
  • Use the LLM only where judgment or language is needed
02 / 08
GENAI 102
M07 · L02
The Core Trade-off

Code or the Model?

The LLM is expensive, slow, and unpredictable. If plain code can do a step reliably, use code — and reserve the model for what only it can do.

Rule of thumb
Deterministic work → code. Judgment or free-form language → the LLM.
03 / 08
GENAI 102
M07 · L02
When Things Fail

Plan for Failure

Steps fail — bad output, timeouts, rate limits. A robust system expects it and has somewhere to go.

  • Retries — try again when a call times out or hits a limit
  • Defaults — a sensible fallback value when a step cannot produce one
  • A safe path — what to do when the model returns something unusable
04 / 08
GENAI 102
M07 · L02
The Simplicity Principle

As Simple As It Allows

Keep the design as simple as the task allows. Every branch and every agent you add is more to test and more to debug — the same simplicity discipline you met in Module 4 applies to architecture too.

05 / 08
GENAI 102
Build It
From Concept to Capstone

Build It

How to implement: sketch your feature as boxes and arrows — mark each box “code” or “LLM,” and note one fallback for the riskiest step.

  • Weekly AI Tasks tracker — validation and storage are CODE; only the “understand the message” step is the LLM. Add a fallback that asks the user to rephrase if parsing fails.
  • Personal brand site — layout and links are code and templates; only the prose is the LLM.
06 / 08
GENAI 102
Knowledge Check

Check what stuck

Three questions from this lesson. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

07 / 08
GENAI 102
Summary
Recap

What you learned

Architecture is a set of choices: chain dependent steps, parallelize independent ones, prefer code for deterministic work and the LLM for judgment, plan fallbacks, and keep it as simple as the task allows.

08 / 08