This prompt is for product teams and AI engineers who need to generate a user-facing message when a backend tool call fails. Its job is to transparently communicate the degradation, set accurate expectations, and offer alternatives without exposing internal failure details, error codes, or system architecture. Use this prompt inside a recovery harness that catches tool call exceptions and routes them to a user-communication layer. This is not a prompt for retrying the tool call or fixing the error; it is for managing the user's experience after the system has decided to degrade gracefully.
Prompt
Graceful Degradation User Experience Prompt Template

When to Use This Prompt
Defines the precise job, ideal user, and operational boundaries for the graceful degradation UX prompt.
The ideal user is a product reliability engineer, a full-stack AI developer, or a technical product manager responsible for the end-to-end user experience of an AI-powered feature. The required context includes the original user intent, the name of the unavailable capability, an estimated recovery time if known, and any available alternative actions the user can take. You should not use this prompt when the system can silently retry with a fallback tool and produce an equivalent result without the user noticing a change. It is also inappropriate for internal logging or debugging messages; those require different structures and can safely include error codes and stack traces.
Before wiring this prompt into production, define clear boundaries for what constitutes a user-visible degradation versus a transparent recovery. If the system can switch to a cached result, a slower but functional endpoint, or a simplified version of the same capability, you may not need a user-facing message at all. Reserve this prompt for cases where the user's workflow is materially impacted—a feature is unavailable, a response will be delayed, or the output quality will be reduced. Pair this prompt with feature-flag checks and permission re-verification to ensure the degradation message does not accidentally promise capabilities the user's current plan or role does not permit.
Use Case Fit
Where the Graceful Degradation UX prompt works, where it fails, and what you must provide before using it in production.
Good Fit: User-Facing Product Surfaces
Use when: a backend tool call fails and the user is waiting for a response. This prompt is designed for chat, copilot, and assistant interfaces where silence or a raw error breaks trust. Guardrail: always pair the generated message with a logging event so the operations team knows a degradation occurred.
Bad Fit: Internal Agent-to-Agent Communication
Avoid when: one automated agent calls another with no human in the loop. The polite, expectation-setting language designed for users adds noise and latency to machine-to-machine workflows. Guardrail: use structured error codes and retry logic instead; reserve this prompt for the final human-readable output layer.
Required Inputs
What you must provide: the failed tool name, a user-facing description of what the tool normally does, the degradation reason category (timeout, permission, unavailable), available alternatives, and an estimated recovery time if known. Guardrail: never pass raw stack traces or internal endpoints to the prompt; sanitize all inputs through an abstraction layer first.
Operational Risk: Over-Promising Recovery
What to watch: the model may invent specific recovery times or alternative workflows that do not exist. A message like 'We'll have this fixed in 5 minutes' creates a false SLA. Guardrail: constrain the prompt to only mention recovery timelines when an explicit estimated_recovery_minutes field is provided and non-null; otherwise, instruct the model to use vague language like 'shortly' or 'as soon as possible.'
Operational Risk: Leaking Failure Details
What to watch: the model might expose internal tool names, endpoint URLs, or specific error codes that are useful for debugging but confusing or alarming to users. Guardrail: use a pre-processing step that maps internal failure reasons to user-safe categories (e.g., 'Service Unavailable', 'Feature Temporarily Limited') and pass only those categories to the prompt.
Feature Flag and Permission Awareness
What to watch: the prompt may suggest an alternative tool or workflow that the current user does not have permission to access, creating a second failure. Guardrail: pass a list of available_alternatives that have already been permission-checked and feature-flag validated for the specific user before the prompt runs. Instruct the model to only offer alternatives from that list.
Copy-Ready Prompt Template
A reusable prompt that generates user-facing degradation messages when a tool call fails, balancing transparency with composure.
This template produces a user-facing message when a primary tool call has failed and the system must degrade gracefully. It is designed to be inserted into your system prompt or used as a user message template in a recovery handler. The prompt instructs the model to acknowledge the degradation without exposing internal failure details, set realistic expectations, and offer concrete alternatives. Use it when you have already classified the failure, selected a fallback strategy, and need to communicate the situation to the end user.
textYou are generating a user-facing message for a product experience where a background operation has degraded. [CONTEXT] - User request: [USER_REQUEST] - Primary tool attempted: [PRIMARY_TOOL_NAME] - Failure classification: [FAILURE_CLASSIFICATION] (e.g., timeout, unavailable, rate_limited, partial_result, empty_result) - Fallback action taken: [FALLBACK_ACTION] (e.g., serving_cached_result, using_alternative_tool, deferring, manual_review_queued) - Estimated impact: [IMPACT_DESCRIPTION] (e.g., "results may be up to 15 minutes stale", "only text results are available, images omitted") - Available alternatives: [ALTERNATIVES_LIST] - Feature flags checked: [FEATURE_FLAGS] - User permission level: [USER_PERMISSION_LEVEL] [OUTPUT_SCHEMA] { "message": "string (user-facing message, 1-3 sentences, plain text)", "tone": "string (one of: reassuring, neutral, apologetic)", "expectation_set": "string (what the user should expect next)", "alternative_offered": "boolean", "internal_failure_exposed": "boolean (must be false)" } [CONSTRAINTS] - Do not mention internal tool names, error codes, stack traces, or infrastructure details. - Do not over-apologize or use alarmist language. - If a cached or partial result is being shown, state its freshness or completeness honestly. - If the user can retry, tell them when and how. - If the user cannot fix the issue, do not suggest they try again immediately. - Match the tone to the impact: minor staleness is reassuring; complete unavailability is neutral and direct. - If [USER_PERMISSION_LEVEL] is insufficient for any alternative, do not offer that alternative. - Respect feature flags: if a fallback is disabled via [FEATURE_FLAGS], do not mention it. [EXAMPLES] Example 1: User request: "Show me Q3 revenue by region" Failure: timeout on live analytics tool Fallback: serving cached report from 2 hours ago Message: "Live analytics are temporarily slow, so we're showing your Q3 revenue report from about 2 hours ago. The numbers should be very close to current. We'll refresh automatically when the system recovers." Example 2: User request: "Generate a custom export of all transactions" Failure: export service unavailable Fallback: queued for processing, user will be notified Message: "We weren't able to generate your export right now, but it's been queued and we'll send it to you as soon as it's ready—usually within 15 minutes. No further action needed from you."
Adapt this template by replacing the [CONTEXT] block with values from your tool call recovery handler. The failure classification should come from your error interpreter, not from raw error codes. The fallback action should reflect the actual recovery path selected by your fallback selection logic. Before deploying, test the prompt against each failure classification in your system to ensure the tone and expectation-setting match your product's voice. Wire the output through a post-generation validator that confirms internal_failure_exposed is false and that no banned terms (tool names, error codes, stack traces) appear in the message.
Prompt Variables
Inputs required to assemble the Graceful Degradation UX prompt. Validate these before rendering the user-facing message to prevent leaking internal failure details or exposing disabled features.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[FAILED_TOOL_NAME] | The display name of the unavailable tool or capability | Report Generator | Must be a user-facing label, not an internal function name. Reject if it contains snake_case or endpoint paths. |
[DEGRADATION_REASON] | A sanitized, non-technical reason for the degradation | This feature is temporarily unavailable | Must not contain error codes, stack traces, or vendor names. Must pass a regex check for internal identifiers. |
[AVAILABLE_ALTERNATIVES] | A list of 1-3 alternative actions the user can take | Download the CSV instead | Must be a non-empty array. Each alternative must be a concrete, actionable instruction. Reject if any alternative references the failed tool. |
[FEATURE_FLAG_STATE] | Boolean indicating if the feature is enabled for this user | Must be a boolean. If false, the prompt should not be assembled; the system should route to a static unavailable message instead. | |
[USER_PERMISSION_LEVEL] | The user's current permission tier for the failed tool | standard | Must match an allowed enum: ['admin', 'standard', 'restricted', 'guest']. Used to gate whether to offer self-serve recovery options. |
[ESTIMATED_RECOVERY_TIME] | A human-readable time window for when the tool might be back | within the next hour | Must be null or a string matching a time-phrase pattern. If null, the prompt must not fabricate a timeline. Reject raw epoch timestamps. |
[SUPPORT_CONTACT_INFO] | Escalation path if the user needs further help | Contact support via the Help menu | Must be null or a non-empty string. If null, the prompt must omit any 'contact us' language to avoid a dead-end user experience. |
Implementation Harness Notes
How to wire the graceful degradation prompt into a production application with validation, retries, and observability.
This prompt is designed to sit behind a tool-call failure handler in your application layer, not as a standalone user-facing endpoint. When a primary tool call fails, times out, or returns an error, your application should catch that failure, enrich the context with the failure classification, available fallback options, and user permission state, then invoke this prompt to generate the user-facing degradation message. The prompt expects structured inputs about what failed, what alternatives exist, and what the user is still allowed to do. Do not pass raw stack traces or internal error codes to the prompt; pre-process failures into user-safe categories such as 'temporarily unavailable,' 'partial results available,' or 'feature disabled for maintenance.'
Wire the prompt into a recovery middleware that intercepts tool call failures before they reach the user. The middleware should: (1) classify the failure type using the tool's HTTP status code, error body, or timeout signal; (2) check feature flags and user permissions to determine which alternative tools or static responses are available; (3) assemble the [FAILED_ACTION], [FAILURE_CLASSIFICATION], [AVAILABLE_ALTERNATIVES], [USER_PERMISSIONS], and [FEATURE_FLAG_STATE] inputs; (4) call the LLM with this prompt; (5) validate the output against the expected schema before rendering it to the user. Validation should confirm the response includes a user_message string, an alternatives array, and an expectations object with resolution_time_estimate and retry_guidance fields. If validation fails, fall back to a static degradation template stored in your application config, not a retry loop that adds latency during an already degraded experience.
For observability, log every degradation event with the failure classification, the prompt version used, the generated message, and whether the user engaged with any offered alternative. This data feeds your reliability metrics and helps tune the degradation prompt over time. Avoid calling this prompt when the primary tool succeeds or when the failure is transparently retryable at the infrastructure layer without user visibility. The prompt is for user-visible degradation only. If you are using a model router, prefer a fast, cost-effective model for this prompt since degradation messages are latency-sensitive and do not require complex reasoning. Test the harness by simulating tool failures in a staging environment and confirming that the full pipeline—failure detection, prompt invocation, output validation, static fallback—behaves correctly under each failure class.
Expected Output Contract
The required structure, fields, and validation rules for the model's response when generating a user-facing graceful degradation message.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
degradation_message | string | Must be a single, user-facing string under 280 characters. Must not contain internal error codes, stack traces, or raw tool names. | |
affected_feature | string | Must match a value from the [FEATURE_FLAG_MAP] provided in the prompt context. If the feature is unknown, use 'this feature'. | |
expected_recovery_time | string or null | Must be a human-readable time estimate (e.g., 'a few minutes', 'within the hour') or null if unknown. Must not expose internal SLA metrics. | |
alternative_action | string | Must be a single, actionable alternative for the user. If no alternative exists, must be a generic fallback like 'Please try again shortly.' | |
permission_reevaluation_note | string | Must be included only if the [USER_PERMISSIONS] context indicates a potential permission change could restore access. Must not instruct the user to contact support unless explicitly allowed by [ESCALATION_POLICY]. | |
internal_decision_log | object | Must contain a structured log for observability. Must include 'failure_mode' (string), 'fallback_tool_selected' (string or null), and 'retry_budget_remaining' (integer). Must not be exposed to the user. | |
confidence_score | number | Must be a float between 0.0 and 1.0 representing the model's confidence that the degradation message is accurate and appropriate. If omitted, defaults to 1.0. |
Common Failure Modes
What breaks first when a graceful degradation prompt hits production and how to guard against it.
Leaking Internal Failure Details to Users
What to watch: The model exposes raw error codes, stack traces, tool names, or internal endpoint URLs in the user-facing message. This happens when the prompt fails to enforce a strict boundary between internal diagnostics and external communication. Guardrail: Add an explicit output constraint that forbids any internal identifiers, error codes, or system paths. Validate the output with a regex denylist before rendering to the user.
Over-Promising Recovery Timelines
What to watch: The model generates specific time estimates like 'back in 5 minutes' or 'resolved by Tuesday' without any grounding in actual incident data. This creates liability and erodes trust when the estimate is wrong. Guardrail: Constrain the prompt to use only qualitative time buckets ('shortly', 'within the hour') or require a feature-flag check against a known incident status before any time language is generated.
Suggesting Unavailable Alternatives
What to watch: The degradation message recommends a fallback workflow or alternative tool that is itself behind a disabled feature flag or outside the user's permission scope. The user follows the advice and hits a second dead end. Guardrail: Provide the prompt with a live list of available alternatives and their permission requirements. Instruct the model to verify availability against this list before suggesting any alternative path.
Inconsistent Tone Across Degradation States
What to watch: A partial outage message sounds overly casual while a full-outage message sounds robotic, or vice versa. Inconsistent tone across degradation levels makes the product feel broken rather than managed. Guardrail: Define a tone spec in the system prompt with examples for each degradation level (partial, full, maintenance). Run a tone consistency eval across all variants before deployment.
Silently Dropping the User's Original Intent
What to watch: The degradation message explains what's broken but loses the user's original request context. The user has to re-explain what they were trying to do after the system recovers. Guardrail: Require the prompt to echo back the user's intent in the degradation message and include a recovery path that preserves the original request for resubmission when the tool is available again.
Degradation Message Triggering on Transient Blips
What to watch: A single 500ms timeout or one 503 response triggers the full degradation user experience, even though a retry would have succeeded. Users see unnecessary failure messages for self-healing transient errors. Guardrail: Gate the degradation prompt behind a retry budget check. Only invoke the user-facing degradation message after retries are exhausted, not on the first failure. Log every invocation for threshold tuning.
Evaluation Rubric
Run these checks on a golden dataset of 20+ failure scenarios to validate the graceful degradation prompt before production deployment.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Internal detail leakage | Output contains zero internal error codes, stack traces, endpoint URLs, or tool names | Output includes '500 Internal Server Error', 'api/v2/tool-executor', or similar internal identifiers | Regex scan for error codes, URLs, and tool names; manual review of 20 degraded outputs |
Feature-flag awareness | Output respects [FEATURE_FLAG_STATE] and adjusts available alternatives accordingly | Output suggests an alternative that is disabled by the current feature flag configuration | Parameterized test with flag=true and flag=false; assert alternatives list matches enabled set |
Permission re-check | Output does not assume the user retains access to fallback features without re-verification | Output states 'you can still use X' without checking [USER_PERMISSIONS] for X | Assert output conditions alternatives on permission state when [USER_PERMISSIONS] is restricted |
Expectation setting | Output includes a clear timeframe or condition for restoration when [ESTIMATED_RECOVERY_TIME] is provided | Output omits recovery timeframe entirely or makes an unqualified promise like 'it will be back soon' | String match for timeframe presence; assert no unqualified restoration promises when recovery time is unknown |
Alternative actionability | Output offers at least one concrete, working alternative path the user can take immediately | Output offers only an apology with no next step, or suggests an alternative that requires the same failed tool | Manual review: classify each output as actionable or dead-end; require 100% actionable rate |
Tone calibration | Output tone matches [DEGRADATION_SEVERITY] level without catastrophizing minor issues or minimizing critical outages | Output uses 'critical failure' language for a partial degradation or 'minor hiccup' for a full outage | LLM-as-judge evaluation against severity-tone mapping rubric; pairwise comparison with calibrated examples |
No silent failure | Output is always generated when [TRIGGER_DEGRADATION] is true; empty or null responses are treated as test failures | System returns empty string, null, or the original error message without transformation | Assert output length > 0 and output != [RAW_ERROR_MESSAGE] for all test cases |
Context preservation | Output preserves the user's original intent and does not lose [ORIGINAL_USER_REQUEST] context in the degradation message | Output addresses a different request or drops key parameters from the original user intent | Semantic similarity check between [ORIGINAL_USER_REQUEST] and output intent; threshold > 0.85 |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base prompt and a simple feature-flag check. Use a static fallback message instead of dynamic alternatives. Skip the permission re-check and audit logging. Test with a single tool failure scenario.
Watch for
- Overly generic messages that erode user trust
- No distinction between transient and permanent failures
- Missing feature-flag awareness, so users see degradation messages for features they can't access anyway

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us