Inferensys

Prompt

Error Budget Impact Analysis Prompt

A practical prompt playbook for using Error Budget Impact Analysis Prompt in production AI workflows.
Elegant overhead shot of a polished wooden communal table in a sun-drenched WeWork lounge, laptops and tablets displaying AI workflow dashboards, plants and pendant lights in background.
PROMPT PLAYBOOK

When to Use This Prompt

Quantify how an incident consumed the error budget for a specific SLO and decide whether a release freeze or accelerated remediation is warranted.

This prompt is designed for SRE and product engineering teams who need a precise, data-driven assessment of an incident's impact on a Service Level Objective (SLO). The core job-to-be-done is translating raw incident telemetry—duration, error rate, and the SLO target—into a clear financial-style accounting of your error budget. It answers three critical questions: exactly how much budget was consumed, how many days of normal operation remain before exhaustion, and whether the remaining budget triggers a policy action like a feature freeze. Use this during post-incident review or as part of a change advisory board process to replace gut-feel decisions with quantitative evidence.

To use this effectively, you must have accurate, pre-defined SLO targets and monitoring data for the incident window. The prompt expects structured inputs: the SLO target percentage (e.g., 99.9%), the duration of the incident in minutes, and the measured error rate during that window. It does not perform real-time analysis or trigger automated rollbacks; it is a post-hoc planning tool. Do not use this prompt if your monitoring data is incomplete, if the SLO definition is disputed, or if you need a real-time alerting decision. The output is a structured calculation of budget consumption, a projection of days until exhaustion at the current burn rate, and a clear recommendation (e.g., 'Freeze releases', 'Accelerate fixes', 'No action required').

Before running this prompt, validate your inputs against your monitoring system of record. A common failure mode is using a point-in-time error rate that doesn't represent the full incident window, leading to an underestimation of budget impact. For high-severity incidents, always have a second engineer independently verify the input numbers. The prompt's output should be logged alongside the incident record for auditability. If the calculation shows budget exhaustion is imminent, the next step is to escalate to the product and engineering leadership with the specific projection, not to rely on the prompt alone to make the freeze decision.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Error Budget Impact Analysis prompt delivers reliable, actionable SLO guidance—and where it introduces unacceptable risk if used blindly.

01

Good Fit: Post-Incident SLO Review

Use when: you have a completed incident timeline with confirmed duration, error rate, and a defined SLO target. The prompt excels at translating raw incident data into budget consumption percentages and projecting exhaustion dates. Guardrail: Feed the prompt structured inputs (start time, end time, error rate, SLO target) rather than asking it to extract these from free-text narratives.

02

Bad Fit: Real-Time Alerting Decisions

Avoid when: you need sub-second or low-latency decisions on whether to page an on-call engineer. This prompt is designed for analytical post-incident review, not for inline alert evaluation. Guardrail: Use a deterministic rules engine or a lightweight calculation function for real-time error budget burn rate alerting. Reserve this prompt for structured post-hoc analysis and reporting.

03

Required Inputs: Structured Incident Data

Risk: The prompt will hallucinate plausible but incorrect budget numbers if fed ambiguous or incomplete incident descriptions. Guardrail: Always supply explicit values for incident duration, error rate during the incident, normal background error rate, SLO target percentage, and the compliance period window. Validate these inputs before invoking the prompt.

04

Operational Risk: Calculation Drift

Risk: LLMs can make arithmetic errors, especially when projecting remaining budget across complex time windows or when handling edge cases like zero-error baselines. Guardrail: Implement a post-generation validation step that recalculates the key figures (budget consumed, remaining budget, days until exhaustion) using a deterministic function and flags any discrepancy greater than 0.1% for human review.

05

Process Fit: Freeze/Thaw Recommendations

Risk: The prompt may recommend a feature freeze or accelerated remediation based solely on budget arithmetic without considering business context, such as a planned marketing launch or contractual deadlines. Guardrail: Treat the prompt's freeze/thaw recommendation as an input to a human decision, not an automated gate. Always pair the output with a required human approval step before communicating the decision to stakeholders.

06

Data Quality: Incomplete Incident Windows

Risk: If the incident's start or end time is estimated rather than measured, the budget consumption calculation will carry that uncertainty forward, potentially overstating or understating the severity. Guardrail: Require the prompt to output a confidence qualifier and an uncertainty range whenever input timestamps are marked as estimated. Flag outputs with wide uncertainty ranges for manual review before they reach an executive summary.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt for calculating error budget consumption from incident data and projecting remaining budget health.

This prompt template accepts structured incident data from your monitoring system and produces a quantified error budget impact analysis. It is designed to be wired into an SRE automation harness where incident duration, error rate, and SLO targets are known at runtime. The template uses square-bracket placeholders that your application must populate before sending the request. Do not use this prompt for real-time incident response decisions without human review of the output—the calculation is deterministic but the interpretation of whether to freeze releases or accelerate remediation requires business judgment.

text
You are an SRE error budget analyst. Given the incident data below, calculate the error budget impact and produce a structured analysis.

## INPUT DATA
- Incident ID: [INCIDENT_ID]
- Incident Start Time: [START_TIME]
- Incident End Time: [END_TIME] (use 'ongoing' if still active)
- Error Rate During Incident: [ERROR_RATE_PERCENT]
- Service SLO Target: [SLO_TARGET_PERCENT]
- Error Budget Window: [BUDGET_WINDOW_DAYS] days
- Total Requests in Window (estimated): [TOTAL_REQUESTS]
- Error Budget Consumed Before Incident: [PRIOR_CONSUMPTION_PERCENT]
- Burn Rate Threshold for Alert: [BURN_RATE_THRESHOLD]

## OUTPUT REQUIREMENTS
Produce a JSON object with this exact schema:
{
  "incident_id": string,
  "duration_minutes": number,
  "error_budget_consumed_percent": number,
  "total_error_budget_consumed_percent": number,
  "remaining_budget_percent": number,
  "burn_rate_multiple": number,
  "projected_exhaustion_days": number or null,
  "recommendation": "freeze_releases" | "accelerate_remediation" | "monitor" | "no_action",
  "calculation_notes": string,
  "assumptions": [string]
}

## CALCULATION RULES
1. Duration = (end - start) in minutes. If end is 'ongoing', use current time.
2. Error budget consumed = (error_rate - (1 - SLO_target)) * (incident_requests / total_window_requests) * 100
3. Incident requests = (duration_minutes / (window_days * 1440)) * total_requests
4. Total consumed = prior_consumption + error_budget_consumed
5. Remaining = 100 - total_consumed
6. Burn rate = error_budget_consumed / (duration_minutes / (window_days * 1440) * 100)
7. Burn rate multiple = burn_rate / (100 / (window_days * 1440))
8. Projected exhaustion = if burn_rate_multiple > 0, (remaining / (burn_rate_multiple * 100 / (window_days * 1440))) / 1440, else null
9. Recommendation: 'freeze_releases' if remaining < 10 OR burn_rate_multiple > [BURN_RATE_THRESHOLD]; 'accelerate_remediation' if remaining < 25; 'monitor' if remaining < 50; else 'no_action'

## CONSTRAINTS
- Show all calculations in calculation_notes for auditability.
- List any assumptions made when input data is incomplete.
- If the incident is ongoing, note that projections are preliminary.
- Round percentages to 2 decimal places.
- If any required input is missing, return an error object: {"error": "missing_input", "missing_fields": [string]}

To adapt this prompt for your environment, replace each bracketed placeholder with live data from your monitoring stack. The [ERROR_RATE_PERCENT] should come from your service-level metrics during the incident window, not the overall error rate. The [PRIOR_CONSUMPTION_PERCENT] must be pulled from your error budget tracking system to avoid double-counting. If your SLO uses a request-based rather than time-based window, adjust the calculation rules accordingly and update the [TOTAL_REQUESTS] placeholder to reflect actual observed volume. For ongoing incidents, wire your harness to re-run this prompt every 15 minutes with updated duration and error rate values, and flag any recommendation change as an alert. Always log the full prompt input and output for post-incident audit trails.

IMPLEMENTATION TABLE

Prompt Variables

Inputs required for the Error Budget Impact Analysis Prompt to calculate SLO compliance impact, project remaining budget, and flag freeze conditions.

PlaceholderPurposeExampleValidation Notes

[SLO_TARGET]

The service-level objective as a percentage (e.g., 99.9% availability)

99.9

Must be a float between 90.0 and 100.0. Parse as float and reject non-numeric strings.

[ERROR_BUDGET_WINDOW]

The compliance period for the error budget (e.g., 30d, 4w, 1q)

30d

Must match regex pattern ^\d+[dwqm]$. Reject ambiguous strings like 'monthly'.

[INCIDENT_START_TIME]

ISO 8601 timestamp for when the incident began

2025-03-15T14:31:00Z

Must parse as valid ISO 8601 UTC. Reject if in the future or missing timezone offset.

[INCIDENT_END_TIME]

ISO 8601 timestamp for when the incident resolved (null if ongoing)

2025-03-15T15:47:00Z

Must parse as valid ISO 8601 UTC or be null. If provided, must be after [INCIDENT_START_TIME].

[ERROR_RATE_DURING_INCIDENT]

The observed error rate as a percentage during the incident window

12.5

Must be a float between 0.0 and 100.0. Reject negative values. Flag if > 50% for sanity check.

[TOTAL_REQUEST_VOLUME]

Total requests served during the incident window (or estimated)

450000

Must be a positive integer. If estimated, require an [ESTIMATION_CONFIDENCE] flag. Reject zero.

[CURRENT_BUDGET_REMAINING]

The error budget remaining as a percentage before the incident

2.3

Must be a float between 0.0 and 100.0. Flag if negative for data integrity check.

[BURNOUT_RATE_BEFORE_INCIDENT]

The error budget consumption rate before the incident as percentage per day

0.15

Must be a float >= 0.0. Flag if > 10.0 as likely data error. Used for projection calculations.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Error Budget Impact Analysis prompt into a production SRE workflow with validation, tooling, and human review gates.

This prompt is designed to be called programmatically within an incident management or postmortem automation pipeline, not as a one-off chat interaction. The primary integration point is a webhook or scheduled job triggered by an incident declaration, a significant SLO breach alert, or a post-incident review state change. The application layer must gather the required inputs—[SLO_TARGET], [BUDGET_WINDOW], [INCIDENT_START_TIME], [INCIDENT_END_TIME], [ERROR_RATE_DURING_INCIDENT], and [NORMAL_ERROR_RATE]—from your observability stack (e.g., querying Prometheus, Datadog, or your SLO tracking service) before assembling the prompt. Do not rely on a human to manually calculate or copy these values; the harness should fetch them to ensure accuracy and consistency.

After the model returns its analysis, the implementation must run a strict post-processing validation step before the output is surfaced to any user or used to trigger an automated action like a feature freeze. The validation logic should: (1) parse the model's JSON output and confirm it matches the [OUTPUT_SCHEMA]; (2) independently recalculate the error budget consumed using the same input metrics and compare it to the model's error_budget_consumed_percent value, flagging any discrepancy greater than 1%; (3) verify that the remaining_budget_hours is mathematically consistent with the budget_window_days and consumption rate; and (4) check that the recommended_action field is one of the allowed enum values. If validation fails, the harness should log the raw response, the validation error, and the input parameters, then either retry with a lower temperature or escalate to an on-call engineer for manual review. For high-severity incidents where the error budget is critically low, always require a human to approve any automated freeze or remediation action before it is executed.

Model choice matters for this workflow. The prompt requires precise arithmetic reasoning and strict schema adherence, so prefer a leading model with strong JSON mode and function-calling capabilities. Set temperature to 0 or a very low value (e.g., 0.1) to minimize variance in calculations. The prompt should be sent with a response_format constraint set to json_schema if the provider supports it, using the defined [OUTPUT_SCHEMA] as the expected structure. Avoid using this prompt with small or quantized open-weight models that are prone to arithmetic errors; if you must, add a calculator tool to the harness and modify the prompt to instruct the model to use the tool for all percentage and duration calculations rather than performing them in its head. Log every invocation with the full prompt, model response, validation result, and any human approval decisions to create an audit trail for compliance and postmortem review.

IMPLEMENTATION TABLE

Expected Output Contract

Define the exact shape of the model's response so it can be parsed, validated, and integrated into an SRE dashboard or incident review system. Each field must pass the specified validation rule before the output is accepted.

Field or ElementType or FormatRequiredValidation Rule

error_budget_consumed_percent

number (float, 2 decimal places)

Must be >= 0.0 and <= 100.0. Parse as float and check range.

remaining_budget_percent

number (float, 2 decimal places)

Must equal (100.0 - error_budget_consumed_percent) within a 0.01 tolerance. Reject if mismatch.

projected_exhaustion_date

string (ISO 8601 date) or null

If remaining_budget_percent > 0 and burn rate > 0, must be a valid future date. If burn rate is 0, must be null. Validate date string format.

burn_rate_multiplier

number (float, 1 decimal place)

Must be >= 0.0. If 0.0, projected_exhaustion_date must be null. Reject if negative.

slo_breach_detected

boolean

Must be true if error_budget_consumed_percent >= 100.0, otherwise false. Reject if inconsistent.

remediation_freeze_recommended

boolean

Must be true if remaining_budget_percent < 5.0 or projected_exhaustion_date is within the next 7 days. Reject if recommendation contradicts policy thresholds.

contributing_incidents

array of objects

Each object must contain an 'incident_id' (string) and 'budget_impact_percent' (number). The sum of all 'budget_impact_percent' values must equal 'error_budget_consumed_percent' within a 1.0 tolerance. Reject if empty when budget consumed > 0.

analysis_confidence

string (enum)

Must be one of: 'high', 'medium', 'low'. If any input data was missing or extrapolated, must be 'medium' or 'low'. Reject if 'high' when data gaps are flagged in the prompt input.

PRACTICAL GUARDRAILS

Common Failure Modes

Error budget calculations are high-stakes and easy to get wrong. These are the most common failure modes when using an LLM for SLO math, along with concrete guardrails to prevent them.

01

Arithmetic and Unit Conversion Errors

What to watch: The model miscalculates error budget consumption by mishandling percentage-to-minutes conversions, time window boundaries, or multi-service aggregation. A 0.1% error rate over 30 days is not the same as 0.1% over a rolling 4-week window. Guardrail: Provide the exact formula and units in the prompt. Post-process the output with a deterministic calculation script to verify every numeric claim before the analysis is shared.

02

Hallucinated SLO Thresholds or Policies

What to watch: The model invents an SLO target (e.g., 99.95% availability) or a burn rate policy that does not exist in your organization's actual reliability framework. Guardrail: Always inject the authoritative SLO definitions, error budget policies, and burn rate thresholds directly into the prompt context. Never rely on the model's internal knowledge of your specific SLOs.

03

Ignoring Partial or Overlapping Incidents

What to watch: The analysis double-counts error budget consumption when incidents overlap in time or incorrectly treats a partial outage as consuming the full error budget for the entire duration. Guardrail: Require the prompt to explicitly list each incident's start time, end time, and impacted request percentage before summing. Add a validation step that checks for time-range overlaps in the input data.

04

Misinterpreting Burn Rate vs. Budget Remaining

What to watch: The model conflates a fast burn rate with immediate budget exhaustion, recommending a code freeze when the remaining budget is still sufficient for several days. Conversely, it may miss a critical burn rate because the absolute budget number still looks large. Guardrail: Instruct the model to report both the current burn rate and the projected time-to-exhaustion as separate, labeled outputs. Include a conditional rule: only recommend a freeze if time-to-exhaustion is less than the time required to roll back a change.

05

Confusing Request-Based and Time-Based SLOs

What to watch: The model applies a time-based availability calculation (e.g., total downtime minutes) to a request-based SLO (e.g., success rate of all requests), or vice versa, leading to a completely invalid error budget impact. Guardrail: Define the SLO type explicitly in the prompt as a required input field. Add a pre-processing check that rejects the analysis if the incident data format (downtime vs. error count) does not match the SLO type.

06

Omitting the 'No Impact' or 'Within Budget' Conclusion

What to watch: The model, biased towards finding a problem, always recommends a freeze or accelerated remediation even when the incident's impact on the error budget is negligible and well within the acceptable risk threshold. Guardrail: Add an explicit output option for 'No Action Required' with clear criteria (e.g., 'Projected budget remaining at end of window > 50%'). Force the model to justify why any action is needed before recommending one.

IMPLEMENTATION TABLE

Evaluation Rubric

Criteria for testing the quality of an Error Budget Impact Analysis output before integrating it into an SRE dashboard or incident review workflow.

CriterionPass StandardFailure SignalTest Method

Error Budget Consumption Calculation

The consumed budget percentage is calculated correctly from the provided [INCIDENT_DURATION_MINUTES] and [ERROR_RATE_DURING_INCIDENT].

The calculated consumption does not match a manual verification using the formula: (Incident Duration * Error Rate) / (SLO Window * Error Budget).

Unit test with 3 known input/output pairs, including a zero-duration and a full-budget-exhaustion edge case.

Remaining Budget Projection

The projected remaining budget is correctly derived from [CURRENT_ERROR_BUDGET_REMAINING] minus the calculated consumption, and the projection window matches [PROJECTION_PERIOD].

The remaining budget is a negative number when consumption is less than the starting budget, or the projection period is ignored.

Schema check for a non-negative float in the 'projected_remaining_budget_pct' field. Validate against a pre-calculated truth set.

Freeze/Acceleration Flag Logic

The 'recommended_action' field is 'freeze' when consumption exceeds [FREEZE_THRESHOLD_PCT], 'accelerate' when below [ACCELERATE_THRESHOLD_PCT], and 'monitor' otherwise.

The flag recommends a 'freeze' when the budget consumed is 0%, or 'accelerate' when 100% of the budget is consumed.

Parameterized test iterating over consumption values at, above, and below the defined thresholds to check boundary logic.

Input Variable Handling

The output correctly uses all provided input variables: [INCIDENT_DURATION_MINUTES], [ERROR_RATE_DURING_INCIDENT], [CURRENT_ERROR_BUDGET_REMAINING], [SLO_TARGET_PCT], [SLO_WINDOW_DAYS].

The analysis proceeds with a default value for a missing input, or hallucinates a value not provided in the input context.

Submit a prompt with a deliberately missing [ERROR_RATE_DURING_INCIDENT] variable and assert that the output is a null or an explicit error message, not a hallucinated analysis.

Output Schema Compliance

The output is a single, valid JSON object containing all required fields: 'error_budget_consumed_pct', 'projected_remaining_budget_pct', 'recommended_action', 'justification'.

The output is a markdown-wrapped JSON string, plain text, or is missing the 'justification' field.

Automated JSON schema validation in the test harness. A strict parser must not throw an error.

Justification Grounding

The 'justification' string explicitly references the input values used in the calculation and the threshold that triggered the recommendation.

The justification is a generic statement like 'Based on the analysis, a freeze is recommended' without citing specific numbers or thresholds.

LLM-as-judge check: A secondary prompt verifies that the justification string contains the numeric value of 'error_budget_consumed_pct' and the name of the breached threshold.

Unit Consistency

All calculations and outputs use percentages (0-100) consistently. The output does not mix percentages and decimal fractions.

The 'error_budget_consumed_pct' is output as a decimal (e.g., 0.05 for 5%), creating a 100x interpretation error in a downstream dashboard.

Assert that all percentage fields in the JSON output are numbers between 0 and 100, not between 0 and 1, for a known 50% consumption test case.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a single incident in a chat UI. Replace [INCIDENT_TIMELINE] with a short text summary, [SLO_TARGETS] with one or two SLOs, and [ERROR_BUDGET_POLICY] with a simple threshold rule (e.g., 'freeze releases if 80% consumed'). Skip strict output schema validation initially.

Watch for

  • The model may invent error rate numbers if you don't provide them explicitly. Always include measured error rates in the input.
  • Budget arithmetic can drift with large numbers or multi-month windows. Spot-check calculations manually.
  • Without a defined [OUTPUT_SCHEMA], the model may bury the freeze recommendation in prose instead of surfacing it clearly.
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.