Inferensys

Prompt

Escalation Criteria Definition Prompt for Agent Systems

A practical prompt playbook for using Escalation Criteria Definition Prompt for Agent Systems in production AI workflows.
Wide-angle shot of a modern WeWork open floor plan with creative walls covered in AI system architecture diagrams, product team collaborating in standing desk area with industrial lighting.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, reader, and constraints for the Escalation Criteria Definition Prompt.

This prompt is for system architects and platform engineers who need to convert operational requirements, risk policies, and capability boundaries into a structured, machine-readable escalation policy document. The job-to-be-done is not just writing a policy in prose, but producing a set of explicit conditions, thresholds, and routing rules that an agent harness can evaluate at runtime. Use this when you are designing a new multi-agent system, hardening an existing agent's handoff logic, or preparing for a compliance review that requires traceable escalation decisions. The ideal user has access to the system's service-level objectives (SLOs), known model capability limits, a risk matrix, and a topology of available downstream agents or human review queues.

Do not use this prompt when you need a runtime escalation decision for a single event. This prompt defines the policy; it does not execute it. For live decisions, pair the output of this prompt with the Risk-Based Escalation Decision Prompt or the Agent Escalation Confidence Threshold Prompt Template. Also avoid this prompt if your agent topology is undefined or if you lack concrete operational constraints—the output will be generic and untestable. The prompt requires square-bracket placeholders for [AGENT_CAPABILITIES], [RISK_MATRIX], [OPERATIONAL_CONSTRAINTS], [AVAILABLE_ESCALATION_TARGETS], and [EDGE_CASE_SCENARIOS]. If you cannot populate these with real data, stop and define them first.

After generating the policy document, you must validate it against the provided edge-case scenarios and run it through a structured output parser. The policy should be stored as a versioned artifact in your agent orchestration layer, not as a one-off chat response. Wire the resulting JSON policy into your agent's handoff evaluator so that every stop_and_escalate decision is logged with a reference to the specific policy clause that triggered it. For high-risk domains, require human review of the generated policy before it goes live, and schedule a review cadence tied to model updates or topology changes.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Escalation Criteria Definition Prompt delivers value and where it introduces risk. Use these cards to decide if this prompt fits your agent architecture before integrating it into a production pipeline.

01

Good Fit: Greenfield Agent Policy Design

Use when: You are defining escalation rules for a new agent system and need a structured policy document from operational requirements. Guardrail: Treat the generated policy as a draft. Validate every threshold and routing rule against real failure scenarios before encoding it into agent configuration.

02

Bad Fit: Runtime Escalation Decisions

Avoid when: You need a prompt that makes live escalation calls inside an agent loop. This prompt produces a static policy document, not a real-time decision. Guardrail: Pair this design-time prompt with a separate runtime escalation prompt that references the generated policy as its grounding context.

03

Required Inputs

Risk: Incomplete operational requirements produce vague escalation policies that agents cannot follow. Guardrail: Require concrete inputs: known failure modes, capability boundaries, risk tolerances, human availability windows, and existing routing topologies. Reject policy generation if fewer than three specific escalation triggers are provided.

04

Operational Risk: Policy Drift

Risk: The generated policy ages as agents, tools, and business rules change. Agents following stale escalation rules will over-escalate or under-escalate. Guardrail: Version the policy document with a last_reviewed date. Add a scheduled regression test that replays known escalation scenarios against the current policy and flags drift.

05

Operational Risk: Over-Specification

Risk: The prompt may produce an exhaustive policy that covers every edge case but is too complex for agents to follow reliably. Guardrail: Add a constraint for a maximum of 10 escalation rules. Require each rule to include a one-sentence decision test that an agent can evaluate in a single inference call.

06

Operational Risk: Missing Human Handoff Contract

Risk: The policy defines when to escalate to a human but not what the human receives. Reviewers get raw agent context and cannot act quickly. Guardrail: Require the policy to specify a handoff payload schema for each human escalation path, including required fields for summary, evidence, and pending decisions.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for generating a structured escalation policy document from operational requirements, with placeholders for system context, risk tolerance, and output format.

This prompt template is designed to be dropped into an agent orchestration layer or a policy-generation workflow. It takes raw operational requirements—such as capability boundaries, risk thresholds, and tool availability—and produces a structured escalation policy document. The output is intended to be parsed by downstream routing logic or reviewed by a reliability engineer before being encoded into agent configuration. The template uses square-bracket placeholders for all variable inputs, making it safe to wrap in a string formatting function or a prompt assembly pipeline without accidental token collision.

text
You are an escalation policy architect for an autonomous agent system. Your task is to produce a structured escalation criteria document based on the operational requirements provided.

## SYSTEM CONTEXT
[SYSTEM_DESCRIPTION]

## AGENT CAPABILITIES
Current agent scope and known limitations:
[AGENT_CAPABILITIES]

## AVAILABLE ESCALATION TARGETS
List of agents, humans, or fallback paths that can receive escalations:
[ESCALATION_TARGETS]

## RISK TOLERANCE
[RISK_TOLERANCE]

## REGULATORY OR COMPLIANCE CONSTRAINTS
[COMPLIANCE_CONSTRAINTS]

## OPERATIONAL REQUIREMENTS
[OPERATIONAL_REQUIREMENTS]

## OUTPUT SCHEMA
Produce a JSON document with the following structure:
{
  "policy_name": "string",
  "version": "string",
  "escalation_rules": [
    {
      "rule_id": "string",
      "trigger_condition": "string (precise, machine-evaluable description)",
      "trigger_category": "capability_gap | confidence_threshold | risk_threshold | policy_violation | tool_failure | timeout | ambiguity | deadlock | circuit_breaker",
      "thresholds": {
        "metric": "string",
        "operator": "lt | lte | gt | gte | eq | neq",
        "value": "number | string"
      },
      "escalation_target": "string (must match an entry in AVAILABLE ESCALATION TARGETS)",
      "priority": "critical | high | medium | low",
      "required_context_payload": ["field1", "field2"],
      "cooldown_seconds": "number (minimum time before this rule can fire again)",
      "human_review_required": "boolean"
    }
  ],
  "default_fallback": "string (target when no rule matches)",
  "circuit_breaker": {
    "max_consecutive_escalations": "number",
    "reset_window_seconds": "number",
    "breaker_action": "halt | route_to_human | route_to_fallback"
  },
  "audit_requirements": ["field1", "field2"]
}

## CONSTRAINTS
- Every trigger_condition must be specific enough to evaluate programmatically.
- Every escalation_target must reference an entry from AVAILABLE ESCALATION TARGETS.
- Include at least one rule for each trigger_category that applies to this system.
- If COMPLIANCE_CONSTRAINTS are provided, every rule that touches regulated data must set human_review_required to true.
- The circuit_breaker configuration must prevent infinite escalation loops.
- Do not invent capabilities or targets not listed in the inputs.

## EXAMPLES
[FEW_SHOT_EXAMPLES]

## OUTPUT
Return only valid JSON. No markdown fences, no commentary.

To adapt this template, replace each square-bracket placeholder with concrete values from your system design documents. The [FEW_SHOT_EXAMPLES] placeholder is optional but strongly recommended: provide one or two example escalation rules that match your domain's expected trigger conditions and routing patterns. If your system has no compliance constraints, set [COMPLIANCE_CONSTRAINTS] to "None" and the constraint about human_review_required will not activate. Before wiring this into an automated pipeline, validate the output JSON against the schema and run a set of edge-case scenarios—such as simultaneous trigger conditions or missing escalation targets—through the policy to confirm the generated rules produce correct routing decisions. For high-risk domains, always route the generated policy through a human review step before deploying it to production agent orchestration.

IMPLEMENTATION TABLE

Prompt Variables

Required and optional inputs for the Escalation Criteria Definition Prompt. Each placeholder must be populated before the prompt is assembled and sent to the model. Validation notes describe how to check that the input is well-formed before execution.

PlaceholderPurposeExampleValidation Notes

[AGENT_CAPABILITY_STATEMENT]

Defines the agent's authorized scope, tool access, and known limitations to bound the escalation policy.

Handles tier-1 billing inquiries. Cannot process refunds, access PII, or modify account status.

Check that the statement is non-empty and includes explicit capability boundaries. A statement without limitations is invalid.

[OPERATIONAL_REQUIREMENTS]

Lists the business rules, compliance policies, and operational constraints that trigger escalation.

Escalate if transaction amount > $500. Escalate if user mentions 'fraud' or 'lawsuit'. Escalate if confidence < 0.85.

Parse as a list of discrete rules. Each rule must contain a trigger condition and a target escalation path. Reject if no rules are present.

[ESCALATION_TARGETS]

Enumerates the available escalation destinations: specific agents, human queues, or fallback systems.

['billing_specialist_agent', 'human_finance_queue', 'supervisor_agent', 'dead_letter_queue']

Validate that each target is a known, reachable endpoint in the system topology. Unknown targets must be rejected before prompt assembly.

[RISK_TOLERANCE_LEVEL]

Sets the organizational risk appetite that governs escalation thresholds.

LOW_RISK: escalate only for regulatory violations. MEDIUM_RISK: escalate for financial impact > $100. HIGH_RISK: escalate for any uncertainty.

Must be one of an enumerated set: LOW_RISK, MEDIUM_RISK, HIGH_RISK. Reject any other value. Default to MEDIUM_RISK if null.

[CONFIDENCE_THRESHOLD]

The minimum model confidence score below which the agent must escalate rather than act.

0.80

Must be a float between 0.0 and 1.0. Values below 0.5 or above 0.99 should trigger a warning log but are not rejected. Null defaults to 0.85.

[EDGE_CASE_SCENARIOS]

A set of boundary-condition scenarios used to validate the generated escalation policy before deployment.

['User submits a blank form', 'User uploads a malicious file', 'Agent tool returns a 500 error', 'User speaks a language the agent does not support']

Must contain at least 3 scenarios. Each scenario should describe a concrete failure or boundary condition, not a generic category. Reject if empty or contains only abstract labels.

[OUTPUT_SCHEMA]

The expected structure for the generated escalation policy document.

{ conditions: [{ trigger, severity, target, rationale }], default_behavior: string, review_required: boolean }

Validate that the schema is a valid JSON Schema or TypeScript interface definition. Reject if the schema is missing required fields for trigger and target.

[POLICY_CONSTRAINTS]

Hard constraints that the escalation policy must not violate, such as regulatory requirements or latency budgets.

Must not escalate PII to unapproved agents. Escalation decision latency must not exceed 200ms. All escalations must produce an audit log entry.

Each constraint must be a declarative statement with a clear pass/fail condition. Reject if constraints are vague or unverifiable. At least one constraint is required.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the escalation criteria definition prompt into an agent platform or policy pipeline with validation, retries, and human review gates.

This prompt is designed as a policy generation step, not a runtime decision point. It should be called during system configuration or policy update workflows—whenever operational requirements change, new agent capabilities are added, or post-incident reviews reveal gaps in existing escalation rules. The output is a structured document that downstream agent orchestrators, circuit breakers, and handoff routers will consume as their source of truth. Treat this prompt as a build-time artifact generator, not a per-request classifier.

Wire the prompt into a policy management pipeline with these components: (1) Input assembly—collect operational requirements, risk matrices, agent capability manifests, and regulatory policy documents into the [OPERATIONAL_REQUIREMENTS] and [POLICY_DOCUMENTS] placeholders. If using RAG, retrieve relevant policy clauses and agent capability specs before prompt assembly. (2) Schema validation—parse the generated JSON output against a strict schema that enforces required fields (condition_id, trigger_type, threshold, target_agent, priority, evidence_required). Reject and retry any output missing these fields. (3) Edge-case testing—run the generated policy through a battery of synthetic scenarios (agent timeout, tool failure, ambiguous intent, confidence below threshold, regulatory keyword match) and verify each scenario maps to exactly one escalation rule with a non-null routing target. (4) Human review gate—before the policy document is deployed to production agent routers, route it to a policy reviewer with a diff against the previous version. The reviewer approves, rejects, or amends. (5) Versioned deployment—store the approved policy with a semantic version, deploy it to agent orchestrators via a configuration store (not hardcoded in prompts), and log every policy change with the reviewer's identity and timestamp.

Model choice matters here. Use a model with strong structured output capabilities and long-context handling (GPT-4o, Claude 3.5 Sonnet, or equivalent). The prompt requires reasoning over multiple constraint sources simultaneously—operational requirements, risk matrices, capability boundaries, and regulatory text. Weaker models tend to drop edge-case conditions or produce overlapping rules. Set temperature low (0.0–0.2) for deterministic policy generation. Retry logic: if schema validation fails, retry up to 2 times with the validation errors injected into the [CONSTRAINTS] field as explicit corrections. If retries are exhausted, escalate to a human policy author with the partial output and error log. Observability: log the prompt version, input hash, output schema validation result, edge-case coverage percentage, and reviewer decision. This audit trail is essential for compliance environments where escalation policy changes must be traceable to specific operational triggers or regulatory updates.

What to avoid: Do not use this prompt at runtime inside an agent's decision loop. It is too expensive and slow for per-request escalation decisions. Instead, use the generated policy document to configure lightweight runtime prompts like the Escalation Confidence Threshold Prompt or Risk-Based Escalation Decision Prompt elsewhere in this pillar. Do not skip the edge-case testing harness—policies that look complete on first read often have blind spots around tool failure modes, timeout scenarios, or overlapping agent capabilities. Finally, never deploy a generated policy without human review if the escalation paths involve safety-critical systems, regulated data, or customer-facing handoffs. The cost of a bad escalation rule is higher than the cost of a review cycle.

IMPLEMENTATION TABLE

Expected Output Contract

Define the exact shape, types, and validation rules for the escalation criteria document produced by the prompt. Use this table to build a parser, validator, or structured output schema before integrating the prompt into an agent harness.

Field or ElementType or FormatRequiredValidation Rule

escalation_policy_id

string (slug)

Must match pattern ^[a-z0-9-]+$ and be unique per policy version

policy_version

string (semver)

Must parse as valid semver (e.g., 1.0.0); reject non-numeric segments

trigger_conditions

array of objects

Array length >= 1; each object must contain condition_id, description, and threshold fields

condition_id

string (slug)

Must be unique within trigger_conditions array; pattern ^cond-[a-z0-9-]+$

threshold

object

Must contain operator (enum: gt, lt, gte, lte, eq) and value (number); reject missing operator

routing_target

string (enum)

Must be one of [human_operator, supervisor_agent, fallback_agent, termination]; reject unknown values

routing_priority

string (enum)

Must be one of [critical, high, medium, low]; default to medium if null

evidence_required

array of strings

If present, each string must reference a valid evidence key from the agent context schema

cooldown_seconds

integer

Must be >= 0; if 0 or null, no cooldown applied; reject negative values

human_handoff_payload

object

Required when routing_target is human_operator; must contain summary (string, max 500 chars) and pending_decisions (array)

override_conditions

array of objects

If present, each object must contain override_reason (string) and authorized_by (string); reject empty override_reason

last_reviewed_timestamp

string (ISO 8601)

Must parse as valid ISO 8601 datetime; reject non-parseable strings

PRACTICAL GUARDRAILS

Common Failure Modes

Escalation criteria prompts fail in predictable ways. Here are the most common failure modes, why they happen, and how to guard against them before they reach production.

01

Over-Escalation on Ambiguity

What to watch: The prompt escalates every low-confidence or ambiguous input to a human, flooding review queues and defeating the purpose of automation. This often happens when the escalation threshold is set too broadly or the prompt lacks a clarification step before escalating. Guardrail: Add a tiered response structure: first attempt clarification, then assess confidence, and only escalate if the clarified input still falls below the threshold. Include explicit non-escalation examples in the few-shot prompts.

02

Silent Failure Without Escalation

What to watch: The agent produces a confident but incorrect output and fails to escalate because the prompt's confidence rubric rewards fluency over factual grounding. The model generates plausible-sounding justifications for staying within its own capability boundary. Guardrail: Require explicit evidence citation for confidence scores. Add a grounding check step that compares claims against provided context before the escalation decision. If evidence is missing, force escalation regardless of the model's self-assessed confidence.

03

Context Stripping During Handoff

What to watch: The escalation prompt correctly identifies the need to hand off but produces a summary that omits critical context—partial results, user constraints, or failure history—causing the receiving agent or human to start from scratch. Guardrail: Define a mandatory context schema for all handoff payloads. Use a separate validation prompt to check that required fields (task history, failure reason, partial outputs, user constraints) are populated before the handoff is executed.

04

Threshold Drift Across Model Versions

What to watch: A confidence threshold calibrated on one model version produces drastically different escalation rates after a model upgrade, either flooding or starving the escalation path. Guardrail: Pin escalation thresholds to eval datasets, not model-specific behavior. Run the escalation prompt against a golden set of borderline cases on every model version change and alert if the escalation rate shifts by more than a predefined tolerance.

05

Policy Rule Collisions

What to watch: Multiple policy rules fire simultaneously and recommend conflicting escalation targets—one rule says escalate to legal, another says escalate to compliance, and the prompt has no arbitration logic. Guardrail: Include an explicit priority ordering for policy rules in the system prompt. Add a conflict detection step that identifies when multiple rules trigger and applies a predefined resolution strategy (highest severity wins, most specific rule wins, or escalate to a designated arbiter).

06

Infinite Escalation Loops

What to watch: Agent A escalates to Agent B, which escalates back to Agent A, creating a loop that consumes resources and delays resolution. This happens when escalation routing rules lack cycle detection or when agents share overlapping capability boundaries. Guardrail: Attach an escalation chain trace to every handoff payload. Before accepting an escalation, check if the target agent has already been in the chain. If a cycle is detected, break to a designated circuit-breaker agent or human queue with the full chain history.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Escalation Criteria Definition Prompt before deploying it into an agent harness. Each criterion validates a specific failure mode common to escalation policy generation.

CriterionPass StandardFailure SignalTest Method

Condition completeness

Every operational requirement maps to at least one explicit escalation condition in the output

An operational requirement from [INPUT_REQUIREMENTS] has no corresponding condition in the policy document

Diff [INPUT_REQUIREMENTS] list against extracted condition triggers; flag orphans

Threshold specificity

All numeric thresholds include a value, unit, and comparison operator

A condition references a threshold without a concrete number or uses vague language like 'high' or 'low'

Regex scan for threshold patterns; flag any condition missing a numeric value with operator

Routing determinism

Every escalation condition resolves to exactly one target agent, human queue, or fallback path

A condition maps to multiple targets without tie-breaking logic or leaves the target unspecified

Parse the routing table; assert each condition has exactly one non-null target field

Edge-case coverage

The policy handles at least the provided [EDGE_CASES] without contradiction

A provided edge case produces no matching condition, an ambiguous match, or a policy violation

Run each [EDGE_CASE] through the policy rules; assert single-match with correct routing

Policy conflict detection

No two conditions produce contradictory routing for the same input state

Two conditions fire simultaneously and route to different targets with no priority rule

Exhaustive pairwise check of condition triggers; flag overlapping trigger sets with divergent targets

Explanation traceability

Every escalation decision includes a reason code that references the triggering condition

A routing entry lacks a reason code or the code does not map to a defined condition

Validate reason codes against the condition catalog; flag unmatched or missing codes

Schema compliance

Output matches the [OUTPUT_SCHEMA] with all required fields present and correctly typed

Missing required field, wrong type, or extra fields that violate the schema contract

Validate output against [OUTPUT_SCHEMA] using a JSON Schema validator; reject on failure

Human-review gating

High-risk conditions are flagged with requires_approval: true and include reviewer instructions

A condition with severity 'critical' or risk_score above [RISK_THRESHOLD] lacks the approval flag

Filter conditions by severity and risk_score; assert requires_approval is true for all above threshold

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a simple JSON schema. Use a single model call without retries or validation harness. Focus on getting the escalation conditions and routing rules into a structured document.

code
[SYSTEM_INSTRUCTION]
You are an escalation policy designer. Given [OPERATIONAL_REQUIREMENTS], produce a structured escalation policy with conditions, thresholds, and routing rules.

[OUTPUT_SCHEMA]
{
  "policy_name": "string",
  "escalation_rules": [
    {
      "condition": "string",
      "threshold": "string",
      "target_agent_or_human": "string",
      "priority": "low|medium|high|critical"
    }
  ]
}

Watch for

  • Missing edge-case conditions in the generated policy
  • Overly broad thresholds that trigger escalation too often or too rarely
  • No validation against the operational requirements document
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.