: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): offer a backfill when an evaluation is enabled through MCP (#110890)
Bernat Torres4c8959a4036f
diff --git a/products/ai_observability/mcp/tools.yaml b/products/ai_observability/mcp/tools.yamlindex 875967a118e9..40c1d7017695 100644--- a/products/ai_observability/mcp/tools.yaml+++ b/products/ai_observability/mcp/tools.yaml@@ -668,7 +668,8 @@ tools:'inactivity' settle strategy. Pass `enabled` as a boolean (true to start scoring new $ai_generation eventsimmediately, false to create it paused). To organize the evaluation, pass a `directory_id` returned byllma-evaluation-directory-list. Omit `directory_id` or pass null to keep it at the top level. Results are- '$ai_evaluation' events.+ '$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@@ -979,7 +980,8 @@ tools: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.+ 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.param_overrides:id:aliases:diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex c830e34ff9fd..1d307b61e5c8 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -7556,7 +7556,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.",+ "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.","category": "AI observability","feature": "llm_analytics","summary": "Create evaluation",@@ -7808,7 +7808,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.",+ "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.","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 523e749a6de1..84e0e43c6bdf 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -7767,7 +7767,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.",+ "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.","category": "AI observability","feature": "llm_analytics","summary": "Create evaluation",@@ -8019,7 +8019,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.",+ "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.","category": "AI observability","feature": "llm_analytics","summary": "Update evaluation",