Skip to content

Turn failed production agent traces and user thumbs-downs into anonymized regression cases

Synthetic test prompts miss weird customer inputs. Build a clean flywheel from Langfuse, Braintrust, or OTel failure traces into golden tests.

Copy the prompt and paste it into the AI assistant you already use.

Building a safe production-to-eval flywheel

  1. 01

    Mine implicit failure signals beyond thumbs-down

    Less than 2% of users click thumbs-down; mine traces with >4 tool retries, user 'stop/no' interrupts, or discarded diffs.

  2. 02

    Trim multi-turn history to minimal reproducible state

    Slice 30-turn sessions down to the exact pre-failure workspace/tool snapshot plus the triggering prompt.

  3. 03

    Replace real user data with structurally equivalent synthetic rows

    Preserve exact edge-case structure—null columns, Unicode accents, 400KB payloads—while swapping real names and keys.

  4. 04

    Confirm the new case fails before editing SKILL.md

    Just like TDD bug fixes, verify the extracted test case reproduces the failure first, then confirm your skill update turns it green.

Questions and answers

Why are implicit failure signals better than explicit user ratings?

Developers and ops users rarely click feedback buttons—they simply hit Escape, revert git changes, or rephrase the prompt three times in frustration.

How do you prevent eval suite bloat if you add production bugs weekly?

Cluster duplicate failure modes by root cause and promote representative canonical cases into tiered smoke vs full nightly suites.

Is OpenTelemetry GenAI semantic tracing supported?

Yes, trace-import workflows map standard OTel gen_ai.* tool call and response spans directly into harness fixtures.