← Back to Dashboard
1. Flow Design Fundamentals2. Fallback and Escalation Graphs
Flow Design Fundamentals
📚 Bedrock Flows⏱ 10 min⭐ 80 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
| Node | Role | Example |
|---|---|---|
| Prompt | Run an inference step with a template | Classify the request: billing / technical / legal |
| Knowledge Base | Retrieve grounded context | Fetch relevant policy sections |
| Condition | Branch on a value | If category == "legal" → escalate path |
| Lambda | Deterministic business logic | Look up entitlements, format output |
| Agent | Delegate a bounded sub-task | Run 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