> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-mcp/workflow-recipes/monitor-production-quality.md).

# Monitor production quality

Score a sample of future live runs so you can see changes in output quality without reviewing every response manually.

## Before you start

Choose a compatible evaluator that does not need an expected reference answer. A production run does not normally come with one. An LLM judge can incur usage charges. Monitoring starts with future runs; use an experiment to evaluate an existing set of cases.

## Create the monitor

Call `evals_monitors_create` with the project and evaluator IDs:

```json
{
  "project_id": "<project-id>",
  "evaluator_id": "<evaluator-id>",
  "sampling_rate": 0.1,
  "max_runs_daily": 100,
  "notifications_enabled": false
}
```

`sampling_rate: 0.1` samples 10% of eligible future runs. `max_runs_daily: 100` caps sampled runs at 100 per UTC day. This example disables notifications. Select values for your required coverage and usage budget; the maximum supported sampling rate is 30%, and the daily cap cannot exceed 1000.

## Inspect coverage and scores

Save the returned monitor ID. Call `evals_monitors_get` with `expand: ["stats", "alert"]` and `window: "7d"`.

* **`scored_count`** shows how many samples received scores.
* **`pending_count`** shows samples still awaiting scoring.
* **`failed_count`** shows scoring failures; these differ from low-quality answers that were scored successfully.
* **`runs_enqueued_today`** shows today's sampled runs and helps explain whether the daily cap has been reached.
* **`alert.severity`** shows the alert state. Review `alert.effective` for the thresholds and minimum-sample settings used.

A new monitor can have no scores until qualifying runs occur and scoring completes. Read coverage before drawing conclusions from an aggregate score. Supported windows are `24h`, `7d`, `30d`, and `all`.

## Inspect one run

Use `evals_run_scores_list` to read a run's score history. To add a score for an existing run, use `evals_run_scores_create` with a compatible evaluator. Each successful call appends another score; inspect history before repeating it.

## Tool reference

* [evals\_evaluators\_get](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-evaluators-get.md)
* [evals\_monitors\_create](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-monitors-create.md)
* [evals\_monitors\_get](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-monitors-get.md)
* [evals\_run\_scores\_list](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-run-scores-list.md)
* [evals\_run\_scores\_create](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-run-scores-create.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-mcp/workflow-recipes/monitor-production-quality.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
