AI health
AI & Safety › Health answers one question: are your app's AI answers OK? It shows a status, what went wrong, what changed, and what it cost. Nothing to set up beyond sending your AI calls to Heystack (see AI frameworks).
The status
The status at the top is one of four words:
| Status | What it means |
|---|---|
| Working | Fewer than 5% of answers failed and fewer than 10% looked wrong. |
| Failing for some | 5% or more of answers failed, or 10% or more looked wrong. |
| Getting worse | A failure or "looked wrong" rate went up by at least 5 points and at least doubled compared with the previous period of the same length. |
| Not enough answers yet | Fewer than 30 answers in the window (or in the previous period, for "getting worse"). Heystack says "unknown" rather than guess. |
Pick the window (last hour to last 30 days) and the app at the top of the page. Health reads Heystack's own running counts, so it opens instantly and never slows your app.
What counts as an answer
An answer is one model call that produces text, a chat reply or an embedding. Heystack does not count an answer twice:
- Agent steps (an agent run, a step inside it) are not answers; the model calls inside them are.
- Tool calls are counted separately, under Tools (calls and errors per tool).
- Calls made through another library that Heystack already sees as a model call are counted once.
- Test traffic your app marks as synthetic is left out.
What went wrong
Each row is a count, a share of answers, and a comparison with the previous period ("up", "down", "about the same", or "not enough answers to compare").
| Row | Counted when |
|---|---|
| Answers that failed | The call returned an error. |
| Answers cut short | The model stopped because it hit its length limit. |
| The AI declined | The provider's safety filter stopped the answer, or (with text checks on) the answer was a refusal such as "I can't help with that". |
| Came back empty | The model was asked for an answer and returned none (an answer that only calls a tool is not empty). |
| People marked bad | An end user gave a thumbs down, or a teammate used Mark as bad answer. |
| Invalid JSON | (Text checks.) The app asked for JSON and the answer does not parse. |
| User asked again | (Text checks.) The user's next message repeats the previous one, a sign the first answer did not help. |
Failure rate = failed + cut short + filtered + empty, as a share of answers. Looked wrong = declined + invalid JSON + marked bad.
Two more signals appear on individual conversations rather than as rows: loop (more than 25 AI steps for one request) and the finish reason of each step.
Text checks
The three text checks (declined wording, invalid JSON, user asked again) read the answer's words, so they work only when your app sends prompts and completions. They are on for every app. Measured on Heystack's labelled test set of 1,191 examples:
| Check | Precision | Recall | False alarms on clean answers |
|---|---|---|---|
| Declined wording | 100% | 95% | 0% |
| Invalid JSON | 100% | 100% | 0% |
| User asked again | 98.4% | 92.7% | 1.7% |
The checks are simple rules, not a model, and they work in English. A rule can miss a polite refusal it has not seen, and "user asked again" can fire when someone genuinely asks the same thing twice. Treat them as hints that point you to a conversation, not as verdicts.
What changed
Markers on the trend chart show when a new model, new prompt version or new release first appeared in the window. When answers get worse right after one of them, Heystack files an issue (see below).
Breakdowns
By feature, By model, By prompt version and By release split the same numbers. Open See details on any of them for a fuller breakdown (by provider, tool, gateway or calling service too). This one view reads your raw history on demand, so it loads once per click rather than instantly, and it pauses if your organisation's analytics budget is at its limit.
Your app names these:
- Feature: set
heystack.ai.featureon the call (for example "Support bot"). Agents use their name when you don't. Up to 50 features per app; more are grouped as "other". - Prompt version: set
heystack.ai.prompt_version. Without it, Heystack uses a short fingerprint of the system prompt, so a changed prompt still shows up as a new version (up to 20 new versions per app per day). - Conversation: set
gen_ai.conversation.idto group turns into one thread; otherwise the session is used.
Spend
Spend uses the cost your provider or gateway reported. If none was reported, Heystack estimates it from the model's public price. A model with no known price is counted as unpriced, never as $0, and the page says "We don't have a price for these models yet".
Conversations
AI & Safety › Conversations lists threads (turns grouped by conversation), newest first.
- Needs a look keeps threads with an error, a cut-short or filtered answer, any signal above, or a bad rating.
- Open a thread to read each turn's steps, signals and ratings. Words show only when your app sends them and only to people (read keys never see them).
- Mark as bad answer (or good) records your team's rating. It counts towards "People marked bad" within a minute or so. Members and admins can mark; read-only viewers and read keys cannot.
- Download these conversations saves up to 200 threads matching the current filters as a JSON Lines file, for review or for building test sets. It includes the words, so only people can download it.
Collecting end-user feedback
Send a thumbs up or down from your app as a log event named ai.feedback, linked to the answer's trace (or to a conversation id). See Product activity › AI answer feedback for the code, including Android and React Native.
Alerts
Under Settings › Alerts you can alert on:
- AI failure rate above a percentage over the last 1, 6 or 24 hours;
- AI flagged rate ("looked wrong") above a percentage over the same windows;
- AI daily spend above an amount for the current day (UTC).
Rate alerts stay quiet below 30 answers in the window.
"AI answers got worse" issues
Heystack compares each new model, prompt version or release (first seen in the last 72 hours) with the one it replaced over the previous 7 days. It files an issue under Issues when, with at least 50 answers on each side:
- a failure or "looked wrong" rate rose by at least 5 points and at least doubled; or
- the cost per answer rose by at least 50%.
The issue names the change as the suggested cause. Fewer answers than that and no issue is filed: the comparison is unknown, not good.
Home
Home shows an AI answers tile for the last 24 hours (answers, failure rate, status) once your app has sent any.
What Heystack does not do
- It does not judge whether an answer is correct. "Looked wrong" means a signal fired, not that the answer was checked.
- It does not read answers unless your app sends the words; the text checks only run on words your app sends.
- It never sits between your app and your AI provider, and never delays an answer.
- A status of "Working" means none of these signals fired often, not that every answer was right.