: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
fix(llm-observability): correct $ai_generation event definition (#90772)
posthog[bot]5d5eb046bf6d
diff --git a/frontend/src/taxonomy/core-filter-definitions-by-group.json b/frontend/src/taxonomy/core-filter-definitions-by-group.jsonindex 9cb10069ed31..5ca00c628a27 100644--- a/frontend/src/taxonomy/core-filter-definitions-by-group.json+++ b/frontend/src/taxonomy/core-filter-definitions-by-group.json@@ -2340,6 +2340,17 @@"description": "The response the MCP server returned. Large strings and sensitive keys are redacted before capture.","label": "MCP response"},+ "$mcp_scope_preset": {+ "description": "Which kind of caller minted the token behind an MCP request, worked out from its scope set. 'scout' is a Signals scout run, 'research' is a read-only report-research run, 'implementation' is a write-capable implementation run, 'sandbox' is any other server-minted run (a task started from the desktop app or the pipeline before the scratchpad scopes tell research and implementation apart), and 'user' is a person's own token. Stamped on every event by PostHog's own MCP server. Use it to split scratchpad and notes usage by caller, for example to measure scout scratchpad adoption apart from ordinary users.",+ "examples": [+ "scout",+ "research",+ "implementation",+ "sandbox",+ "user"+ ],+ "label": "MCP scope preset"+ },"$mcp_server_name": {"description": "The advertised name of the MCP server that handled the request.","examples": [@@ -3909,7 +3920,7 @@"label": "AI feedback (LLM)"},"$ai_generation": {- "description": "A call to an LLM model. Contains the input prompt, output, model used and costs.",+ "description": "A call to an LLM model. The events table has the model used and costs, but not the input prompt or output. To read those, query the input, output, and output_choices columns of the posthog.ai_events table in HogQL. That content is only available within its retention window.","label": "AI generation (LLM)","primary_property": "$ai_model"},@@ -4561,6 +4572,17 @@"description": "The response the MCP server returned. Large strings and sensitive keys are redacted before capture.","label": "MCP response"},+ "$mcp_scope_preset": {+ "description": "Which kind of caller minted the token behind an MCP request, worked out from its scope set. 'scout' is a Signals scout run, 'research' is a read-only report-research run, 'implementation' is a write-capable implementation run, 'sandbox' is any other server-minted run (a task started from the desktop app or the pipeline before the scratchpad scopes tell research and implementation apart), and 'user' is a person's own token. Stamped on every event by PostHog's own MCP server. Use it to split scratchpad and notes usage by caller, for example to measure scout scratchpad adoption apart from ordinary users.",+ "examples": [+ "scout",+ "research",+ "implementation",+ "sandbox",+ "user"+ ],+ "label": "MCP scope preset"+ },"$mcp_server_name": {"description": "The advertised name of the MCP server that handled the request.","examples": [@@ -7355,6 +7377,17 @@"description": "The response the MCP server returned. Large strings and sensitive keys are redacted before capture.","label": "MCP response"},+ "$mcp_scope_preset": {+ "description": "Which kind of caller minted the token behind an MCP request, worked out from its scope set. 'scout' is a Signals scout run, 'research' is a read-only report-research run, 'implementation' is a write-capable implementation run, 'sandbox' is any other server-minted run (a task started from the desktop app or the pipeline before the scratchpad scopes tell research and implementation apart), and 'user' is a person's own token. Stamped on every event by PostHog's own MCP server. Use it to split scratchpad and notes usage by caller, for example to measure scout scratchpad adoption apart from ordinary users.",+ "examples": [+ "scout",+ "research",+ "implementation",+ "sandbox",+ "user"+ ],+ "label": "MCP scope preset"+ },"$mcp_server_name": {"description": "The advertised name of the MCP server that handled the request.","examples": [diff --git a/posthog/taxonomy/taxonomy.py b/posthog/taxonomy/taxonomy.pyindex b0c82972161e..21c866aa8171 100644--- a/posthog/taxonomy/taxonomy.py+++ b/posthog/taxonomy/taxonomy.py@@ -247,7 +247,7 @@ CORE_FILTER_DEFINITIONS_BY_GROUP: dict[str, dict[str, CoreFilterDefinition]] = {},"$ai_generation": {"label": "AI generation (LLM)",- "description": "A call to an LLM model. Contains the input prompt, output, model used and costs.",+ "description": "A call to an LLM model. The events table has the model used and costs, but not the input prompt or output. To read those, query the input, output, and output_choices columns of the posthog.ai_events table in HogQL. That content is only available within its retention window.","primary_property": "$ai_model",},"$ai_evaluation": {