Skip to content

: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.

chore(mcp): add insight round-trip and verification benchmark tasks (#72821)

Thomas Obermüller79752975af6f
diff --git a/services/mcp/evals/README.md b/services/mcp/evals/README.md
index 6dedce42debb..be8b72de198f 100644
--- a/services/mcp/evals/README.md
+++ b/services/mcp/evals/README.md
@@ -9,7 +9,7 @@ Two consumers:
## Layout
-- `benchmark/tasks.yaml` — the task set (v0). Each task is a realistic agent goal with the tools a competent agent should reach for.
+- `benchmark/tasks.yaml` — the task set (v1). Each task is a realistic agent goal with the tools a competent agent should reach for.
- `benchmark/schema.ts` — zod schema, loader, and types. `tests/evals/benchmark.test.ts` validates the fixtures against the schema and the live tool catalog, so a tool rename or removal fails CI here instead of silently invalidating the benchmark.
## Task format
diff --git a/services/mcp/evals/benchmark/schema.ts b/services/mcp/evals/benchmark/schema.ts
index a9b36e525469..65001fc70cb8 100644
--- a/services/mcp/evals/benchmark/schema.ts
+++ b/services/mcp/evals/benchmark/schema.ts
@@ -54,7 +54,7 @@ export const BenchmarkTaskSchema = z.object({
})
export const BenchmarkFileSchema = z.object({
- version: z.literal(0),
+ version: z.literal(1),
tasks: z.array(BenchmarkTaskSchema).min(1),
})
diff --git a/services/mcp/evals/benchmark/tasks.yaml b/services/mcp/evals/benchmark/tasks.yaml
index ca87c0c7e7b4..deb3588a65d6 100644
--- a/services/mcp/evals/benchmark/tasks.yaml
+++ b/services/mcp/evals/benchmark/tasks.yaml
@@ -1,9 +1,9 @@
-# MCP agent-experience benchmark v0.
+# MCP agent-experience benchmark v1.
#
# Task intents are paraphrased from real agent usage (top tool families by
# production volume) — never verbatim copies of customer text. Keep probes
# read-only; the runner refuses non-read-only probe tools.
-version: 0
+version: 1
tasks:
# --- sql ---------------------------------------------------------------
- id: sql-daily-event-volume
@@ -107,6 +107,32 @@ tasks:
acceptable_tools: [execute-sql, query-error-tracking-issues-list]
success_criteria: 'Identifies the people behind the spike data point rather than just re-plotting the trend.'
+ - id: funnel-dropoff-actors
+ category: product-analytics
+ intent: 'Which users dropped off between the first and second step of our signup funnel this month?'
+ expected_tools: [query-funnel-actors]
+ acceptable_tools: [query-funnel, execute-sql]
+ success_criteria: 'Lists the actual people who dropped off entering the second step (drop-off step semantics, not a converted-through step), rather than just re-plotting the funnel conversion rate.'
+ probe:
+ # Repeated-pageview steps keep the probe runnable in any seeded demo
+ # project; funnelStep -2 = dropped off entering step 2. Probe mode
+ # only guards arg acceptance, tool errors, and latency — an empty
+ # actor list still passes. Step SEMANTICS (returning the right
+ # people) are judged in agent mode via success_criteria.
+ tool: query-funnel-actors
+ args:
+ funnelStep: -2
+ includeRecordings: false
+ source:
+ kind: FunnelsQuery
+ dateRange:
+ date_from: '-30d'
+ series:
+ - kind: EventsNode
+ event: '$pageview'
+ - kind: EventsNode
+ event: '$pageview'
+
# --- insights -------------------------------------------------------------
- id: insight-create-daily-signups
category: insights
@@ -129,6 +155,31 @@ tasks:
acceptable_tools: [insight-get, execute-sql]
success_criteria: 'Locates the saved insight, executes it, and reports the most recent data point.'
+ # Multi-step chains below target the observed pain in this family: losing
+ # the created insight's identifiers between calls, over-long descriptions,
+ # and saving without ever verifying the query runs. Create/update are
+ # mutating tools, so these tasks are agent-mode only (no probes).
+ - id: insight-id-roundtrip
+ category: insights
+ intent: 'Create an insight tracking daily pageviews, then rename it, then run it and tell me the latest value.'
+ expected_tools: [insight-create, insight-update, insight-query]
+ acceptable_tools: [query-trends, read-data-schema, insight-get]
+ success_criteria: 'Completes the whole chain reusing the identifiers returned by insight-create for the update and query calls — no schema-rejection retries from passing the wrong identifier field — and reports the latest data point.'
+
+ - id: insight-create-with-description
+ category: insights
+ intent: "Save a trends insight for weekly signups, with a description explaining how it's calculated and any caveats, so teammates can trust it."
+ expected_tools: [insight-create]
+ acceptable_tools: [query-trends, read-data-schema]
+ success_criteria: 'Creates the insight with a substantive non-empty description on the first attempt — no rejected-then-truncated retry loop on the description field.'
+
+ - id: insight-create-verified
+ category: insights
+ intent: "Save a funnel from homepage visit to signup, and confirm it actually computes results before telling me it's done."
+ expected_tools: [insight-create, insight-query]
+ acceptable_tools: [query-funnel, read-data-schema]
+ success_criteria: 'Verifies the saved funnel actually runs — via insight-query after saving or by pre-testing the query before saving — and reports computed results instead of claiming success without ever executing it.'
+
# --- error-tracking --------------------------------------------------------
- id: errors-top-issues
category: error-tracking