liveBook · Manning

Execution policy

As explained in Designing AI Systems

A domain-specific rule set that determines whether an AI-generated action may be executed under the current business context and workflow state.

An execution policy determines whether an AI-generated action may run in the current business context and workflow state. Unlike content moderation, which filters what the model says, execution policies enforce organization-specific rules such as permissions, prerequisites, regulatory requirements, and approval gates. section 6.6

A Guardrails Service centralizes policy enforcement through operations for input validation, output filtering, policy checks, violation reporting, and policy registration. A policy check evaluates a named policy, proposed action, session or user context, and tool arguments before execution. section 6.6

Apply execution policies as defense in depth across the request lifecycle:

  • Validate input for prompt injection, off-topic requests, personally identifiable information, and schema violations. section 6.6
  • Check intended tool calls against session state, permissions, business rules, and required prerequisites before execution. section 6.6
  • Validate tool arguments against domain constraints and schemas, then filter sensitive or erroneous external responses. section 6.6
  • Filter the assembled output for hallucinations, PII, and brand-safety violations before delivery. section 6.6
  • Record blocked actions and support shadow mode, canary enforcement, rollback, structured logs, metrics, and audit trails for safe operations. section 6.9

Booking workflow

Before booking an appointment, the system checks whether intake forms are complete, the appointment type is permitted, and any required referral exists. If the policy denies the tool call, the system reports the violation instead of executing it. section 6.6

Figure 6.9 Execution policy guardrails control what the system does, and content guardrails filter what the model says. Both are necessary, but only execution policies can enforce business-specific rules.

Compare execution-policy guardrails, which control system actions, with content guardrails, which filter model-generated content. section 6.6

Figure 6.10 The five-point inspection model establishes a defense-in-depth architecture for AI interactions. This multi-layered approach ensures comprehensive policy enforcement at every stage of the request lifecycle:(1) Input Validation intercepts malicious prompt injections or off-topic user messages before they reach the model. (2) Pre-Execution Policy evaluates the model's intended tool calls against session state and business rules (e.g., verifying prerequisites are met before booking). (3) Argument Validation ensures the specific parameters sent to external APIs strictly adhere to domain constraints and schemas.(4) External Response Filtering sanitizes sensitive raw data or handles errors returning from external systems before they are incorporated into the AI's context. (5) Output Filtering serves as the final, holistic gate to catch hallucinations, redact PII, and enforce brand safety before the assembled response is delivered to the user.

Inspect the five-point model linking input validation, pre-execution policy, argument validation, external response filtering, and output filtering. section 6.6

How Designing AI Systems covers it

How deep it goes
Defines service operations and five inspection points, then stops short of implementation details for individual policy engines.
Examples
Uses healthcare appointment booking, intake completion, referral checks, tool arguments, blocked actions, and multi-point inspection.
What it assumes
Assumes tool-calling workflows and session context while distinguishing content filtering from domain-specific execution control.
What you can do after
Operate/configure policy enforcement through named checks, inspection points, violation reporting, staged rollout, and audit mechanisms.
How it connects
Connects guardrails with content moderation, tool execution, permissions, schema validation, human approval, observability, and audit trails.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Systems. The section links point to the parts of the book it draws on.