Context
A customer asks whether a travel booking has completed after an agent tool call.
How-to
A practical sequence teams use to turn live agent failures into approved, retrievable examples—then prove whether they help.
Export OpenTelemetry spans or conversation logs that include requests, tools, intermediate steps, final responses, and outcome where available.
Start with a bounded workflow and a repeatable time window. Remove or mask unnecessary personal data before review, then retain a trace identifier so every selected example can be audited.
Group by intent, policy break, tool error, misunderstanding, or escalation—not by one-off noise.
Prioritize a cluster only when the failure repeats, has a measurable cost, and a reviewer can explain what a good result looks like. A small, coherent sample beats a large undifferentiated export.
Capture the response or trajectory that should have happened, plus a short critique.
The correction should state what changed and why: missing fact, wrong tool choice, incomplete policy step, unsafe claim, or weak handoff. Use an escalation state rather than inventing a confident answer.
Keep context, rewrite, scope, version, and approval status in a library you can filter and disable.
A minimum record includes source trace, workflow, failed output, approved replacement, reviewer, approval timestamp, policy scope, and retrieval restrictions. That provenance lets teams revise or retire an experience safely.
Inject relevant examples at runtime and compare success, edits, escalations, latency, and cost.
Test against a held-out slice or a controlled workflow. Measure whether retrieved examples help the target scenario without degrading unrelated intents, then expand only if the evidence supports it.
A customer asks whether a travel booking has completed after an agent tool call.
The agent states that a ticket was purchased without confirming the result or providing a safe next step.
Confirm the completed state only when the trace supports it, state the relevant booking detail, and invite the customer to return if anything changes.
Tag as travel support, completion confirmation, approved; restrict retrieval to matching workflow and policy scope.
See how this governed record fits a golden-dataset serviceUse a production-trace sprint when you need help applying the method
The Agent Improvement Sprint compresses this loop for one workflow: audit, human-corrected dataset, retrieval prototype, and before/after evidence.
Book a call. Bring a sample of production traces and we will outline a focused golden-dataset sprint.