:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(aio): teach evaluation skills about numeric and categorical outputs (#117099)
Bernat Torres4017fbd64a06
diff --git a/products/ai_observability/mcp/tools.yaml b/products/ai_observability/mcp/tools.yamlindex c2ec2f63e3fd..24eb2500903f 100644--- a/products/ai_observability/mcp/tools.yaml+++ b/products/ai_observability/mcp/tools.yaml@@ -566,15 +566,17 @@ tools:description: >Create an evaluation. 'llm_judge': set evaluation_config.prompt and model_configuration with provider andmodel; provider_key_id may be null when no key is pinned. 'hog': evaluation_config.source (Hog returning a- boolean or finite number). For 'hog' and 'llm_judge', choose output_type='boolean' or 'numeric'; numeric- output_config accepts min, max, step, allows_na, and passing_rule. 'sentiment': output_type='sentiment',- omit model_configuration, optional evaluation_config.source='user_messages'. `target` accepts 'generation'- (default), 'trace', or 'session'. A session target runs once per `$ai_session_id` and defaults to the- 'inactivity' settle strategy. Pass `enabled` as a boolean (true to start scoring new $ai_generation events- immediately, false to create it paused). To organize the evaluation, pass a `directory_id` returned by- llma-evaluation-directory-list. Omit `directory_id` or pass null to keep it at the top level. Results are- '$ai_evaluation' events. An evaluation only scores data that arrives after it is enabled, so once it is- enabled, offer the user a backfill over past data with llma-evaluation-backfill-estimate.+ boolean, a finite number, or category keys). For 'hog' and 'llm_judge', choose output_type='boolean',+ 'numeric', or 'categorical'; numeric output_config accepts min, max, step, allows_na, and passing_rule;+ categorical output_config accepts options, selection_mode, allows_na, and passing_rule. 'sentiment':+ output_type='sentiment', omit model_configuration, optional evaluation_config.source='user_messages'.+ `target` accepts 'generation' (default), 'trace', or 'session'. A session target runs once per+ `$ai_session_id` and defaults to the 'inactivity' settle strategy. Pass `enabled` as a boolean (true to+ start scoring new $ai_generation events immediately, false to create it paused). To organize the evaluation,+ pass a `directory_id` returned by llma-evaluation-directory-list. Omit `directory_id` or pass null to keep+ it at the top level. Results are '$ai_evaluation' events. An evaluation only scores data that arrives after+ it is enabled, so once it is enabled, offer the user a backfill over past data with+ llma-evaluation-backfill-estimate.llma-evaluation-delete:operation: evaluations_destroyenabled: true@@ -691,8 +693,10 @@ tools:together_ai, minimax, zeabur, openai_compatible. Optional `key_id` scopes to a key's reachable deploymentsor models (mainly azure_openai and openai_compatible) and implies that key's provider. The `providers` listin the response flags providers whose models only appear once you pass `key_id` for one of the team's keys;- those return no models otherwise. Call this before creating an llm_judge eval to pick a valid combo, and- prefer a provider the team already has a key for (see llma-provider-key-list).+ those return no models otherwise. Listing models needs no key, but running any llm_judge evaluation needs+ one of the team's own provider keys, so enabling fails without a usable key. Call this before creating an+ llm_judge eval to pick a valid combo, and prefer a provider the team already has a key for (see+ llma-provider-key-list).llma-evaluation-list:operation: evaluations_listenabled: true@@ -855,8 +859,9 @@ tools:runs against trace-level globals, 'session' samples whole sessions that have gone quiet and runs againstsession-level globals. For trace previews, pass target_config.window_seconds to match the saved evaluation'saggregation window; for session previews, pass target_config.quiet_period_seconds to match its quiet period.- Returns per-sample raw boolean or numeric results, N/A when allowed, errors, reasoning, and input/output- previews. Use this to validate Hog code before creating or updating a 'hog' type evaluation.+ For numeric or categorical evaluations, pass the saved output_type and output_config. Returns per-sample raw+ boolean, numeric, or categorical results, N/A when allowed, errors, reasoning, and input/output previews.+ Use this to validate Hog code before creating or updating a 'hog' type evaluation.llma-evaluation-update:operation: evaluations_partial_updateenabled: true@@ -869,17 +874,18 @@ tools:title: Update evaluationdescription: >Partially update an AI observability evaluation. Requires the evaluation `id` (UUID). If you don't have it,- call llma-evaluation-list first to look it up by name. Changing to or from numeric output requires a new- evaluation; for numeric evaluations, update output_config to change bounds, N/A handling, or passing_rule. A- passing rule has operator 'gte' or 'lte' and a finite threshold. Rule edits reinterpret historical scores;- saved reports stay unchanged. Toggle enabled, change its runtime type or evaluation config, or change the- model for an llm_judge. When switching to llm_judge, include model_configuration with provider and model.- When an llm_judge remains an llm_judge, omit model_configuration to keep its current model or provide both- fields to replace it; null is rejected for configured judges. When switching an llm_judge to hog or- sentiment, set model_configuration to null. Legacy llm_judge evaluations without a model remain editable.- provider_key_id may be null when no key is pinned. `target` accepts 'generation', 'trace', or 'session'.- Pass a `directory_id` returned by llma-evaluation-directory-list to move the evaluation into a directory, or- pass null to move it to the top level. After you enable an evaluation for the first time, offer the user a+ call llma-evaluation-list first to look it up by name. Changing to or from numeric or categorical output+ requires a new evaluation; for these evaluations, update output_config to change bounds, categories, N/A+ handling, or passing_rule. A numeric passing rule has operator 'gte' or 'lte' and a finite threshold; a+ categorical passing rule lists the passing category keys. Rule edits reinterpret historical results; saved+ reports stay unchanged. Toggle enabled, change its runtime type or evaluation config, or change the model+ for an llm_judge. When switching to llm_judge, include model_configuration with provider and model. When an+ llm_judge remains an llm_judge, omit model_configuration to keep its current model or provide both fields to+ replace it; null is rejected for configured judges. When switching an llm_judge to hog or sentiment, set+ model_configuration to null. Legacy llm_judge evaluations without a model remain editable. provider_key_id+ may be null when no key is pinned. `target` accepts 'generation', 'trace', or 'session'. Pass a+ `directory_id` returned by llma-evaluation-directory-list to move the evaluation into a directory, or pass+ null to move it to the top level. After you enable an evaluation for the first time, offer the user abackfill over past data with llma-evaluation-backfill-estimate.param_overrides:id:diff --git a/products/ai_observability/skills/creating-online-evaluations/SKILL.md b/products/ai_observability/skills/creating-online-evaluations/SKILL.mdindex 6130f2c22387..be4d252a480a 100644--- a/products/ai_observability/skills/creating-online-evaluations/SKILL.md+++ b/products/ai_observability/skills/creating-online-evaluations/SKILL.md@@ -22,7 +22,9 @@ failure modes are identified and turns them into scoped, continuously-running ev**One eval per failure mode, and as many evals as the data justifies.** How many to create is a judgmentcall you make from what the traces actually showed — sometimes one, often three or four. Never assume the-answer is one, and never bundle several modes into one evaluator.+answer is one, and never bundle unrelated modes into one evaluator. The exception is a set of modes that are+outcomes of the same check, such as the reasons a reply missed the user's request: one categorical eval with+a category per mode fits that (2.1).**Propose before you create.** Bring the user a short list of candidate evals and let them pick which onesthey want (Phase 1.1). Creating evals they didn't ask for costs them money and noise.@@ -142,6 +144,29 @@ set into production, which is noise and (for a judge) cost the user didn't agreeReach for `hog` first, escalate to `llm_judge` if there is no deterministic way to check for what we want to check.+Then choose what one run returns. `hog` and `llm_judge` support all three output types:++| `output_type` | When the failure mode is… |+| ------------- | ---------------------------------------------------------------------------------------------------------- |+| `boolean` | One yes/no criterion. The default. Set `true_is_failure: true` when the check detects a problem. |+| `numeric` | A matter of degree (a 1–5 quality rating) or a measured value (length, latency, cost). |+| `categorical` | One check whose outcome falls into named buckets, such as which of several related failure modes happened. |++- **Numeric:** set `min` and `max` so out-of-range scores are skipped, not graded. For pass rates and+ reports, add a `passing_rule` (`gte` or `lte` a threshold). `step` is only a hint: a judge can return+ a fractional score such as `3.7` with `step: 1`, and the score is stored as returned.+- **Categorical:** define `options` as stable lowercase keys with display labels. Use `single` selection+ when exactly one outcome applies, and `multiple` when several problems can co-occur. For pass rates and+ reports, set `passing_rule.categories` to the keys that count as a pass. In `single` mode that is usually+ a "no problem" key. In `multiple` mode, define no "no problem" key and set `categories: []`, so only an+ empty result passes. Any listed key makes an empty result fail.+- Without a passing rule, numeric and categorical results are still recorded, but there are no pass rates+ or reports.++When an `llm_judge` returns `numeric` or `categorical`, PostHog tells the judge the output format. The prompt+only describes what each score or category means. Full config fields:+[references/evaluation-payload.md](references/evaluation-payload.md).+### 2.2 — Choose the target| Target | Behavior |@@ -235,6 +260,7 @@ posthog:llma-evaluation-judge-models // {} → every provider and its modelConfirm the provider and model with `llma-evaluation-judge-models`.Call it with no arguments to see the whole catalog at once.Providers PostHog funds no models for come back empty unless you pass `key_id` for one of the team's keys; the response's `providers` list flags which ones those are.+A listed model is not a free model. Running any `llm_judge` needs one of the team's own provider keys, so enabling fails until a usable key exists.Prefer pinning the chosen key so a later team-wide active-key change does not change how the evaluation runs.Leave `provider_key_id` as `null` to run on the team's active key; before enabling, confirm with`llma-evaluation-config-get` that the active key is usable and its provider matches.@@ -294,7 +320,9 @@ For generation targets, `count()` is the run volume. For trace targets, count diIf volume is high, set `rollout_percentage` below 100 to sample. Spot-check the evaluator with`llma-evaluation-test-hog` (hog) or `llma-evaluation-run` against one generation (llm_judge; skip the-spot-run for a judge with no usable key, per 2.3).+spot-run for a judge with no usable key, per 2.3). For a numeric or categorical Hog eval, pass the same+`output_type` and `output_config` to `llma-evaluation-test-hog`, so the preview validates the scores or+category keys the saved eval will accept.Both tools currently use generation samples; for a trace target they can check shared source or prompt behavior,but they do not reproduce the complete settled trace. Review the first live trace results before increasing rollout.@@ -377,7 +405,8 @@ creating so the user can review and toggle it in the UI.back to a real bad output is noise.- **One eval, one failure mode — and as many evals as the data justifies.** Different failure modes needdifferent evals; don't make one eval try to catch everything, and don't default to creating exactly one- when the traces showed several modes worth watching.+ when the traces showed several modes worth watching. Related modes that one check tells apart are the+ exception: they fit one categorical eval.- **Propose, then create what they picked.** Show the candidate set in plain language, a line or two each,and wait for the user to choose. Long per-eval write-ups get skimmed, not read.- **Nothing found still has an answer.** Traces read but no failure mode worth an eval means proposing adiff --git a/products/ai_observability/skills/creating-online-evaluations/references/evaluation-payload.md.j2 b/products/ai_observability/skills/creating-online-evaluations/references/evaluation-payload.md.j2index 9fdb5a602fcd..ff476c2028c7 100644--- a/products/ai_observability/skills/creating-online-evaluations/references/evaluation-payload.md.j2+++ b/products/ai_observability/skills/creating-online-evaluations/references/evaluation-payload.md.j2@@ -11,8 +11,8 @@ schemas below are rendered from the backend Pydantic models at build time, so th| `description` | no | Defaults to `""`. || `evaluation_type` | yes | `"hog"`, `"llm_judge"`, or `"sentiment"`. || `evaluation_config` | yes | Shape depends on `evaluation_type` (below). |-| `output_type` | yes | `"boolean"` or `"numeric"` for `hog`/`llm_judge`; `"sentiment"` for `sentiment`. |-| `output_config` | no | `{ "allows_na": bool, "true_is_failure": bool }` for boolean; numeric settings below; `{}` for sentiment. |+| `output_type` | yes | `"boolean"`, `"numeric"`, or `"categorical"` for `hog`/`llm_judge`; `"sentiment"` for `sentiment`. |+| `output_config` | no | `{ "allows_na": bool, "true_is_failure": bool }` for boolean; numeric and categorical settings below; `{}` for sentiment. || `model_configuration` | llm_judge only | Provider + model; key ID optional. Rejected on `hog`/`sentiment`. || `target` | no | `"generation"` (default), `"trace"`, or `"session"`. Sentiment supports only `"generation"`. || `target_config` | trace/session only | Settle config discriminated on `strategy` (below); defaults to a 30-minute fixed window for `trace`, and to a 1-hour inactivity window for `session`. |@@ -20,7 +20,8 @@ schemas below are rendered from the backend Pydantic models at build time, so th| `enabled` | no | Defaults to `false`. Create disabled, then flip with `llma-evaluation-update`. |Valid `(evaluation_type, output_type)` pairs: `(hog, boolean)`, `(llm_judge, boolean)`,-`(hog, numeric)`, `(llm_judge, numeric)`, `(sentiment, sentiment)`.+`(hog, numeric)`, `(llm_judge, numeric)`, `(hog, categorical)`, `(llm_judge, categorical)`,+`(sentiment, sentiment)`.The output type cannot change after creation.## `target` and `target_config`@@ -99,6 +100,22 @@ Set `passing_rule` to `{"operator": "gte", "threshold": 7}` (at least 7) or useWithout a passing rule, scores remain ungraded and reports are unavailable.Changing the rule reinterprets historical scores; previously generated reports stay unchanged.+### categorical output++```json+{{ pydantic_schema("products.ai_observability.backend.models.evaluation_configs.CategoricalOutputConfig") }}+```++`options` holds 1 to 100 `{key, label}` pairs. Keys are unique lowercase identifiers (`a-z`, `0-9`, `_`, `-`)+and are what results store; labels are for display. Keep a key stable when you rename its label.+`selection_mode` is `single` (each result has exactly one key) or `multiple` (zero or more keys).+Hog returns a list of keys, or a single key string in `single` mode; `null` is N/A when `allows_na` is true.+Set `passing_rule` to `{"categories": ["no_problem"]}`: a result passes when it has at least one key and every+key is a passing key, so an empty result fails.+In `multiple` mode, `{"categories": []}` passes only empty results, which fits detectors where every key is a problem.+Without a passing rule, results are recorded but there are no pass rates or reports.+Changing the rule reclassifies historical results; previously generated reports stay unchanged.+### sentiment outputEmpty object: `{}`.diff --git a/products/ai_observability/skills/exploring-llm-evaluations/SKILL.md b/products/ai_observability/skills/exploring-llm-evaluations/SKILL.mdindex 562bd1c17649..3227b35f54e5 100644--- a/products/ai_observability/skills/exploring-llm-evaluations/SKILL.md+++ b/products/ai_observability/skills/exploring-llm-evaluations/SKILL.md@@ -225,8 +225,8 @@ posthog:llma-evaluation-test-hog}```-The handler returns raw boolean or numeric results for the sampled units.-For numeric previews, send `output_type: "numeric"` and the saved `output_config`, including `allows_na: true` if null is allowed. Iterate on the source until it behaves as expected, then promote it via+The handler returns raw boolean, numeric, or categorical results for the sampled units.+For numeric or categorical previews, send the saved `output_type` and `output_config`, including `allows_na: true` if null is allowed. Iterate on the source until it behaves as expected, then promote it via`llma-evaluation-create`:```jsondiff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex ccffecd5b368..0d7afc9acaba 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -7843,7 +7843,7 @@}},"llma-evaluation-create": {- "description": "Create an evaluation. 'llm_judge': set evaluation_config.prompt and model_configuration with provider and model; provider_key_id may be null when no key is pinned. 'hog': evaluation_config.source (Hog returning a boolean or finite number). For 'hog' and 'llm_judge', choose output_type='boolean' or 'numeric'; numeric output_config accepts min, max, step, allows_na, and passing_rule. 'sentiment': output_type='sentiment', omit model_configuration, optional evaluation_config.source='user_messages'. `target` accepts 'generation' (default), 'trace', or 'session'. A session target runs once per `$ai_session_id` and defaults to the 'inactivity' settle strategy. Pass `enabled` as a boolean (true to start scoring new $ai_generation events immediately, false to create it paused). To organize the evaluation, pass a `directory_id` returned by llma-evaluation-directory-list. Omit `directory_id` or pass null to keep it at the top level. Results are '$ai_evaluation' events. An evaluation only scores data that arrives after it is enabled, so once it is enabled, offer the user a backfill over past data with llma-evaluation-backfill-estimate.",+ "description": "Create an evaluation. 'llm_judge': set evaluation_config.prompt and model_configuration with provider and model; provider_key_id may be null when no key is pinned. 'hog': evaluation_config.source (Hog returning a boolean, a finite number, or category keys). For 'hog' and 'llm_judge', choose output_type='boolean', 'numeric', or 'categorical'; numeric output_config accepts min, max, step, allows_na, and passing_rule; categorical output_config accepts options, selection_mode, allows_na, and passing_rule. 'sentiment': output_type='sentiment', omit model_configuration, optional evaluation_config.source='user_messages'. `target` accepts 'generation' (default), 'trace', or 'session'. A session target runs once per `$ai_session_id` and defaults to the 'inactivity' settle strategy. Pass `enabled` as a boolean (true to start scoring new $ai_generation events immediately, false to create it paused). To organize the evaluation, pass a `directory_id` returned by llma-evaluation-directory-list. Omit `directory_id` or pass null to keep it at the top level. Results are '$ai_evaluation' events. An evaluation only scores data that arrives after it is enabled, so once it is enabled, offer the user a backfill over past data with llma-evaluation-backfill-estimate.","category": "AI observability","feature": "llm_analytics","summary": "Create evaluation",@@ -7955,7 +7955,7 @@}},"llma-evaluation-judge-models": {- "description": "List provider+model combinations supported for llm_judge. Call it with no arguments to get every supported provider and its models in one response; each model carries the `provider` to pair it with. Pass `provider` to narrow to one of these lowercase values: openai, anthropic, gemini, openrouter, fireworks, azure_openai, together_ai, minimax, zeabur, openai_compatible. Optional `key_id` scopes to a key's reachable deployments or models (mainly azure_openai and openai_compatible) and implies that key's provider. The `providers` list in the response flags providers whose models only appear once you pass `key_id` for one of the team's keys; those return no models otherwise. Call this before creating an llm_judge eval to pick a valid combo, and prefer a provider the team already has a key for (see llma-provider-key-list).",+ "description": "List provider+model combinations supported for llm_judge. Call it with no arguments to get every supported provider and its models in one response; each model carries the `provider` to pair it with. Pass `provider` to narrow to one of these lowercase values: openai, anthropic, gemini, openrouter, fireworks, azure_openai, together_ai, minimax, zeabur, openai_compatible. Optional `key_id` scopes to a key's reachable deployments or models (mainly azure_openai and openai_compatible) and implies that key's provider. The `providers` list in the response flags providers whose models only appear once you pass `key_id` for one of the team's keys; those return no models otherwise. Listing models needs no key, but running any llm_judge evaluation needs one of the team's own provider keys, so enabling fails without a usable key. Call this before creating an llm_judge eval to pick a valid combo, and prefer a provider the team already has a key for (see llma-provider-key-list).","category": "AI observability","feature": "llm_analytics","summary": "List supported llm_judge models",@@ -8081,7 +8081,7 @@}},"llma-evaluation-test-hog": {- "description": "Test Hog evaluation source code against a sample of recent data without saving. Set target to match how the evaluation runs: 'generation' samples individual $ai_generation events, 'trace' samples whole traces and runs against trace-level globals, 'session' samples whole sessions that have gone quiet and runs against session-level globals. For trace previews, pass target_config.window_seconds to match the saved evaluation's aggregation window; for session previews, pass target_config.quiet_period_seconds to match its quiet period. Returns per-sample raw boolean or numeric results, N/A when allowed, errors, reasoning, and input/output previews. Use this to validate Hog code before creating or updating a 'hog' type evaluation.",+ "description": "Test Hog evaluation source code against a sample of recent data without saving. Set target to match how the evaluation runs: 'generation' samples individual $ai_generation events, 'trace' samples whole traces and runs against trace-level globals, 'session' samples whole sessions that have gone quiet and runs against session-level globals. For trace previews, pass target_config.window_seconds to match the saved evaluation's aggregation window; for session previews, pass target_config.quiet_period_seconds to match its quiet period. For numeric or categorical evaluations, pass the saved output_type and output_config. Returns per-sample raw boolean, numeric, or categorical results, N/A when allowed, errors, reasoning, and input/output previews. Use this to validate Hog code before creating or updating a 'hog' type evaluation.","category": "AI observability","feature": "llm_analytics","summary": "Test Hog evaluation code",@@ -8095,7 +8095,7 @@}},"llma-evaluation-update": {- "description": "Partially update an AI observability evaluation. Requires the evaluation `id` (UUID). If you don't have it, call llma-evaluation-list first to look it up by name. Changing to or from numeric output requires a new evaluation; for numeric evaluations, update output_config to change bounds, N/A handling, or passing_rule. A passing rule has operator 'gte' or 'lte' and a finite threshold. Rule edits reinterpret historical scores; saved reports stay unchanged. Toggle enabled, change its runtime type or evaluation config, or change the model for an llm_judge. When switching to llm_judge, include model_configuration with provider and model. When an llm_judge remains an llm_judge, omit model_configuration to keep its current model or provide both fields to replace it; null is rejected for configured judges. When switching an llm_judge to hog or sentiment, set model_configuration to null. Legacy llm_judge evaluations without a model remain editable. provider_key_id may be null when no key is pinned. `target` accepts 'generation', 'trace', or 'session'. Pass a `directory_id` returned by llma-evaluation-directory-list to move the evaluation into a directory, or pass null to move it to the top level. After you enable an evaluation for the first time, offer the user a backfill over past data with llma-evaluation-backfill-estimate.",+ "description": "Partially update an AI observability evaluation. Requires the evaluation `id` (UUID). If you don't have it, call llma-evaluation-list first to look it up by name. Changing to or from numeric or categorical output requires a new evaluation; for these evaluations, update output_config to change bounds, categories, N/A handling, or passing_rule. A numeric passing rule has operator 'gte' or 'lte' and a finite threshold; a categorical passing rule lists the passing category keys. Rule edits reinterpret historical results; saved reports stay unchanged. Toggle enabled, change its runtime type or evaluation config, or change the model for an llm_judge. When switching to llm_judge, include model_configuration with provider and model. When an llm_judge remains an llm_judge, omit model_configuration to keep its current model or provide both fields to replace it; null is rejected for configured judges. When switching an llm_judge to hog or sentiment, set model_configuration to null. Legacy llm_judge evaluations without a model remain editable. provider_key_id may be null when no key is pinned. `target` accepts 'generation', 'trace', or 'session'. Pass a `directory_id` returned by llma-evaluation-directory-list to move the evaluation into a directory, or pass null to move it to the top level. After you enable an evaluation for the first time, offer the user a backfill over past data with llma-evaluation-backfill-estimate.","category": "AI observability","feature": "llm_analytics","summary": "Update evaluation",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex cb863390bfa1..ecf4d72a2498 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -8054,7 +8054,7 @@}},"llma-evaluation-create": {- "description": "Create an evaluation. 'llm_judge': set evaluation_config.prompt and model_configuration with provider and model; provider_key_id may be null when no key is pinned. 'hog': evaluation_config.source (Hog returning a boolean or finite number). For 'hog' and 'llm_judge', choose output_type='boolean' or 'numeric'; numeric output_config accepts min, max, step, allows_na, and passing_rule. 'sentiment': output_type='sentiment', omit model_configuration, optional evaluation_config.source='user_messages'. `target` accepts 'generation' (default), 'trace', or 'session'. A session target runs once per `$ai_session_id` and defaults to the 'inactivity' settle strategy. Pass `enabled` as a boolean (true to start scoring new $ai_generation events immediately, false to create it paused). To organize the evaluation, pass a `directory_id` returned by llma-evaluation-directory-list. Omit `directory_id` or pass null to keep it at the top level. Results are '$ai_evaluation' events. An evaluation only scores data that arrives after it is enabled, so once it is enabled, offer the user a backfill over past data with llma-evaluation-backfill-estimate.",+ "description": "Create an evaluation. 'llm_judge': set evaluation_config.prompt and model_configuration with provider and model; provider_key_id may be null when no key is pinned. 'hog': evaluation_config.source (Hog returning a boolean, a finite number, or category keys). For 'hog' and 'llm_judge', choose output_type='boolean', 'numeric', or 'categorical'; numeric output_config accepts min, max, step, allows_na, and passing_rule; categorical output_config accepts options, selection_mode, allows_na, and passing_rule. 'sentiment': output_type='sentiment', omit model_configuration, optional evaluation_config.source='user_messages'. `target` accepts 'generation' (default), 'trace', or 'session'. A session target runs once per `$ai_session_id` and defaults to the 'inactivity' settle strategy. Pass `enabled` as a boolean (true to start scoring new $ai_generation events immediately, false to create it paused). To organize the evaluation, pass a `directory_id` returned by llma-evaluation-directory-list. Omit `directory_id` or pass null to keep it at the top level. Results are '$ai_evaluation' events. An evaluation only scores data that arrives after it is enabled, so once it is enabled, offer the user a backfill over past data with llma-evaluation-backfill-estimate.","category": "AI observability","feature": "llm_analytics","summary": "Create evaluation",@@ -8166,7 +8166,7 @@}},"llma-evaluation-judge-models": {- "description": "List provider+model combinations supported for llm_judge. Call it with no arguments to get every supported provider and its models in one response; each model carries the `provider` to pair it with. Pass `provider` to narrow to one of these lowercase values: openai, anthropic, gemini, openrouter, fireworks, azure_openai, together_ai, minimax, zeabur, openai_compatible. Optional `key_id` scopes to a key's reachable deployments or models (mainly azure_openai and openai_compatible) and implies that key's provider. The `providers` list in the response flags providers whose models only appear once you pass `key_id` for one of the team's keys; those return no models otherwise. Call this before creating an llm_judge eval to pick a valid combo, and prefer a provider the team already has a key for (see llma-provider-key-list).",+ "description": "List provider+model combinations supported for llm_judge. Call it with no arguments to get every supported provider and its models in one response; each model carries the `provider` to pair it with. Pass `provider` to narrow to one of these lowercase values: openai, anthropic, gemini, openrouter, fireworks, azure_openai, together_ai, minimax, zeabur, openai_compatible. Optional `key_id` scopes to a key's reachable deployments or models (mainly azure_openai and openai_compatible) and implies that key's provider. The `providers` list in the response flags providers whose models only appear once you pass `key_id` for one of the team's keys; those return no models otherwise. Listing models needs no key, but running any llm_judge evaluation needs one of the team's own provider keys, so enabling fails without a usable key. Call this before creating an llm_judge eval to pick a valid combo, and prefer a provider the team already has a key for (see llma-provider-key-list).","category": "AI observability","feature": "llm_analytics","summary": "List supported llm_judge models",@@ -8292,7 +8292,7 @@}},"llma-evaluation-test-hog": {- "description": "Test Hog evaluation source code against a sample of recent data without saving. Set target to match how the evaluation runs: 'generation' samples individual $ai_generation events, 'trace' samples whole traces and runs against trace-level globals, 'session' samples whole sessions that have gone quiet and runs against session-level globals. For trace previews, pass target_config.window_seconds to match the saved evaluation's aggregation window; for session previews, pass target_config.quiet_period_seconds to match its quiet period. Returns per-sample raw boolean or numeric results, N/A when allowed, errors, reasoning, and input/output previews. Use this to validate Hog code before creating or updating a 'hog' type evaluation.",+ "description": "Test Hog evaluation source code against a sample of recent data without saving. Set target to match how the evaluation runs: 'generation' samples individual $ai_generation events, 'trace' samples whole traces and runs against trace-level globals, 'session' samples whole sessions that have gone quiet and runs against session-level globals. For trace previews, pass target_config.window_seconds to match the saved evaluation's aggregation window; for session previews, pass target_config.quiet_period_seconds to match its quiet period. For numeric or categorical evaluations, pass the saved output_type and output_config. Returns per-sample raw boolean, numeric, or categorical results, N/A when allowed, errors, reasoning, and input/output previews. Use this to validate Hog code before creating or updating a 'hog' type evaluation.","category": "AI observability","feature": "llm_analytics","summary": "Test Hog evaluation code",@@ -8306,7 +8306,7 @@}},"llma-evaluation-update": {- "description": "Partially update an AI observability evaluation. Requires the evaluation `id` (UUID). If you don't have it, call llma-evaluation-list first to look it up by name. Changing to or from numeric output requires a new evaluation; for numeric evaluations, update output_config to change bounds, N/A handling, or passing_rule. A passing rule has operator 'gte' or 'lte' and a finite threshold. Rule edits reinterpret historical scores; saved reports stay unchanged. Toggle enabled, change its runtime type or evaluation config, or change the model for an llm_judge. When switching to llm_judge, include model_configuration with provider and model. When an llm_judge remains an llm_judge, omit model_configuration to keep its current model or provide both fields to replace it; null is rejected for configured judges. When switching an llm_judge to hog or sentiment, set model_configuration to null. Legacy llm_judge evaluations without a model remain editable. provider_key_id may be null when no key is pinned. `target` accepts 'generation', 'trace', or 'session'. Pass a `directory_id` returned by llma-evaluation-directory-list to move the evaluation into a directory, or pass null to move it to the top level. After you enable an evaluation for the first time, offer the user a backfill over past data with llma-evaluation-backfill-estimate.",+ "description": "Partially update an AI observability evaluation. Requires the evaluation `id` (UUID). If you don't have it, call llma-evaluation-list first to look it up by name. Changing to or from numeric or categorical output requires a new evaluation; for these evaluations, update output_config to change bounds, categories, N/A handling, or passing_rule. A numeric passing rule has operator 'gte' or 'lte' and a finite threshold; a categorical passing rule lists the passing category keys. Rule edits reinterpret historical results; saved reports stay unchanged. Toggle enabled, change its runtime type or evaluation config, or change the model for an llm_judge. When switching to llm_judge, include model_configuration with provider and model. When an llm_judge remains an llm_judge, omit model_configuration to keep its current model or provide both fields to replace it; null is rejected for configured judges. When switching an llm_judge to hog or sentiment, set model_configuration to null. Legacy llm_judge evaluations without a model remain editable. provider_key_id may be null when no key is pinned. `target` accepts 'generation', 'trace', or 'session'. Pass a `directory_id` returned by llma-evaluation-directory-list to move the evaluation into a directory, or pass null to move it to the top level. After you enable an evaluation for the first time, offer the user a backfill over past data with llma-evaluation-backfill-estimate.","category": "AI observability","feature": "llm_analytics","summary": "Update evaluation",