LangChain

Turn Flagged Traces Into a Dataset in 3 Minutes with the LangSmith CLI

Published 2026-09-09 · Duration 3:36

Summary

This walkthrough demonstrates a scalable workflow for analyzing high volumes of production traces by leveraging the LangSmith CLI and a coding agent. The process uses a 'perceived error' evaluator to flag potential failures, which are then systematically classified into defined issue types (e.g., flawed plan, context explosion). The final output is a structured, native thread dataset in LangSmith, organized into separate dataset splits for each issue type, making the failures readily available for evaluation metrics or post-training data.

Download summary

Key takeaways

  1. Automated Failure Identification

    Use the 'perceived error' evaluator to flag threads containing evidence of agent mistakes or misunderstandings, transforming manual review into a data-driven process.

  2. Systematic Failure Classification 2:04

    Define specific agent issue types (e.g., Agent looping, flawed plan) and use a coding agent to classify hundreds of flagged threads into these categories.

  3. Building Structured Datasets

    The workflow culminates in creating a native thread dataset in LangSmith, ensuring a dedicated dataset split for every identified issue type. This provides a sorted, reusable corpus of failures.

Technical details

  • LangSmith CLI Workflow 0s

    The process involves using the LangSmith CLI and a coding agent to interact with production traces. Steps include grabbing the latest LangSmith skills and pulling a defined number of flagged threads (e.g., 50 latest threads flagged for perceived error).

  • Agent Classification 138s

    A defined list of agent issue types (e.g., Agent looping, context explosion, failed recovery, feature gap, flawed plan) is provided to the coding agent to classify the perceived error failures by reading both the thread and the feedback reasoning.

  • Dataset Creation

    The final step uses a prompt to instruct the coding agent to create a native thread dataset in LangSmith, ensuring a separate dataset split is generated for each defined issue type.

Mentioned resources

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.