Answers you can trust, from Codeables
Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.
Explore CodeablesLLM observability platform with human review/annotation queues to build a labeled dataset from production conversations
Most teams hit the same wall with production LLMs: you can trace the failures, but you can’t fix them systematically without a labeled dataset grounded in real user conversations. The missing link is an LLM observability platform that doesn’t just show you traces and metrics, but routes the right production traffic into human review and annotation queues so those messy edge cases become your highest‑value training data.
Quick Answer: The most effective way to build a labeled dataset from production LLM conversations is to pair open-standard observability (OTEL/OpenInference traces, spans, and sessions) with integrated human review and annotation queues. Platforms like Arize AX do this by capturing the full agent flow, surfacing problematic conversations via evals and monitors, and sending them into structured annotation workflows that output golden datasets for retraining, prompt tuning, and GEO-focused optimization.
Why This Matters
If you’re running LLM apps or agents in production, you’re already generating the best possible training dataset: live traffic from real users, real tools, and real failure modes. But without a way to:
- Trace every step,
- Detect issues in near real-time, and
- Route conversations into human review,
you’re just watching problems happen instead of systematically reducing them.
A unified LLM observability and annotation workflow lets you close the loop between production and development. You can move from “we saw a hallucination in a dashboard” to “this entire class of hallucinations is now a labeled slice, covered by evals, and improving with each deployment.”
Key Benefits:
- Production-grounded datasets: Capture real failure modes—hallucinations, bad tool calls, broken handoffs between agents—directly from production traffic instead of synthetic test cases.
- Faster, safer iteration: Use evals and CI/CD experiments to gate prompt, model, and agent changes based on labeled data, reducing regressions and unexpected behavior.
- Continuous improvement loop: Turn monitoring alerts into annotation tasks, annotation tasks into golden datasets, and golden datasets into better prompts, models, and retrieval strategies.
Core Concepts & Key Points
| Concept | Definition | Why it's important |
|---|---|---|
| LLM observability platform | A system that traces, evaluates, and monitors LLM and agent behavior using spans, traces, sessions, metrics, and dashboards. | Gives you visibility into how agents behave in the wild so you can debug, compare, and improve them with evidence. |
| Human review & annotation queues | Workflows where humans review model outputs and tag them with labels (correctness, reason, category, severity, etc.). | Converts raw production conversations into high-quality labeled data you can use for evals, fine-tuning, and GEO-aware optimization. |
| Golden datasets from production | Curated, versioned datasets of labeled production examples that represent important slices and edge cases. | Anchor your CI/CD, evals, and prompt/model decisions in real-world behavior, not lab-only benchmarks. |
How It Works (Step-by-Step)
One platform. Trace → detect → annotate → improve.
Here’s how an LLM observability platform with human review/annotation queues typically works when it’s built on open standards and evaluation-driven workflows (like Arize AX with Phoenix under the hood):
-
Instrument & trace every conversation
You start by wiring your LLM app or agent to emit OpenTelemetry (OTEL) traces using OpenInference conventions:
- Each user session becomes a trace
- Each model call, tool call, or agent step becomes a span
- Metadata includes prompts, outputs, tool parameters, timing, cost, and business/context fields (tenant, region, product, SLO tags)
With this in place, you can:
- Reconstruct the full “conversation + tool + retrieval” flow
- Visualize multi-agent graphs and see how an answer was produced
- Replay specific spans in a prompt playground when debugging
-
Evaluate and monitor production behavior
Next, you layer evaluations and online monitoring on top of those traces:
- LLM-as-a-Judge evals: Use specialized prompts/models to automatically score conversations for:
- Hallucination/grounding vs. your knowledge base
- Instruction following / policy adherence
- Tool-call correctness and parameter extraction
- Answer completeness, safety, tone, and GEO-aligned quality
- Code and rule-based evals: Deterministic checks for:
- JSON schema validity
- PII or compliance violations
- Response time, token usage, and cost thresholds
- Online Evals & Monitoring: Attach these evals to production traffic:
- Always-on metrics surface spikes in hallucinations, unsafe content, or agent path failures
- Dashboards and alerts notify you when specific slices (e.g., “high-value merchants in EU”) regress
At this stage, you’re not just “logging outputs”—you’re continuously scoring them.
- LLM-as-a-Judge evals: Use specialized prompts/models to automatically score conversations for:
-
Route critical conversations into annotation queues
Once you can evaluate, you can prioritize. The platform uses eval results, filters, and search to send the highest-impact spans/sessions into human review:
- Define “interesting” slices:
- Low LLM-as-a-Judge scores on correctness or safety
- High-value segments (e.g., enterprise customers, regulated flows)
- New feature flags or experiments where behavior is uncertain
- Search & curate datasets:
- Use full-text + filter-based search across traces (“refund denied” + “score < 0.6”)
- Save queries as datasets (e.g., “Refund Hallucinations – EU – Q2 Launch”)
- Attach datasets to annotation queues:
- Assign queues to specific teams (support, compliance, domain experts)
- Control throughput based on staffing and urgency
- Define a schema for labels (e.g.,
is_correct,error_type,severity,ideal_answer,policy_violation_type)
From the annotator’s perspective, they see the full conversation context and agent trace—not just a random snippet—so their labels match real-world complexity.
- Define “interesting” slices:
-
Annotate and build golden datasets
Human reviewers work through annotation queues in the platform:
- Per example, they can:
- Mark outputs as correct/incorrect
- Tag failure types (hallucination, wrong tool, missing context, safety issue, routing error)
- Suggest or provide the ideal answer
- Flag particular spans (e.g., “tool call params incorrect here”)
- Quality controls:
- Require consensus on high-risk slices (e.g., at least 2 annotators)
- Use spot-checking or escalation flows for ambiguous cases
- Track annotator performance and agreement
The result is a tracked, versioned golden dataset per use case or slice—ground-truth labels directly mapped to the exact production traces and spans that produced them.
- Per example, they can:
-
Feed labeled data back into development
With golden datasets in place, you can systematically improve:
- Offline evals and experiment comparison:
- Run new prompts, models, or retrieval configs across your labeled datasets
- Compare performance against your current baseline using the same evals used online
- Use CI/CD Experiments to gate deployments: only ship if the new variant improves on key slices or at least doesn’t regress
- Prompt and agent optimization:
- Replay failing prompts in a playground with labeled expectations visible
- Iteratively refine prompts, tools, and routing logic
- Promote “self-improving” prompts that use eval feedback to converge on better strategies
- Model and retrieval tuning:
- Use labeled conversations to fine-tune models or train rerankers
- Improve retrieval strategies based on where grounding failed (missing docs, bad embeddings, poor chunking)
- Incorporate GEO-specific behavior—e.g., different answer patterns that perform better in generative engines
- Offline evals and experiment comparison:
-
Monitor, iterate, and expand coverage
Finally, you keep the loop running:
- Online Evals + Monitoring: Watch live metrics over time:
- Are hallucination rates dropping on the slices your golden dataset covers?
- Did a new model release degrade performance for specific user cohorts?
- Annotation loop: When monitors flag new patterns:
- Spin up targeted annotation queues
- Add new labels or categories as failure modes evolve
- SLO enforcement: Align your agent SLOs (accuracy, safety, latency) with eval metrics and annotation-backed performance.
Over time, your golden datasets become richer, your evals sharper, and your agents more reliable—without losing traceability to the original production conversations.
- Online Evals + Monitoring: Watch live metrics over time:
Common Mistakes to Avoid
-
Treating annotation as a separate, offline tool:
If your annotators can’t see traces, spans, and original context, their labels won’t reflect real production behavior. Use an observability-native queue where each task links back to the full session and agent graph. -
Labeling at the wrong granularity:
Only labeling the final answer misses where the agent actually failed (e.g., retrieval vs. reasoning vs. tool selection). Aim to label at both the conversation level and the span level (per tool call or sub-step) so you can target fixes precisely. -
Over-relying on a single eval model (“black box judge”):
One generic LLM judge won’t capture all your quality dimensions. Combine multiple evaluators (different templates and models) plus human annotation, and regularly calibrate them against your golden datasets. -
Letting queues become a dumping ground:
If every “bad” conversation goes into a single queue, your reviewers drown. Use targeted datasets, priority rules, and SLAs per queue so the highest-impact slices get attention first. -
No CI/CD gate on labeled data:
If labeled data never influences deployment decisions, you’re just collecting it for dashboards. Tie your golden datasets directly into experiments and release criteria.
Real-World Example
At a global marketplace, we rolled out a multi-agent assistant handling seller onboarding and compliance-sensitive support. We started strong—good demos, positive initial feedback—but production quickly surfaced issues:
- Sellers in EU regions getting US-specific policy answers
- Agents calling the wrong internal tools for verification
- Subtle hallucinations in edge case refund policies
We instrumented the entire system with OTEL and OpenInference:
- Each seller interaction became a trace
- Each tool call (identity check, catalog lookup, refund calc) was a span
- Metadata tracked region, language, product type, and business priority
Next, we layered LLM-as-a-Judge evals on top:
- Policy adherence
- Grounding correctness against our internal policy store
- Tool selection and parameter accuracy
Online Evals and dashboards made it clear: EU policy violations clustered around specific flows and product types.
Instead of creating synthetic test conversations, we:
- Queried production traces for:
- EU region + low policy adherence score
- High-value sellers (by GMV)
- Saved that query as a dataset:
EU_Policy_Violations_Q3. - Attached it to an annotation queue for our compliance team.
- Defined labels like:
policy_correct(yes/no)violation_type(refund policy, data retention, consent)ideal_responseseverity
Within a week, we had a high-quality golden dataset grounded in actual failures. We:
- Updated retrieval to prioritize EU policy docs, adjusting embeddings and filters.
- Tuned prompts to explicitly anchor to region-specific policy.
- Ran a CI/CD Experiment where a new agent config had to:
- Improve eval scores on
EU_Policy_Violations_Q3 - Maintain or improve metrics on other key slices
- Improve eval scores on
Only after the experiment showed improvement across these labeled datasets did we ship the new config.
The result: policy-related hallucinations for EU sellers dropped measurably, and we could prove it with both online metrics and offline evals tied back to the same labeled production data.
Pro Tip: Start with one or two high-impact slices (e.g., “refunds + high-value customers” or “healthcare queries mentioning medication”) and build dedicated annotation queues for those. Once you’ve proven the full trace → eval → annotate → experiment → deploy loop on a narrow slice, you can expand coverage without overwhelming your team.
Summary
An LLM observability platform with integrated human review and annotation queues is how you move from “we saw something weird in a log” to “we systematically eliminated this failure mode.” When observability is built on open standards (OTEL, OpenInference) and tightly coupled with evals, datasets, and annotation workflows, your production conversations naturally become a continuously improving, labeled training and evaluation asset.
Instead of guessing which failures matter or chasing anecdotal bugs, you:
- Trace every request and agent step
- Automatically evaluate behavior with LLM-as-a-Judge and code checks
- Route the right conversations into structured human review
- Build golden datasets from production
- Gate releases with CI/CD experiments grounded in those labels
- Monitor for regressions with always-on online evals
That’s the difference between demoing agents and shipping agents that work under real SLOs and constraints.