Trivedy’s process starts with shipping an agent, collecting traces of its tool calls and outputs, mining those traces, and running experiments. The goal is to use observed behavior to assess whether changes to prompts, tools, or orchestration improve results.
Improving Agents is a Data Mining Problem
Speaker
Vivek Trivedy, who leads applied research at LangChain, explains how teams can mine agent traces to improve agents at an AI Engineer event.
Agents combine prompts, tools, skills, and orchestration, so their behavior is harder to reason about than a code path. Traces can help teams find interactions where users were happy or upset, check for degradation after context compaction, and compare models on the same tasks.
Reviewing millions of long traces can be costly, and a single trace may exceed an agent’s context window. Trivedy argues for systems that treat traces as external data agents can query. At LangChain, he says, they test whether cheaper open models can match frontier models on trace judging, with Harvey’s Lab Legal benchmark showing roughly similar capability at one or two orders of magnitude lower cost.
Trivedy describes three uses for mined traces: creating datasets to distill strong behavior into smaller models, generating evaluations from real tasks, and preparing material for human review. He recommends collecting feedback quickly, trying harness changes first, fine-tuning when those changes hit a ceiling, and returning to harness work if needed.
Trivedy frames continual learning as using experience from an agent’s environment to update its behavior. He identifies training data, harness updates, and memory as three areas to evolve. For long-lived agents, he says memory will need to be updated and condensed over time rather than kept as an ever-growing log.
Takeaways
- Turn on tracing and use an agent to inspect what your system does in real tasks.
- Use trace level evidence to investigate user experience and compare models on the same work.
- Treat long traces as queryable data so analysis can scale beyond a model’s context window.
- Try harness changes for fast feedback, then fine-tune when prompt and orchestration improvements stall.
- Build continual learning around data collection, evolving the harness, and maintaining useful memory.
Mentioned in this talk
Search inside this talk
What was claimed 9
- built
LangChain built
LangSmith Engine
“we obviously built a product to do that... it's LangSmith Engine.”
YouTube Verified4 sources· Talk, Job posting· archived
- works atVivek Trivedy works at
LangChain
Leads Applied Research, Labs team“I lead applied research at LangChain.”
YouTube Verified2 sources· Talk, Web· archived
- feature
LangChain: Uses tracing projects to centralize trace data per agent or across agents.
“We centralize a lot of our data by putting everything in a tracing project”
YouTube Unverified1 source· Talk
- uses
“What happens if I run GLM-5.2 for this task, and how do I compare them?”
YouTube Unverified1 source· Talk
- uses
LangChain uses
Claude Opus
“we start with Opus, we start with 5.5”
YouTube Unverified1 source· Talk
- metricopen-weight models: Roughly match Opus's trace-judging capability at one or two orders of magnitude lower cost in the cited work.
“The answer is roughly yes, at one or two orders of magnitude cheaper.”
YouTube Unverified1 source· Talk
- uses
“This is work we did with Harvey and their Lab Legal benchmark.”
YouTube Unverified1 source· Talk
- feature
LangSmith Engine: Reads trace data, finds issues, searches it agentically, and prepares datasets and feedback for evaluation or human review.
“it will read all of it, find issues, search over it agentically, and prepare datasets”
YouTube Unverified1 source· Talk











