LangChain shares five evaluation patterns learned from shipping four deep agent applications. Key insights include: each test case needs bespoke success criteria rather than uniform evaluation logic; single-step evals (constraining the agent loop to one iteration) are efficient for validating decision-making at specific points; full agent turns provide end-to-end trajectory, final response, and artifact testing; multi-turn simulations require conditional logic to handle agent deviations gracefully; and reproducible test environments (e.g., temporary directories, Docker containers, mocked HTTP requests) are essential for reliable results. Code examples use LangSmith's Pytest integration with LangGraph's interrupt_before feature.

9m read timeFrom langchain.com
Post cover image
Table of contents
#1: Deep Agents require more bespoke test logic (code) for each datapoint#2: Single step evals are valuable and efficient#3: Full agent turns give you a complete picture#4: Running an agent across multiple turns simulates full user interactions#5: Setting up the right eval environment is importantEvaluate Deep Agents with LangSmith