This prompt is for AI operations teams and platform engineers who need to verify that their model router is meeting defined Service Level Agreements (SLAs) for latency, availability, and output quality. The job-to-be-done is turning raw production trace segments into a structured compliance report. Instead of manually cross-referencing trace timestamps against a spreadsheet of SLA thresholds, you feed the trace data and the SLA definitions into this prompt to get a computed compliance rate, breach patterns, and a dashboard-ready summary. The ideal user is someone responsible for AI infrastructure reliability who can provide both the trace data and the specific, measurable SLA targets the system is supposed to hit.
Prompt
Model Routing SLA Compliance Prompt

When to Use This Prompt
Define the job, reader, and constraints for the Model Routing SLA Compliance Prompt.
Use this prompt when you have a batch of production traces that include per-request metadata such as model selected, end-to-end latency, HTTP status codes, and any quality scores your system already generates. You must also provide a clear SLA specification, for example: 'Model X must respond in under 800ms for 99% of requests' or 'Model Y must have a success rate above 99.5%'. The prompt is designed to compute compliance per model and per time window, so it works best with traces that span a meaningful operational period, like an hour, a day, or a deployment window. It is not a real-time alerting system; it is a batch analysis tool for periodic review, post-deployment validation, or incident postmortem.
Do not use this prompt if you lack concrete SLA thresholds or if your traces do not contain the metrics needed to evaluate them. The prompt cannot invent what 'good' looks like for your system. It also should not be used as the sole arbiter for financial penalties or external contractual reporting without human review. The output is a compliance dashboard feed, meaning it is structured for ingestion into monitoring tools or internal reports, but the calculations and breach classifications must be spot-checked before they become an official record. If your traces contain personally identifiable information (PII) or sensitive payloads, redact them before passing them to this prompt.
Use Case Fit
Where the Model Routing SLA Compliance Prompt delivers value and where it introduces risk. Use these cards to decide if this prompt fits your current trace review workflow.
Good Fit: Periodic SLA Audits
Use when: You run weekly or monthly reviews of routing compliance against defined latency, availability, and quality thresholds. Guardrail: Feed the prompt structured trace segments with pre-computed SLA thresholds to avoid the model hallucinating acceptable limits.
Bad Fit: Real-Time Circuit Breaking
Avoid when: You need sub-second decisions to block or reroute traffic. This prompt is designed for post-hoc analysis, not in-the-loop enforcement. Guardrail: Use this output to calibrate real-time circuit breakers, not replace them.
Required Inputs
Risk: Missing or malformed trace segments cause the prompt to fabricate compliance rates. Guardrail: Validate that each input record includes model_id, latency_ms, status_code, timestamp, and the applicable sla_thresholds object before calling the prompt.
Operational Risk: Window Bias
Risk: Compliance rates can look artificially clean if the analysis window excludes partial outages or ongoing degradations. Guardrail: Always pair this prompt with a window justification step that explicitly states the start and end time and flags any known incidents within the window.
Operational Risk: Threshold Drift
Risk: SLA thresholds change over time, but the prompt may apply stale thresholds if they are not injected fresh per run. Guardrail: Never hardcode thresholds in the system prompt. Pass them as a dynamic [SLA_THRESHOLDS] variable sourced from your current SLO configuration.
Bad Fit: Single-Trace Diagnosis
Avoid when: You need to understand why one specific request failed. This prompt aggregates across traces and will miss individual failure nuances. Guardrail: Route single-trace investigations to the Routing Decision Audit or Fallback Root-Cause prompts instead.
Copy-Ready Prompt Template
A reusable prompt template for computing SLA compliance rates from model routing trace segments, with placeholders for thresholds, time windows, and output schema.
This prompt ingests a batch of trace segments from model routing decisions and evaluates each against defined SLA thresholds for latency, availability, and quality. It is designed to be wired into an automated compliance pipeline where trace data is collected from production observability systems and fed to the model for structured analysis. The output is a compliance dashboard feed that surfaces breach patterns, per-model compliance rates, and time-window summaries.
textYou are an SLA compliance auditor for an AI model routing system. Your task is to evaluate a batch of routing trace segments against defined Service Level Agreement (SLA) thresholds and produce a structured compliance report. ## INPUT DATA [TRACE_SEGMENTS] ## SLA THRESHOLDS - Latency SLA (p95): [LATENCY_THRESHOLD_MS] ms - Availability SLA: [AVAILABILITY_THRESHOLD_PCT]% success rate - Quality SLA: [QUALITY_THRESHOLD] (defined as [QUALITY_METRIC_DEFINITION]) ## TIME WINDOW Evaluation window: [START_TIMESTAMP] to [END_TIMESTAMP] Aggregation granularity: [AGGREGATION_GRANULARITY] (e.g., hourly, daily, per-model) ## OUTPUT SCHEMA Return a JSON object with this exact structure: { "evaluation_window": { "start": "ISO timestamp", "end": "ISO timestamp", "granularity": "string" }, "overall_compliance": { "latency_compliance_pct": number, "availability_compliance_pct": number, "quality_compliance_pct": number, "overall_sla_met": boolean }, "per_model_compliance": [ { "model_id": "string", "total_requests": number, "latency_p95_ms": number, "latency_breach_count": number, "latency_compliance_pct": number, "availability_pct": number, "availability_breach_count": number, "availability_compliance_pct": number, "quality_score": number, "quality_breach_count": number, "quality_compliance_pct": number, "sla_met": boolean } ], "breach_patterns": [ { "pattern_type": "string (e.g., 'latency_spike', 'availability_drop', 'quality_degradation')", "affected_models": ["model_id"], "time_range": {"start": "ISO", "end": "ISO"}, "severity": "string (critical|high|medium|low)", "description": "string", "recommended_action": "string" } ], "anomalies": [ { "model_id": "string", "metric": "string", "observed_value": number, "expected_baseline": number, "deviation_pct": number, "timestamp": "ISO" } ] } ## CONSTRAINTS - Only evaluate traces within the specified time window. - If a trace segment is missing latency, availability, or quality data, mark that metric as null for the affected model and exclude it from breach counts. - Flag any model with fewer than [MIN_SAMPLE_SIZE] requests in the window as "insufficient_data" and set sla_met to null. - Breach patterns must be supported by at least [BREACH_PATTERN_MIN_OCCURRENCES] occurrences before reporting. - Anomalies are defined as deviations exceeding [ANOMALY_DEVIATION_THRESHOLD_PCT]% from the baseline. - If the overall SLA is not met, include a summary of the top three contributing factors. - Do not fabricate data. If a metric cannot be computed, state why. ## RISK LEVEL [RISK_LEVEL] ## EXAMPLES [EXAMPLES]
To adapt this template, replace each square-bracket placeholder with concrete values from your routing infrastructure. The [TRACE_SEGMENTS] placeholder expects structured trace data containing at minimum: trace_id, model_id, timestamp, latency_ms, status_code, and quality_score. If your traces use different field names, add a mapping instruction in the constraints section. The [QUALITY_METRIC_DEFINITION] placeholder should describe how quality is measured in your system (e.g., 'BLEU score above 0.8', 'human eval rating >= 4/5', 'toxicity score below 0.1'). For high-risk production environments where SLA breaches trigger financial penalties or customer-facing degradation, always route the output through a human review step before publishing to dashboards or triggering automated remediation. Validate the JSON output against the schema programmatically before ingestion, and log any parse failures with the raw model response for debugging.
Prompt Variables
Inputs the Model Routing SLA Compliance Prompt needs to compute compliance rates and surface breach patterns. Each variable must be extracted or derived from production trace segments before the prompt is called.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[TRACE_SEGMENTS] | Array of trace objects containing routing decisions, timestamps, model identifiers, and latency measurements for a defined time window | [{"trace_id": "t-001", "model": "claude-3-opus", "latency_ms": 1200, "timestamp": "2025-01-15T14:30:00Z", "status": "success"}] | Must be valid JSON array. Each object requires trace_id, model, latency_ms, timestamp, and status fields. Reject if array is empty or contains malformed objects. |
[SLA_THRESHOLDS] | Object defining latency, availability, and quality thresholds per model tier | {"premium": {"latency_p99_ms": 2000, "availability_pct": 99.9, "quality_min_score": 0.85}, "standard": {"latency_p99_ms": 5000, "availability_pct": 99.5, "quality_min_score": 0.75}} | Must be valid JSON object with at least one model tier. Each tier requires latency_p99_ms, availability_pct, and quality_min_score. Reject if thresholds are missing or negative. |
[TIME_WINDOW] | Start and end timestamps defining the analysis period | {"start": "2025-01-15T00:00:00Z", "end": "2025-01-15T23:59:59Z"} | Must be valid ISO 8601 timestamps. End must be after start. Window must not exceed 30 days. Reject if window is inverted or exceeds maximum span. |
[MODEL_TIER_MAP] | Mapping of model identifiers to SLA tiers for threshold lookup | {"claude-3-opus": "premium", "gpt-4o": "premium", "claude-3-haiku": "standard"} | Must be valid JSON object. Every model appearing in TRACE_SEGMENTS must have a tier mapping. Reject if unmapped models are detected in traces. |
[QUALITY_SCORES] | Optional array of quality evaluation scores keyed by trace_id for requests that underwent quality assessment | [{"trace_id": "t-001", "quality_score": 0.92}, {"trace_id": "t-003", "quality_score": 0.68}] | Null allowed if quality SLA is not evaluated. If present, must be valid JSON array with trace_id and quality_score between 0.0 and 1.0. Reject if scores are out of range. |
[BREACH_SEVERITY_LEVELS] | Thresholds for classifying breach severity in the output dashboard feed | {"minor": 0.95, "major": 0.85, "critical": 0.70} | Must be valid JSON object with minor, major, and critical keys. Values must be between 0.0 and 1.0 and in descending order. Reject if severity levels are misordered or missing. |
[OUTPUT_SCHEMA] | Expected structure for the SLA compliance dashboard feed output | {"compliance_summary": {"overall_rate": "float", "by_model": "object", "by_tier": "object"}, "breaches": "array", "trends": "object"} | Must be valid JSON schema definition. Prompt output must conform to this schema. Validate output against schema before dashboard ingestion. Reject output that does not parse against schema. |
Implementation Harness Notes
How to wire the SLA compliance prompt into an automated trace review pipeline with validation, retries, and dashboard integration.
This prompt is designed to run as a batch trace analysis job, not a real-time synchronous call. You should feed it trace segments that have already been enriched with SLA threshold metadata—latency budgets, availability targets, and quality score minimums per model. The prompt expects a structured input payload containing trace IDs, timestamps, model identifiers, observed metrics, and the corresponding SLA thresholds. Running this prompt against raw, unenriched traces will produce unreliable results because the model cannot infer your SLA definitions from bare latency numbers alone.
Input assembly should happen in application code before the prompt is called. For each trace segment, join the observed metrics (p95 latency, HTTP status, quality eval score) with the SLA policy for that model and time window. The [TRACE_SEGMENTS] placeholder expects a JSON array where each object includes trace_id, timestamp, model_id, observed_latency_ms, observed_availability, observed_quality_score, sla_latency_ms, sla_availability, and sla_quality_score. If your observability stack doesn't capture quality scores inline, run a separate eval prompt first and merge the results before calling this SLA compliance prompt. Do not ask the model to compute missing metrics—it will hallucinate plausible values.
Validation and retry logic is critical because the output feeds a dashboard. After the model returns the [OUTPUT_SCHEMA] JSON, validate that every trace_id from the input appears in the output with a compliant boolean, a breach_type array, and a severity enum value. If the output is missing records, contains malformed enums, or has breach_type values that don't match the input SLA dimensions, retry once with a repair prompt that includes the validation errors. If the second attempt still fails, log the failed batch and escalate for human review rather than silently ingesting partial data. The severity field should be constrained to `[
none
warning
critical
Expected Output Contract
The SLA compliance prompt must produce a structured JSON object suitable for ingestion by a monitoring dashboard. Each field below must be validated before the output is accepted by downstream systems.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
compliance_summary | object | Schema check: must contain | |
compliance_summary.overall_compliance_rate | number (0.0-100.0) | Range check: must be a float between 0.0 and 100.0 inclusive. Parse check: must be a valid decimal. | |
compliance_summary.evaluation_window | object | Schema check: must contain | |
breach_log | array | Type check: must be an array. If no breaches exist, must be an empty array | |
breach_log[].trace_id | string | Format check: must match the trace ID pattern from the input context. Null check: not allowed to be empty or null. | |
breach_log[].sla_type | string (enum) | Enum check: must be one of | |
breach_log[].threshold | string | Format check: must include the numeric value and unit from the SLA definition (e.g., '2000ms'). Must match the threshold provided in the input context. | |
breach_log[].observed_value | string | Format check: must include the numeric value and unit observed in the trace (e.g., '3500ms'). Must be a value that logically violates the |
Common Failure Modes
SLA compliance analysis fails when trace data is incomplete, thresholds are ambiguous, or the prompt misinterprets breach conditions. These cards cover the most frequent failure patterns and how to prevent them.
Missing or Incomplete Trace Fields
What to watch: The prompt receives trace segments with null latency values, missing model identifiers, or absent SLA threshold metadata. The model hallucinates compliance status instead of flagging data gaps. Guardrail: Add a pre-processing validation step that rejects traces with missing required fields and returns a structured DATA_GAP error before the prompt runs. Include explicit instructions to output COMPLIANCE_UNKNOWN for any record with incomplete evidence.
SLA Threshold Ambiguity
What to watch: SLA thresholds are defined differently across models (p95 vs p99, wall-clock vs server-side latency) and the prompt applies a single interpretation inconsistently. Breach counts become unreliable. Guardrail: Require a [THRESHOLD_SPEC] input block that explicitly defines the metric, aggregation, and comparison operator per model. Include a self-check instruction that asks the model to restate the threshold before computing compliance.
Time Window Boundary Errors
What to watch: Traces near the edge of the analysis window are double-counted or excluded, skewing compliance rates. The prompt treats timestamps as strings rather than sortable instants. Guardrail: Normalize all timestamps to UTC epoch milliseconds before ingestion. Include explicit boundary rules in the prompt: inclusive start, exclusive end. Add a validation check that the count of traces per window matches the source system.
Breach Pattern Overgeneralization
What to watch: The prompt identifies a breach spike and attributes it to a vague cause like 'model degradation' without isolating the specific model, region, or time pattern. Operations teams receive unactionable alerts. Guardrail: Require the output to include a breach_pattern object with fields for affected model, time clustering, and correlation with known deployment events. Instruct the model to state 'No pattern isolated' when evidence is insufficient rather than fabricating a cause.
Compliance Rate Calculation Drift
What to watch: The prompt computes compliance as compliant / total but miscounts excluded traces or double-counts retries, producing rates that don't match observability dashboards. Guardrail: Define the exact formula in the prompt with inclusion and exclusion rules. Include a reconciliation step that outputs the raw counts alongside the computed rate so reviewers can verify the arithmetic independently.
Silent Model-Specific SLA Mismatch
What to watch: A model has a different SLA tier (e.g., premium vs. standard) but the prompt applies the default threshold to all models. Breaches are missed for premium models or falsely triggered for standard models. Guardrail: Require a [MODEL_SLA_MAP] input that explicitly maps each model identifier to its SLA tier and threshold. Add a pre-check that every model in the trace has a matching SLA entry, and fail the analysis with a MISSING_SLA_DEFINITION error if not.
Evaluation Rubric
Criteria for evaluating the quality and reliability of the SLA compliance output before integrating it into a dashboard or alerting system.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
SLA Threshold Parsing | All SLA thresholds from [SLA_THRESHOLDS] are correctly parsed and applied to the correct model and metric. | A breach is reported for a model that is within its SLA, or a breach is missed for a model that is outside its SLA. | Run a test trace with known latency values exactly at, above, and below the threshold for each model. Verify the output's |
Compliance Rate Calculation | The | The calculated | Provide a batch of 10 traces with a known mix of compliant and non-compliant requests. Assert the output's |
Time Window Aggregation | Traces are correctly grouped into the specified [TIME_WINDOW] (e.g., hourly, daily) and no trace is counted in multiple windows. | A trace timestamp is assigned to the wrong time window, or a trace is omitted from the aggregation. | Use a set of traces with timestamps spanning multiple window boundaries. Verify the |
Breach Pattern Identification | The output correctly identifies and labels the top breach pattern (e.g., 'peak_load_timeout', 'specific_model_degradation') as described in the prompt. | The identified pattern is generic ('high_latency') when a more specific pattern is evident, or the pattern is factually incorrect based on the data. | Provide a trace batch with a seeded pattern, such as all timeouts occurring for a single model between 2-3 PM. Check if the |
Output Schema Validity | The output is valid JSON that strictly conforms to the [OUTPUT_SCHEMA] with all required fields present and correctly typed. | The output is not valid JSON, a required field like | Validate the raw model output against the [OUTPUT_SCHEMA] using a JSON schema validator. The test fails if any validation errors are returned. |
Handling of Missing Data | If a trace is missing a required field like | The prompt fails with an error, or the missing data is treated as zero, corrupting the compliance calculation. | Provide a batch of traces where one trace has a |
Latency Unit Consistency | All latency values are correctly normalized to the unit specified in [LATENCY_UNIT] (e.g., milliseconds) before comparison with thresholds. | A trace in seconds is compared directly against a threshold in milliseconds, leading to a false negative or positive breach report. | Provide a mixed batch of traces with latency values in both seconds and milliseconds. Ensure the output's |
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 a single trace segment and a simplified SLA definition. Replace the full [SLA_THRESHOLDS] object with one or two hardcoded thresholds (e.g., latency < 2000ms, availability > 99%). Use the base prompt without the compliance-rate aggregation step—just ask the model to classify each routing decision as compliant or breach with a one-line reason.
Watch for
- The model inventing SLA thresholds when none are provided. Always supply explicit values.
- Output format inconsistency across runs. Pin the output to a simple JSON array of
{trace_id, compliant, reason}. - No baseline for comparison. Prototype runs won't surface drift or trend patterns.

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