---
title: "What does the Error Rate badge on a prompt template mean?"
answer: "The Error Rate badge on a prompt template indicates the percentage of recent production requests that failed at the upstream model provider over a rolling 28-day period. Displayed alongside a trend arrow comparing current failures to the prior 28 days, the badge automatically hides when a template has zero failures."
category: "Logs \u0026 API"
tags: ["templates","error-rate","workloads","monitoring","observability"]
published: 2026-11-29T14:34:24Z
updated: 2026-11-29T14:33:14Z
canonical_url: https://coolhandlabs.com/help/what-does-the-error-rate-badge-mean
index_url: https://coolhandlabs.com/help.md
---

# What does the Error Rate badge on a prompt template mean?

The Error Rate badge on a prompt template indicates the percentage of recent production requests that failed at the upstream model provider over a rolling 28-day period. Displayed alongside a trend arrow comparing current failures to the prior 28 days, the badge automatically hides when a template has zero failures.

The **Error Rate** badge on a prompt template shows the proportion of your production calls that failed at the upstream AI provider. By attributing failed requests directly to their matching prompt template and model version, Coolhand helps you pinpoint whether reliability issues stem from a specific prompt pattern, provider rate limit, or model outage.

---

## What the Error Rate badge measures

The badge calculates the failure rate across all production client logs assigned to a prompt template over a rolling **28-day window**:

$$\text{Error Rate} = \left( \frac{\text{Failed Requests}}{\text{Total Requests}} \right) \times 100$$

Key details about how this metric is computed:

- **Production traffic only:** The calculation includes only live application requests sent by your clients. Internal evaluations, model bakeoff comparisons, and synthetic tests are excluded.
- **Hidden when zero:** If a template has no failed requests during the lookback period, or if it has received no traffic at all, the badge is hidden entirely. This keeps your template list and dashboard focused on components that need attention.
- **Template attribution:** Previously, requests that failed at the provider could sit unattributed or appear stuck in processing. Coolhand routes failed requests to their corresponding template based on pattern matching or explicit declarations so failures accurately reflect against the template that generated them.

---

## Which errors contribute to the badge

The Error Rate badge tracks **provider-side failures** where a call to the model provider did not complete successfully.

### Included failures

- **Rate limits (HTTP 429):** Requests rejected because your workspace or key exceeded the provider's requests-per-minute (RPM) or tokens-per-minute (TPM) limits.
- **Provider server errors (HTTP 5xx):** Upstream infrastructure outages, service overloads, gateway timeouts, and internal model provider errors (HTTP 500, 502, 503, 504).
- **Network timeouts and connection drops:** Requests where the connection to the provider timed out or dropped before the provider finished responding.
- **Credential and billing errors:** Calls rejected by the provider due to invalid or expired API keys, low credit balances, or exceeded account quotas. (Coolhand also flags these via [credential and billing alerts](https://coolhandlabs.com/help/how-do-provider-credential-and-billing-alerts-work.md)).

### Excluded failures

- **Client intake errors:** Malformed payloads or invalid requests rejected by Coolhand's API before reaching the provider do not count against the template's error rate.
- **Internal ingestion blips:** System-level processing errors within Coolhand's own logging pipeline are tracked separately from provider failures.
- **Unmatched logs:** Requests that fail to match any active template pattern land on the Unmatched catch-all and do not affect specific template metrics.
- **Low quality scores or negative feedback:** Responses that succeeded operationally but received low correctness scores, poor sentiment ratings, or negative user feedback are quality concerns, not provider execution errors.

---

## How the trend arrow is calculated

Next to the error percentage, the badge displays an up or down trend arrow indicating how the failure rate has changed compared to the immediately preceding period:

- **Current window:** The past 28 days.
- **Prior window:** The preceding 28-day period (from 56 days ago to 28 days ago).
- **Trend change:** The difference in percentage points between the current rate and the prior rate.

An **up arrow** indicates that the template's error rate has increased relative to the previous 28 days (reliability is degrading). A **down arrow** indicates that the failure rate has fallen (reliability is improving).

If a template has no recorded traffic in the prior 28-day window, the badge displays the current error percentage without a trend arrow.

---

## Where the badge appears

The Error Rate badge is displayed across two primary surfaces in Coolhand:

1. **Prompt Template detail pages:** Located in the template header alongside token averages, cost estimates, and latency metrics.
2. **Workload Version table:** Displayed on the [workload](https://coolhandlabs.com/help/what-is-a-workload.md) versions list, allowing you to compare error rates across different prompt iterations and model configurations side by side.

---

## How to troubleshoot a rising error rate

Coolhand surfaces template-level error rates for immediate visibility, but does not alter provider requests or automatically retry failed upstream calls. When you notice a rising error rate on a template, follow these steps:

### 1. Inspect the template's failed logs

Navigate to your logs in the Coolhand dashboard or query the API to isolate the failed requests for the template. You can filter logs by setting `source_api_result=failed` and supplying the template identifier:

```http
GET /api/v2/llm_request_logs?template_id=tmpl_sample123&source_api_result=failed
```

In the dashboard, open individual failed logs to inspect the provider's exact HTTP status code and error message (see [What every field on an LLM request log means](https://coolhandlabs.com/help/llm-request-log-fields.md) for full field definitions). You can also use the `error_contains` query parameter on the API to filter logs matching specific failure text.

### 2. Identify the failure category

- **If errors are HTTP 429:** Your application is exceeding provider rate or token quotas. Consider introducing client-side queuing, exponential backoff with jitter, or requesting a quota increase from the model provider.
- **If errors are HTTP 5xx or timeouts:** Check the provider's public status page. If the provider is experiencing an ongoing incident, check Coolhand's service status banner for outage notices.
- **If errors indicate invalid keys or insufficient balance:** Review your API keys and billing balance with that provider.
- **If errors mention context length:** Confirm that your prompt and input variables do not exceed the model's context window.

### 3. Consider model alternatives or fallback routing

If a specific provider or model version consistently exhibits elevated failure rates, you can update your application code to route traffic to a fallback provider, or configure an alternative model version within your workload.

---

Related:
- [What is a workload?](https://coolhandlabs.com/help/what-is-a-workload.md)
- [How do I undo a template deprecation?](https://coolhandlabs.com/help/how-do-i-undo-a-template-deprecation.md)
- [How do I calculate and retrieve realized cost savings using the API?](https://coolhandlabs.com/help/how-to-retrieve-realized-cost-savings-api.md)
- [How do I create or update a template using an external key?](https://coolhandlabs.com/help/create-update-template-with-external-key.md)

[← All help articles](https://coolhandlabs.com/help.md) · [Logs & API](https://coolhandlabs.com/help/category/logs-and-api.md)
