chapter four
4 Guardrail: A gating mechanism to boost reliability
This chapter covers
- Supporting the reliability and trustworthiness of agentic systems by using guardrails to gate information flow within and around agents
- Understanding how sequential, parallel, buffered, and streaming guardrails trade off safety, latency, and cost
- Practical uses of guardrails for safety, compliance, and security
Have you ever tried to trick a chatbot into saying something it shouldn't—maybe that the Steelers are a better team than the Ravens, or that pineapple is the best pizza topping? You may wonder: if chatbots are meant to be general-purpose tools that adapt to user instructions, why do the models powering them have boundaries to keep them from behaving in ways that could reflect badly on their authors?