Write an SLO Definition Prompt That Ships Error Budgets Too
Turn a service description into SLIs, SLOs, and an error budget with one reusable SLO definition prompt. Copy the output contract and skip the spreadsheets.
Most teams pick SLO numbers in a meeting, write them in a doc nobody reads, and never compute the error budget that's supposed to govern release decisions. The gap isn't knowledge. Google's SRE book already explains SLIs, SLOs, and error budgets clearly. The gap is repetition: you need the same rigorous output for every service, fast, without re-litigating the format each time. That's what an slo definition prompt gives you.
A prompt that's worth reusing doesn't just define terms. It takes a service description plus real latency and availability numbers, then returns candidate indicators, target objectives, and the error budget that falls out of them. Same structure every run. The reliability owner reviews a draft instead of staring at a blank page.
This post covers how to build that prompt, where models drift, and the output contract that keeps a fleet of services consistent.
What an SLO definition prompt actually produces
An SLO definition prompt is a reusable AI prompt that converts a service description and traffic profile into a structured reliability spec: the indicators worth measuring, the target for each, and the error budget those targets imply. The value is the locked output shape, not the prose around it.
Here's the distinction the ranking guides miss. The Google SRE book defines an SLO as a target for an SLI, with the classic example "99% of Get RPC calls complete in under 100 ms." Useful. But it stops at definitions. It doesn't hand you a formula for the budget, and it can't produce the same artifact for your forty microservices. Vendor guides like Nobl9's error-budget walkthrough do the math but wrap it in a platform pitch, with no copyable prompt to reuse.
You can do better with a {{service_description}} variable and an output contract.
What you can do with this prompt
- Draft SLIs and SLOs for a brand-new service before it ships, so reliability isn't an afterthought.
- Compute the error budget for an existing SLO and translate it into minutes of downtime or failed requests.
- Compare a proposed SLO against measured p50/p99 latency and flag targets that are already being missed.
- Generate the burn-rate alert thresholds that match the budget, so alerting ties to the SLO instead of raw metrics.
- Produce a consistent reliability spec across a whole service catalog, one run per service.
Anatomy of the prompt pack
The shape that holds up across models:
Variables
{{service_description}} – what the service does, who depends on it
{{traffic_profile}} – requests/min, peak vs trough, request types
{{latency_baseline}} – measured p50 / p95 / p99 in ms
{{availability_baseline}} – current success rate over the last 28 days
{{slo_window}} – rolling window, e.g. 28 days
Prompt
Role: reliability engineer defining SLOs from real signals.
Task: propose SLIs, set SLO targets above measured baselines,
compute the error budget, derive burn-rate alert thresholds.
Output contract (locked):
1. SLIs – indicator, measurement, why it matters
2. SLOs – target, window, rationale tied to baseline
3. Error budget – budget = 1 - SLO, expressed in minutes AND failed requests
4. Burn-rate alerts – fast-burn + slow-burn thresholds
5. Open questions – anything the human owner must confirm
The error budget line is the one most templates skip. The budget is 1 minus the SLO. A 99.9% target leaves 0.1%. Over a 28-day window that's roughly 40 minutes of downtime, or about 1,000 failures per million requests. State the window or the percentage is meaningless.
The fastest way to get garbage SLOs is to omit the {{latency_baseline}} and {{availability_baseline}} variables. Without them, both ChatGPT and Claude will confidently invent a "99.9% / 200 ms" target that has no relationship to what the service actually does. Paste real p99 numbers and instruct the prompt to set targets a notch above them. The draft gets useful instead of decorative.
How models behave on this job
This is where naming the model matters. The behaviors aren't interchangeable.
Claude honors a ## Output contract heading more reliably than an inline "respond in this format" instruction, and it tends to keep the error-budget math attached to the right SLO across a long service description. GPT-4o is stronger at proposing sensible SLIs from a vague description but needs the output schema restated on the final line of the prompt, or it drifts into prose after the third section. Gemini will happily compute burn-rate thresholds but sometimes reports the budget as a percentage without converting to minutes unless you ask for both explicitly.
| Job | Claude | ChatGPT (GPT-4o) | Gemini |
|---|---|---|---|
| Holds the 5-part output contract | Strong | Needs schema restated last | Moderate |
| Proposes SLIs from a thin description | Good | Strong | Good |
| Error budget in minutes + requests | Reliable when asked | Reliable when asked | Often percentage only |
| Burn-rate alert thresholds | Good | Good | Strong |
None of them know your real numbers. That's not a model limitation you can prompt away. Supply the baselines.
Prompt-craft patterns that lock the output
Pattern 1 — baseline-anchored targets. Don't ask for "a good SLO." Ask the model to set each target a defined margin above the measured baseline, and to flag any proposed target the service is already missing.
Set each SLO target above the measured baseline in {{latency_baseline}}.
If a proposed target is already being missed today, mark it
"AT RISK" and explain by how much.
Pattern 2 — budget in two units. Force the conversion. A budget stated only as "0.1%" gets ignored in planning; "40 minutes per 28 days" gets respected.
Express the error budget as BOTH a percentage and absolute terms:
minutes of allowed downtime over {{slo_window}} AND failed requests
per million, using {{traffic_profile}} to compute the request count.
Pattern 3 — the refusal boundary. Tell the model when not to guess.
If {{availability_baseline}} is missing or reads "unknown", do NOT
invent a target. List it under "Open questions" and proceed with the
indicators you can define.
That last pattern is the one that separates a draft a reliability owner trusts from one they quietly rewrite. Here's a take worth defending: an SLO the prompt guessed without a baseline is worse than no SLO, because it gives a false sense of governance. A blank "unknown" is honest. A fabricated "99.95%" is a trap that someone will later treat as real.
Variables you'll set
| Variable | Required | What it is |
|---|---|---|
{{service_description}} | Yes | What the service does and who depends on it |
{{traffic_profile}} | Yes | Request volume, peak/trough, request mix |
{{latency_baseline}} | Recommended | Measured p50/p95/p99 in milliseconds |
{{availability_baseline}} | Recommended | Current success rate over the window |
{{slo_window}} | Yes | Rolling window for the budget, e.g. 28 days |
Leave a baseline blank and the prompt should route it to "Open questions" rather than guess. That's the behavior you want.
Getting started
- Pull the last 28 days of latency percentiles and success rate for one service.
- Write a two-line
{{service_description}}and a one-line{{traffic_profile}}. - Paste both into the prompt with
{{slo_window}}set to 28 days. - Run it on Claude first for contract fidelity, then sanity-check the budget math.
- Have the reliability owner confirm anything in "Open questions" before the SLO goes in a doc.
- Reuse the same prompt for the next service so the catalog stays consistent.
For the alerting half of this job, the burn-rate thresholds pair naturally with a tuning pass. See the companion post on an alert tuning prompt to reduce alert fatigue, which turns those thresholds into rules that don't page at 3 a.m. for nothing. And once an SLO is breached, the blameless incident postmortem prompt picks up where the error budget runs out.
An SLO is only as good as the panel that shows whether you're burning the budget. The same telemetry plan that powers your SLIs feeds the dashboard. If your services don't emit the right signals yet, the SLO targets are aspirational. Instrument first, then define.
The catalog has a few packs that touch this job directly: the Observability Instrumentation Harness for the telemetry SLIs depend on, and the Performance Regression Harness for the latency baselines you feed the SLO prompt.
The Observability Instrumentation Harness does the upstream half end-to-end: its Telemetry Coverage Audit prompt finds which SLIs you can actually measure today, and the Dashboard & Alert Stub Generator emits the burn-rate panels that track the error budget this prompt computes. It's part of The Complete AI Prompts Bundle, a one-time lifetime license to the whole catalog plus every pack added later, which pays off if you're standing up reliability across more than one service.
Define the SLO once, compute the budget honestly, and reuse the prompt for the next service. That's the whole discipline. For the broader picture on choosing reusable prompts over one-off snippets, the post on how to choose a reusable AI prompt pack covers what separates a real pack from a copy-paste gist.
Explore reliability prompt packs →Common questions
What is an SLO definition prompt?
How do you calculate an error budget from an SLO?
Can ChatGPT or Claude define SLOs accurately?
Get the prompt packs this guide is built on
Ready-to-paste prompts with documented variables and usage guides for ChatGPT, Claude, and Gemini. One-time payment, own it forever.
More prompt guides

Gemini vs Claude for Long-Context Code: Window or Accuracy
The honest framing of Gemini vs Claude for long-context code isn't which model is smarter. It's a tradeoff between two different things: how much code you can fit in one prompt, and how often the mode…

An OKR Drafting Prompt That Catches Vanity Key Results
An OKR drafting prompt has to fight the model's strongest instinct: handing back something that sounds like a goal but can't be measured. Ask any model for key results and you'll get "increase user en…

A Technical Design Doc Prompt That Holds the RFC Structure
A technical design doc prompt earns its keep when it stops every author from inventing a new doc structure. Context, the options you considered, why you picked one, what breaks, how you roll it out. S…