Systems, agents, retrieval, infrastructure
Structured Generation, Tool Calling, and Durable AI Workflows
Reliable AI products turn language into typed decisions. This module covers structured generation with JSON schemas, constrained decoding, function calling, validation loops, repair strategies, and the difference between a model suggesting an action and a workflow engine committing that action.
Deep dive summary
What this module actually teaches.
Passage 1Reliable AI products turn language into typed decisions. This module covers structured generation with JSON schemas, constrained decoding, function calling, validation loops, repair strategies, and the difference between a model suggesting an action and a workflow engine committing that action.
Passage 2Learners examine tool orchestration patterns for idempotency, retries, human approval gates, and long-running tasks. The module distinguishes ephemeral chat-style tool calls from durable workflows that need state machines, compensating actions, audit logs, and replayable events.
Passage 3The final mental model is that models are policy engines and workflow runtimes are execution engines. Students will be able to design AI features where the model proposes, validates, and explains, while deterministic code owns irreversible side effects.
Learning operating system
Module prerequisites, concepts, outcomes, and artifacts
Prerequisites
- TypeScript types or Python dataclasses
- API design
- basic event-driven architecture
Key concepts
- JSON schema outputs
- tool call validation
- idempotent actions
- workflow state machines
- human-in-the-loop approval
- event replay
- side-effect isolation
Target audience
- Application engineers building assistants, copilots, internal automation, or task-oriented AI experiences.
Outcomes
- Define tool contracts that models can call reliably
- Separate model reasoning from durable execution
- Design approval gates for high-risk actions
Artifacts
- tool schema style guide
- durable workflow state diagram
- read-only action validation example
Code example
Real patterns, ready to copy into your editor.
A code reference card that frames this module's concepts in real syntax. Copy any example to study it or adapt it directly in your own editor.
1type ModuleBrief = {2 track: string;3 difficulty: string;4 keyConcepts: string[];5 reviewGate: 'human-review-required';6};7 8export const moduleBrief: ModuleBrief = {9 track: 'Software Engineers',10 difficulty: 'Advanced',11 keyConcepts: [12 'JSON schema outputs',13 'tool call validation',14 'idempotent actions',15 'workflow state machines',16 'human-in-the-loop approval',17 ],18 reviewGate: 'human-review-required',19};