13 section
Reliability & Safety
Two different problems under one heading: keeping the system up when a provider fails, and keeping the output safe when the model says something it should not.
What is in here
Start with Reliability Patterns — retries, circuit breakers, bulkheads, failover — because uptime is the cheaper problem and its fixes are deterministic. Then Guardrails for input and output filtering, hallucination checks and fallbacks, followed by its shorter companion chapter weighted toward prompt injection and tool-action safety. Ensemble Methods closes the section by pricing what a second and third model call actually buy.
01
8 min
Reliability Patterns
Retry with jittered backoff, circuit breakers, bulkheads, per-stage timeouts, graceful degradation and multi-provider failover, each sized against a real availability target.
reliabilitypatternsinfrastructure
02
9 min
Guardrails and Safety
Filtering inputs and outputs, grounding checks against retrieved sources, schema validation on structured output, and a fallback ladder for when the model still returns garbage.
guardrailsreliabilitypatterns
03
7 min
Guardrails: Attack-Surface View
A second, shorter pass at guardrails weighted toward attack surface: prompt-injection defense, action safety for tool-calling agents, and where each check sits in the pipeline.
guardrailssecurityagents
04
10 min
Ensemble Methods
When paying for several model calls buys real accuracy: panels of judges, self-consistency, best-of-N, multi-agent debate, and the point where the spend stops paying.
ensemblesreliabilitycost