Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/observe-and-act/agent-observability/reference/evaluation.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/observe-and-act/agent-observability/reference/evaluation/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Evaluation API
Configure evaluators, rules, and templates, discover judge providers, and export scores.
Before you begin
- Enable Agent Observability on your Grafana Cloud stack. Refer to Set up Agent Observability in Grafana Cloud.
- For configuration changes, use a Grafana identity with permission to manage the relevant resource. Refer to Security and access controls.
- For experiment runs or exported scores, create a Grafana Cloud Access Policy Token with the
sigil:writescope.
For credential requirements, refer to Choose credentials.
Manage evaluators
Use evaluator endpoints to create and list scoring definitions.
| Method | Path | Description |
|---|---|---|
GET | /api/v1/eval/evaluators | List all evaluators. |
POST | /api/v1/eval/evaluators | Create an evaluator. |
GET | /api/v1/eval/evaluators/{id} | Get an evaluator by ID. |
DELETE | /api/v1/eval/evaluators/{id} | Delete an evaluator. |
GET | /api/v1/eval/predefined/evaluators | List predefined evaluators. |
POST | /api/v1/eval/predefined/evaluators/{id}:fork | Fork a predefined evaluator. |
To update an existing evaluator, send POST /api/v1/eval/evaluators again with the same evaluator_id and a new version (YYYY-MM-DD or YYYY-MM-DD.N). That request stores another snapshot.
Manage rules
Use rule endpoints to attach evaluators to matching generation or conversation traffic.
| Method | Path | Description |
|---|---|---|
GET | /api/v1/eval/rules | List all evaluation rules. |
POST | /api/v1/eval/rules | Create a rule. |
GET | /api/v1/eval/rules/{id} | Get a rule by ID. |
PATCH | /api/v1/eval/rules/{id} | Update a rule. |
DELETE | /api/v1/eval/rules/{id} | Delete a rule. |
POST | /api/v1/eval/rules:preview | Preview rule matches. |
GET | /api/v1/eval/rules/{id}/actions | List rule actions. |
POST | /api/v1/eval/rules/{id}/actions | Create a rule action. |
GET | /api/v1/eval/rules/{id}/actions/{action_id} | Get a rule action. |
PATCH | /api/v1/eval/rules/{id}/actions/{action_id} | Update a rule action. |
DELETE | /api/v1/eval/rules/{id}/actions/{action_id} | Delete a rule action. |
Discover judge providers
Use judge provider endpoints to discover configured judge providers and models.
| Method | Path | Description |
|---|---|---|
GET | /api/v1/eval/judge/providers | List discovered judge providers. |
GET | /api/v1/eval/judge/models | List models for a provider. |
Manage templates
Use template endpoints to manage reusable evaluator templates and versions.
| Method | Path | Description |
|---|---|---|
GET | /api/v1/eval/templates | List evaluator templates. |
POST | /api/v1/eval/templates | Create an evaluator template. |
GET | /api/v1/eval/templates/{id} | Get a template by ID. |
DELETE | /api/v1/eval/templates/{id} | Delete a template. |
POST | /api/v1/eval/templates/{id}:fork | Fork a template. |
GET | /api/v1/eval/templates/{id}/versions | List template versions. |
POST | /api/v1/eval/templates/{id}/versions | Publish a template version. |
GET | /api/v1/eval/templates/{id}/versions/{version} | Get a template version. |
Configure evaluator types
Choose an evaluator type for the content and scoring criteria you want to check.
LLM judge
Use an LLM judge to score responses against prompt-based criteria:
{
"kind": "llm_judge",
"config": {
"provider": "openai",
"model": "gpt-4o-mini",
"system_prompt": "You are a quality evaluator.",
"user_prompt": "Rate this response:\n{{agent_response}}",
"timeout_ms": 120000
}
}You don’t configure the LLM judge’s output-token limit. Agent Observability sets it to 16384 tokens or the model’s supported output limit, whichever is lower. A max_tokens value in an existing evaluator configuration doesn’t change this limit.
The optional temperature setting uses the model provider’s default when omitted. The UI doesn’t display Max tokens or Temperature and removes both settings when you save an evaluator or fork a template. Set temperature only if the selected model supports it; an explicit 0 isn’t the same as leaving it unset.
The default timeout_ms is 120000 (120 seconds) per judge attempt. Increase it if your chosen reasoning model needs more time. For prompt and model settings, refer to Configure evaluators and evaluation rules.
Set reasoning_effort only when the selected provider and model support it. For available values and omission behavior, refer to LLM judge settings.
JSON schema
{
"kind": "json_schema",
"config": {
"schema": {
"type": "object",
"required": ["answer"],
"properties": {
"answer": { "type": "string" }
}
},
"target": "response"
}
}The optional target field sets the text to evaluate: response (default), latest_user_message, input, or system_prompt.
Regex
{
"kind": "regex",
"config": {
"pattern": "^\\d+$",
"reject": false,
"target": "response"
}
}Heuristic
{
"kind": "heuristic",
"config": {
"version": "v2",
"target": "response",
"root": {
"kind": "group",
"operator": "and",
"rules": [
{ "kind": "rule", "type": "not_empty" },
{ "kind": "rule", "type": "min_length", "value": 10 }
]
}
}
}Choose rule selectors
| Selector | Description |
|---|---|
user_visible_turn | Final user-visible responses. Use explicit turn.* prompt variables to include the complete tool loop. |
turn | Legacy compatibility value for complete-turn rules. It fires at the same event as user_visible_turn; do not use it for new rules. |
all_assistant_generations | Any agent output. |
tool_call_steps | Generations containing tool calls. |
errored_generations | Generations with call_error. |
conversation | Full conversations after the configured idle window. |
Choose rule execution mode
Evaluation rules can run attached evaluators in parallel or sequential mode. In parallel mode, every evaluator runs for each matched item. In sequential mode, evaluators run in order, and each evaluator must pass before the next evaluator is queued.
Use sequential mode to put a low-cost gate in front of a more expensive evaluator. The first evaluator in a sequential rule must define a pass condition, such as pass_threshold, pass_value, or pass_match, so Agent Observability knows whether to continue. Gate outcomes are tracked separately from final quality pass-rate reporting.
Integrate rule alerts
Rules can include an alert_rule_uids field that stores the UIDs of Grafana alert rules created for the evaluation. In Agent Observability, add alerts from the evaluation creation or configuration flow by setting a pass-rate threshold and contact point. Alerts are created as non-provisioned, so you can edit them in the Grafana Alerting UI afterward.
Export scores
Use score ingest to export externally computed scores from SDKs, CI jobs, and benchmark processes.
| Transport | Endpoint |
|---|---|
| HTTP | POST /api/v1/scores:export |
Scores are idempotent by score_id, which must be at most 128 characters. Resubmitting the same score ID returns a duplicate item result instead of creating another score. A score must include either generation_id or trial_id. Scores with experiment_id are rejected if the experiment doesn’t exist for the authenticated tenant.
Validation failures remain descriptive. Internal lookup or storage failures use
internal server error; error_id=<id> in the existing result schema, with one
shared ID for internal failures in the batch.
Next steps
Was this page helpful?
Related resources from Grafana Labs


