← Back to Dashboard
1. Flow Design Fundamentals2. Fallback and Escalation Graphs

Flow Design Fundamentals

📚 Bedrock Flows10 min80 XP

From Single Prompt to Directed Workflow

Amazon Bedrock Flows lets you compose multi-step AI workflows as a visual graph of nodes - prompts, Knowledge Bases, Lambda functions, agents, conditions - instead of burying orchestration logic inside one mega-prompt.

Node Types You Compose

NodeRoleExample
PromptRun an inference step with a templateClassify the request: billing / technical / legal
Knowledge BaseRetrieve grounded contextFetch relevant policy sections
ConditionBranch on a valueIf category == "legal" → escalate path
LambdaDeterministic business logicLook up entitlements, format output
AgentDelegate a bounded sub-taskRun diagnostics with tools

Why a Graph Beats a Mega-Prompt

  • Break large tasks into deterministic sub-steps - each node has one job, one contract, one test surface.
  • Add branching for fallback and escalation - error paths are explicit edges, not hoped-for model behavior.
  • Capture node-level metrics - latency and failure rate per node reveal exactly where the bottleneck lives.
  • Swap components independently - upgrade the classifier model without touching retrieval or formatting.

A Concrete Flow: Support Triage

[Input]
  → (Prompt: classify category + confidence)
  → (Condition: confidence >= 0.8?)
      ├─ yes → (KB: retrieve category docs) → (Prompt: draft grounded reply) → [Output]
      └─ no  → (Lambda: enqueue for human triage) → [Output: handoff summary]
Design principle: put decisions the business must audit into explicit condition nodes, not inside prompt text. "Why did this route to a human?" should be answerable from the flow trace, not by re-reading a prompt.
🧪 Knowledge Check
Press 1-4 to select1 of 2
Why use flows instead of one giant prompt?
To increase complexity for no reason
To improve control, observability, and recovery
To disable retrieval
To remove policy checks