liveBook · Manning

Inspection point model

As explained in Designing AI Systems

A policy-enforcement pattern that places guardrail evaluations at defined locations in an AI request, tool, external-system, and response flow.

The inspection point model places guardrail evaluations throughout an AI interaction rather than treating safety as a single final filter. It establishes defense in depth across requests, tool calls, external systems, and responses. section 6.6

The five inspection points separate distinct enforcement responsibilities:

  • Input validation blocks prompt injection, off-topic requests, and disallowed messages before model processing. section 6.6
  • Pre-execution policy evaluates intended tool calls against session state and business rules. section 6.6
  • Argument validation checks tool parameters against schemas and domain constraints. section 6.6
  • External response filtering redacts sensitive data and handles unexpected errors before model incorporation. section 6.6
  • Output filtering catches hallucinations, redacts personally identifiable information, and enforces brand safety before delivery. section 6.6

Booking flow

A booking flow validates the user's message, checks each proposed tool call against booking rules and session context, reports blocked violations, and validates arguments before external execution. 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.

Use the five-point flow diagram to trace policy enforcement from input through tool execution, external responses, and final output. section 6.6

How Designing AI Systems covers it

How deep it goes
Defines five enforcement locations and connects them to validation, authorization, filtering, and violation reporting, without detailing service internals.
Examples
Uses healthcare booking scenarios involving intake prerequisites, referral matching, booking windows, procedure coverage, and authorized limits.
What it assumes
Assumes an AI flow containing model calls, tool execution, external systems, session context, and generated responses.
What you can do after
Operate/configure multi-point guardrails that block unsafe inputs, unauthorized tools, invalid arguments, sensitive responses, and unsafe outputs.
How it connects
Connects guardrails with prompt injection, tool execution, schema validation, business rules, external response filtering, and output filtering.

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.