exploring-ai-failures
What it does
This skill looks through real AI traces to find where responses go wrong, including answers that look fine but ignore instructions or misuse tools. It is for teams who want to know what is breaking in their AI feature.
When to use it
- βWhen you want to know what is going wrong with an AI feature in production.
- βWhen users report bad answers and you need to find the common patterns.
- βWhen you want a ranked list of AI problems to decide what to fix first.
Skill link
https://github.com/PostHog/posthog/blob/master/products/ai_observability/skills/exploring-ai-failures/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βWhat is going wrong with our support chatbot? Find the main failure patterns from real conversations.β
5 new skills a week. 1 minute to read.
How it works
It uses queries to locate suspicious traces, reads them, and groups the failures into a ranked list of patterns. The result shows which problems are most common and gives examples, so you can act on them.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Exploring AI failures
The highest-value thing you can do with production AI traffic is look at where it fails and name the patterns. The catch: most failures are silent. The model returns a clean response β HTTP 200, no exception β that is wrong, off-topic, ignores an instruction, or misuses a tool. Those never raise an error, and they're usually the failures worth caring about.
So this skill is about finding failures (loud and silent), reading them, and grouping them into a
ranked set of failure modes you can act on: fix a prompt, file a bug, prioritize work, or turn the
top mode into an automatic eval (creating-online-evaluations).
Everything below serves one irreducible activity: reading real traces. The queries only tell you which traces to open β they are never the answer. If you report a list of problems without having opened traces, you've described the loud minority (the things that throw errors) and missed the job.
This is bottom-up: the failure modes emerge from real traces, not from a list of generic metrics decided
in advance. For reading a single trace in depth, lean on exploring-llm-traces; for emergent grouping at
high volume, exploring-llm-clusters.
Tools
| Tool | Purpose |
|---|---|
posthog:query-llm-traces-list |
List candidate traces β filter by error, sort by a metric, scope by type |
posthog:query-llm-trace |
Read a trace in full to see what actually went wrong |
posthog:execute-sql |
Find metric outliers, discover the trace taxonomy, count failure modes |
posthog:llma-evaluation-list |
Find existing evals whose failures might reveal a new mode |
posthog:generate-app-url |
Build a region- and project-qualified deep link to a trace or list |
Detailed queries for each strategy below are in
references/finding-traces.md. That file also explains the events vs
ai_events split: heavy content like $ai_input / $ai_output_choices is not on events. For the
full $ai_* event schema, load the exploring-llm-traces skill.
Work with the user
Collaborate on scope and priorities β not on whether to do the work. Narrow with the user up front: which feature or use case? have they already seen something bad? is there a signal to follow (a thumbs-down, a ticket, a metric that looks off)? Once it's scoped, go read traces and come back with coded failure modes β don't stop to ask permission before the reading; that reading is the core activity, not an optional follow-up to offer. When the user doesn't know what to look for, drive the loop below and explain the reasoning as you go; keep the teaching opt-in.
Step 1 β Scope to one use case
Apps have a taxonomy of trace types, and each fails differently β a support chat hallucinates policy, a
summarizer drops key points, an agent loops or misuses a tool. Evaluating or analyzing them together
averages the signal away. Pick one, then find its filter (a $ai_trace_id prefix, a feature
property, a model). If the user isn't sure how their traffic splits, discover the taxonomy first (query
in references/finding-traces.md).
Step 2 β Pick which traces to read
These are ways to select which traces to open β not answers in themselves. The queryable ones (error counts, metric aggregates) tell you where to look; they are never the output. Choose by the context and signals you have, and combine them:
- Code errors (
$ai_is_error) β the cheapest sweep and the least representative signal: it only catches exceptions and API failures, not the silent quality failures that matter most. Use it to grab a few traces to read, not as a tally of "the problems." Slightly more useful for structured-output or tool-calling pipelines, where some failures do surface as parse/schema errors. - Metric outliers β sort by output/input tokens, message length, cost, or latency and open the extremes. Runaway length, truncation, context bloat, and loops cluster at the tails.
- One trace-type slice β narrow to a single kind of request so the traces you read share a taxonomy.
- Stratified sample β when you have no specific signal (the common case), pull a mixed batch acro
FAQ
Does it only find errors that throw exceptions?
No. It also looks for quiet failures, such as wrong answers, ignored instructions and bad tool use, which do not raise errors.
What can I do with the results?
You can fix a prompt, file a bug, set priorities, or turn the top pattern into an automatic check.
Does it read every conversation?
No. Queries pick which traces to look at, and the skill reads those traces in detail.
Details
Original description by the author
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand what's going wrong with an AI feature, find and categorize failure modes, triage errors, or investigate quality issues (wrong answers, ignored instructions, hallucinations, tool misuse) β "what's failing in my agent", "surface error patterns", "why are the responses bad", "find the common failure modes", "what should I fix next". Covers scoping to one use case, finding failing traces by whichever signal fits the context (code errors, metric
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6829
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.