Inferensys

Prompt

Escalation Criteria Definition Prompt Template

A practical prompt playbook for using the Escalation Criteria Definition Prompt Template in production AI workflows.
Operations team reviewing AI workflow automation on laptop, workflow builder visible, casual office setup.
PROMPT PLAYBOOK

When to Use This Prompt

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

This prompt is for AI platform architects and reliability engineers who need to convert natural-language operational policies into a structured, machine-readable escalation criteria document. The core job-to-be-done is codifying an organization's tribal knowledge about when a system should retry, when it should ask for clarification, and when it must hand off to a human. The ideal user has access to existing runbooks, SLAs, or policy documents and needs a consistent, auditable artifact that can be referenced by downstream automation, such as a retry budget controller or a human-in-the-loop review queue.

Do not use this prompt when the underlying policy is undefined, when the goal is to design the escalation logic from scratch without source material, or when the output will directly gate high-risk actions without human review. The prompt produces a definition document, not an execution decision. It requires a clear [POLICY_DOCUMENT] as input, along with a defined [OUTPUT_SCHEMA] that specifies the required fields for each escalation path, such as trigger conditions, confidence thresholds, retry budgets, and SLA targets. The prompt also benefits from [CONSTRAINTS] that limit the scope, such as 'only define paths for payment failures' or 'exclude paths requiring legal review.'

After generating the structured criteria, you must validate the output for completeness and consistency against the source policy. A common failure mode is the model inventing escalation paths that sound plausible but are not present in the original document. To mitigate this, implement a grounding check that requires each criterion to cite a specific section of the input policy. The next step is to treat this output as a configuration artifact: version it, review it with the operations team, and use it as the source of truth for building the actual escalation logic in your application harness.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Escalation Criteria Definition Prompt Template delivers value and where it introduces operational risk.

01

Good Fit: Codifying Informal Policies

Use when: Your team has escalation rules that live in runbooks, wikis, or tribal knowledge and you need to convert them into a structured, machine-readable criteria document. Guardrail: Always ground the output against the source policy documents and flag any criteria the model inferred but could not locate in the provided text.

02

Bad Fit: Greenfield Policy Creation

Avoid when: No escalation policy exists and you expect the model to invent thresholds, SLAs, and paths from scratch. Risk: The model will generate plausible but unvalidated rules that lack organizational buy-in and operational testing. Guardrail: Use this prompt only after human stakeholders have drafted the policy intent.

03

Required Inputs

What you must provide: A natural-language policy document, a list of escalation roles or queues, and the desired output schema for the criteria document. Risk: Missing role definitions cause the model to invent generic escalation paths that do not match your actual team structure. Guardrail: Validate that every escalation target in the output maps to a real person, team, or system.

04

Operational Risk: Drift Between Policy and Practice

What to watch: The generated criteria document may look correct but encode thresholds that are too aggressive or too lenient for real-world operations. Guardrail: Run the criteria through a dry-run evaluation against historical incidents before deploying it to production routing logic.

05

Operational Risk: Incomplete Coverage

What to watch: The model may omit edge-case escalation paths that are rare but high-severity, such as multi-tenant data exposure or model unavailability during peak load. Guardrail: Maintain a checklist of mandatory escalation scenarios and verify each one appears in the generated criteria document with a defined path and SLA.

06

Variant: Confidence-Integrated Escalation

Use when: You want escalation criteria that incorporate model confidence scores, uncertainty flags, or retry-budget state. Guardrail: Pair this prompt with the Confidence Score Calibration Prompt Template to ensure the thresholds you define are calibrated against actual model performance, not arbitrary numbers.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template with square-bracket placeholders that produces a structured escalation criteria document from natural-language policy inputs.

This prompt template takes a natural-language policy document, operational context, and risk tolerance parameters to produce a structured escalation criteria specification. The output defines confidence thresholds, escalation paths, SLAs, and decision rules that can be directly implemented in an AI harness. Use this template when you need to codify human-written policies into machine-actionable escalation logic, and avoid it when the policy itself is still under active debate or when the domain requires legal review of the resulting criteria.

text
You are an escalation criteria engineer. Your task is to convert a natural-language policy document into a structured escalation criteria specification that can be implemented in an AI operations harness.

## INPUT

**Policy Document:**
[POLICY_DOCUMENT]

**Operational Context:**
[OPERATIONAL_CONTEXT]

**Risk Tolerance Level:** [RISK_TOLERANCE]

**Retry Budget Constraints:**
[RETRY_BUDGET]

**Available Escalation Paths:**
[ESCALATION_PATHS]

## OUTPUT SCHEMA

Produce a JSON object with the following structure:

```json
{
  "escalation_criteria": [
    {
      "criterion_id": "string",
      "trigger_condition": "string",
      "confidence_threshold": "number between 0 and 1",
      "severity": "low | medium | high | critical",
      "escalation_path": "string matching an available path",
      "sla_minutes": "number",
      "requires_human_review": "boolean",
      "fallback_action": "string",
      "policy_source_reference": "string citing the policy section"
    }
  ],
  "default_escalation_path": "string",
  "retry_budget_allocation": {
    "per_criterion": [
      {
        "criterion_id": "string",
        "max_retries": "number",
        "backoff_strategy": "string"
      }
    ],
    "global_max_retries": "number"
  },
  "completeness_checks": {
    "covered_policy_sections": ["string"],
    "uncovered_policy_sections": ["string"],
    "gaps_identified": ["string"]
  },
  "consistency_notes": ["string"]
}

CONSTRAINTS

[CONSTRAINTS]

EXAMPLES

[EXAMPLES]

INSTRUCTIONS

  1. Extract every condition, threshold, or rule from the policy document that implies an escalation decision.
  2. For each extracted rule, define a concrete trigger condition with a measurable confidence threshold.
  3. Assign severity levels based on the operational impact described in the policy.
  4. Map each criterion to exactly one available escalation path.
  5. Set SLAs that reflect the urgency implied by the policy language.
  6. Flag any criterion where the policy is ambiguous and human review is required.
  7. Run completeness checks: list every policy section and confirm whether it produced at least one criterion.
  8. Identify consistency issues such as conflicting thresholds, missing paths, or circular escalation logic.
  9. If the policy document contains no measurable thresholds, infer reasonable defaults and flag them in consistency_notes.
  10. Output only the JSON object. Do not include explanatory text outside the JSON.

Adapt this template by replacing each square-bracket placeholder with concrete values. For [POLICY_DOCUMENT], provide the full text of the policy you want to codify. For [OPERATIONAL_CONTEXT], describe the system, its users, and the types of requests it handles. [RISK_TOLERANCE] should be a label like low, medium, or high that influences threshold strictness. [RETRY_BUDGET] defines how many total retries are available across the system. [ESCALATION_PATHS] should list the concrete paths available, such as human_review_queue, senior_analyst_escalation, automated_retry, or abort. Use [CONSTRAINTS] to add domain-specific rules like regulatory requirements, and [EXAMPLES] to provide few-shot demonstrations of correctly structured criteria. After generating the output, validate the JSON schema, check that every criterion references a real escalation path, and confirm that completeness_checks accurately reflect the policy document's coverage. For high-risk domains, always route the output through human review before deploying the criteria to production.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Escalation Criteria Definition Prompt. Each placeholder must be populated before the prompt is sent to the model. Missing or malformed inputs are the most common cause of invalid escalation documents.

PlaceholderPurposeExampleValidation Notes

[POLICY_DOCUMENT]

The source natural-language policy text that defines escalation rules, thresholds, and paths

All P0 incidents must be escalated to the on-call SRE within 5 minutes. P1 incidents go to the lead engineer within 15 minutes.

Must be non-empty string. Parse check for minimum 50 characters. If policy is fragmented across multiple docs, concatenate before insertion.

[SEVERITY_LEVELS]

A structured list of severity classifications used in the organization's incident management framework

P0: Critical, P1: High, P2: Medium, P3: Low

Must be a valid JSON array of objects with 'level' and 'label' keys. Schema validation required. Null not allowed.

[ESCALATION_PATHS]

Available escalation destinations including teams, roles, and systems that can receive escalated items

Must be a valid JSON array of strings or objects with 'id' and 'channel' keys. At least one path required. Duplicate check recommended.

[RESPONSE_SLAS]

Time-based service level agreements for each severity level, defining maximum response and resolution windows

P0: 5min response, 1hr resolution; P1: 15min response, 4hr resolution

Must be a valid JSON object mapping severity levels to response and resolution times in minutes. All severity levels from [SEVERITY_LEVELS] must be covered. Missing SLA entries trigger a completeness warning.

[RETRY_BUDGET_CONFIG]

Maximum retry attempts and backoff strategy before forced escalation, preventing infinite loops

max_retries: 3, backoff_multiplier: 2.0, initial_delay_seconds: 5

Must be a valid JSON object with 'max_retries' (integer, min 1), 'backoff_multiplier' (float, min 1.0), and 'initial_delay_seconds' (integer, min 1). Null allowed if retry is disabled.

[CONFIDENCE_THRESHOLD_MAP]

Minimum confidence scores required for autonomous action per severity level, below which escalation is triggered

P0: 0.95, P1: 0.85, P2: 0.70, P3: 0.60

Must be a valid JSON object mapping severity levels to float values between 0.0 and 1.0. All severity levels must be present. Values outside 0-1 range trigger a validation error.

[OUTPUT_SCHEMA]

The expected structure for the generated escalation criteria document, defining required fields and types

See escalation-criteria-schema.json in the project repository

Must be a valid JSON Schema object. Required fields check: 'severity', 'conditions', 'escalation_path', 'sla_minutes', 'retry_policy'. Schema validation against the provided definition is mandatory before accepting the output.

[HUMAN_APPROVAL_FLAG]

Boolean indicating whether the generated criteria require human review before deployment to production systems

Must be boolean true or false. If true, the prompt output must include a review-ready summary section. If false, automated deployment is permitted but audit logging is still required. Default to true for P0 and P1 severity levels.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Escalation Criteria Definition prompt into an application or operational workflow.

This prompt is not a one-off document generator; it is a policy-to-configuration compiler. The implementation harness should treat the prompt as a deterministic transformation step that converts natural-language policies, risk matrices, and operational constraints into a structured escalation criteria document. The harness must validate that the output is complete, internally consistent, and actionable before it is committed to any runbook, routing engine, or review queue configuration. Because escalation criteria directly govern when AI systems stop, retry, or hand off to humans, the harness must enforce strict schema validation and flag any ambiguity that could cause production misrouting.

Wire the prompt into a policy ingestion pipeline: accept a policy document, a risk tolerance profile, and a list of available escalation paths as inputs. Before calling the model, pre-process the policy document to extract relevant sections (e.g., severity definitions, response time commitments, regulatory requirements) and inject them into the [POLICY_DOCUMENT] placeholder. After receiving the model output, run a multi-stage validation pass. First, validate the JSON schema against a predefined escalation criteria schema that requires fields like trigger_conditions, confidence_thresholds, escalation_paths, sla_timers, and fallback_actions. Second, run a completeness check: every escalation path defined in the input must appear in the output, and every trigger condition must map to at least one path. Third, run a consistency check: no two trigger conditions should map to conflicting paths for the same input state, and all confidence thresholds must be within valid ranges (0.0 to 1.0). If any validation fails, log the specific failure, append it to the retry context, and re-invoke the prompt with the error details in a [PREVIOUS_ERRORS] placeholder. Cap retries at three attempts before escalating the policy-to-criteria compilation failure to a human reviewer.

For high-risk domains such as healthcare, finance, or safety-critical operations, never auto-apply the generated criteria to production routing without human approval. The harness should produce a diff view comparing the new criteria against the currently deployed criteria, highlighting additions, removals, and threshold changes. Route this diff to a review queue with a structured approval payload that includes the original policy document, the generated criteria, the diff, and any validation warnings. Only after explicit human sign-off should the criteria be deployed to the routing engine or agent harness. Log every compilation attempt, validation result, and approval decision for audit trails. Avoid the temptation to treat this as a fire-and-forget prompt; stale escalation criteria are a latent production risk, so schedule periodic re-compilation whenever source policies change.

IMPLEMENTATION TABLE

Expected Output Contract

Structured fields, types, and validation rules for the escalation criteria document produced by this prompt. Use this contract to parse, validate, and route the model output before integrating it into downstream policy engines or review queues.

Field or ElementType or FormatRequiredValidation Rule

escalation_criteria_document

JSON object

Top-level object must parse as valid JSON. Schema validation against expected keys required.

policy_id

string

Must match the [POLICY_ID] input exactly. Non-empty string check.

generated_at

ISO 8601 datetime string

Must parse as valid ISO 8601 datetime. Must be within 5 minutes of system clock at generation time.

criteria

array of objects

Array must contain at least 1 item. Each item must have required sub-fields: criterion_id, condition, escalation_path, severity, sla_minutes.

criteria[].criterion_id

string

Must be unique within the array. Must match pattern ^ESC-[A-Z0-9]{4}$.

criteria[].condition

string

Must contain at least one explicit threshold reference (e.g., confidence < 0.7, retry_count >= 3). Free-text but must not be empty.

criteria[].escalation_path

enum string

Must be one of: human_review, clarification_request, retry_with_context, abort, fallback_response. Enum membership check.

criteria[].severity

enum string

Must be one of: critical, high, medium, low. Enum membership check.

criteria[].sla_minutes

integer

Must be a positive integer. Must be >= 1 and <= 10080 (1 week). Range check.

coverage_gaps

array of strings or null

If not null, each string must reference a policy section not covered by any criterion. Null allowed if coverage is complete.

consistency_notes

array of strings or null

If not null, each string must describe a conflict found between criteria. Null allowed if no conflicts detected.

source_policy_version

string

Must match the [POLICY_VERSION] input exactly. Non-empty string check.

PRACTICAL GUARDRAILS

Common Failure Modes

Escalation criteria prompts fail in predictable ways when moving from policy documents to production decision gates. These are the most common failure modes and how to guard against them.

01

Vague Thresholds Produce Inconsistent Decisions

What to watch: The prompt generates escalation criteria using fuzzy language like 'high severity' or 'significant impact' without defining measurable thresholds. Different runs produce different escalation decisions for the same input. Guardrail: Require the prompt to output explicit numeric thresholds, duration windows, or countable conditions. Validate that every criterion includes at least one measurable trigger.

02

Missing Escalation Paths for Edge Cases

What to watch: The generated criteria document covers common scenarios but leaves gaps for rare but critical failures—such as partial outputs, tool timeouts, or authentication errors. These unhandled cases cause silent failures or infinite retry loops. Guardrail: Include a completeness check step that cross-references the generated criteria against a known failure-type taxonomy. Flag any uncovered categories for manual review.

03

Policy-to-Criteria Drift

What to watch: The prompt paraphrases or reinterprets policy language, introducing subtle meaning shifts. A policy that says 'escalate when customer data may be exposed' becomes 'escalate on data access errors,' missing silent data leaks. Guardrail: Add a consistency verification pass that maps each generated criterion back to its source policy statement. Require the model to quote the originating policy text for each criterion.

04

SLA Contradictions Across Paths

What to watch: Different escalation paths define conflicting response-time targets or ownership assignments. A severity-2 incident escalates to both the on-call engineer and the support queue with different SLAs, creating confusion. Guardrail: Include a cross-path consistency check that detects conflicting time targets, duplicate owners, or circular escalation chains. Flag contradictions before the document is finalized.

05

Over-Escalation from Broad Criteria

What to watch: The prompt defines escalation triggers so broadly that every minor anomaly routes to human review. Alert fatigue and queue overload follow within hours of deployment. Guardrail: Require the prompt to include a filtering tier that distinguishes between informational alerts and actionable escalations. Validate that each criterion includes a materiality or impact threshold before triggering human review.

06

Undefined Retry Budget Integration

What to watch: The criteria document defines when to escalate but ignores the retry budget state. A failure that should trigger escalation after three retries instead escalates immediately, or worse, never escalates because the retry counter isn't referenced. Guardrail: Require every escalation criterion to reference the retry budget state explicitly. Include a validation rule that escalation paths consuming retry attempts must check remaining budget before firing.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to evaluate the quality of the escalation criteria document produced by the prompt. Test each criterion before shipping the prompt into production.

CriterionPass StandardFailure SignalTest Method

Threshold Completeness

All [CONFIDENCE_THRESHOLDS] from the policy are mapped to a specific escalation path with a numeric value

Missing threshold values or paths; placeholder text like 'TBD' remains in the output

Parse the output JSON and assert that every threshold key has a non-null numeric value and a non-empty path string

Path Actionability

Each escalation path includes a concrete action (e.g., 'route_to_queue:X', 'retry_with_prompt:Y') and not just a label

Paths contain only vague labels like 'escalate' or 'review' without a machine-readable action or target

Validate each path string against a regex for 'action:target' format; fail if any path lacks a colon delimiter

SLA Mapping Accuracy

All [SLA_WINDOWS] from the input policy are correctly converted to ISO 8601 duration format in the output

Durations are missing, use non-standard units (e.g., 'quickly'), or contradict the source policy text

Extract all durations from the output; assert each matches a parsed duration from the source policy within a 5% tolerance

Consistency with Source Policy

No invented thresholds, paths, or SLAs appear that are not directly traceable to a sentence in the [POLICY_DOCUMENT]

The output contains an escalation path for a risk category not mentioned in the source policy, or adds a stricter SLA

Use an LLM-as-judge to check each output statement against the source document; fail if hallucination score > 0

Completeness Check Pass

The output self-reports 'completeness_check: true' and lists zero missing required fields

The completeness_check field is false or the missing_fields array is not empty

Parse the top-level 'completeness_check' boolean; assert it is true and 'missing_fields' is an empty array

Output Schema Validity

The output strictly conforms to the [OUTPUT_SCHEMA] with all required fields present and correctly typed

JSON parsing fails, a required field like 'escalation_paths' is missing, or a field has an incorrect type (e.g., string instead of array)

Validate the output string against the provided JSON Schema; fail on any validation errors

Boundary Case Handling

Edge-case inputs (e.g., 0% confidence, 100% confidence, missing optional fields) produce a valid, non-crashing output

The prompt returns an error, an empty object, or a malformed response when given a boundary value for [CONFIDENCE_SCORE]

Run the prompt with a test suite of boundary values; assert a 100% valid JSON output rate across all cases

Rationale Clarity

The 'escalation_rationale' field provides a specific, policy-grounded reason for the chosen path, not a generic statement

The rationale is a generic phrase like 'low confidence' or 'policy requires it' without citing the specific rule or threshold breached

Use an LLM evaluator to score rationale specificity on a 1-5 scale; fail if the average score across test cases is below 4

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a single policy document and a simplified output schema. Remove SLAs and strict completeness checks. Focus on getting the escalation paths and thresholds right before adding rigor.

code
[POLICY_DOCUMENT]: [paste policy text here]

Define escalation criteria for the following scenarios:
- [SCENARIO_1]
- [SCENARIO_2]

Output a JSON object with `escalation_paths` and `thresholds`.

Watch for

  • Missing edge cases not covered in the policy document
  • Overly broad threshold definitions that trigger too many escalations
  • Inconsistent path naming across scenarios
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.