Martin distinguishes chains, whose steps are set by developers, from agents, where an LLM chooses what happens next. In a ReAct loop, the model selects a tool, receives its result, and decides whether to act again. That flexibility can come with reliability problems, including wrong tool choices, bad arguments, and repeated calls.
Architecting and Testing Controllable Agents
Speaker
Lance Martin of LangChain leads a hands-on AI Engineer workshop on designing and evaluating reliable, controllable agents.
Martin presents LangGraph as a way to combine fixed steps with LLM-directed choices at specific points. Its graphs use nodes, edges, and shared state to manage operations and information. He illustrates the approach with Corrective RAG, which grades retrieved documents and can use web search when they are irrelevant, and Self-RAG, which checks answers for hallucinations and relevance.
Martin describes three feedback loops: error correction inside the app, pre-production evaluation, and production monitoring. An evaluation can combine a dataset, an application, and an evaluator, such as a heuristic or an LLM judge. He recommends checking both answer quality and tool-use trajectories, since an agent can reach a correct answer through inefficient or unexpected steps.
Martin suggests starting with a small evaluation set, even five question-and-answer pairs, and using model-generated examples that people review. In production, teams can grade retrieval quality, answer relevance, and grounding without reference answers, then audit failures and add them to the offline test set. He also recommends simple, fast checks for in-app correction, such as testing whether generated code imports exist.
Martin recommends separating retrieval chunks from the context passed to the model: retrieve with smaller chunks, then use the full document when more context is needed. For multi-turn RAG, he says a deeper follow-up may call for retrieving more content or filtering by section metadata, rather than only rewriting the question. For many tools or multiple knowledge stores, an explicit router or semantic search over tool descriptions can reduce reliance on a model choosing from a long list.
Takeaways
- Use fixed graph steps for predictable work and reserve model decisions for places that need branching.
- Evaluate both the final answer and the agent’s tool-use path; correctness alone can hide inefficient or erratic behavior.
- Start with a small, reviewed evaluation set and grow it with audited production failures.
- Put lightweight, fast checks inside the workflow to catch errors the model can correct.
- For follow-up questions, adjust retrieval scope or metadata filters when users need deeper source context.
Mentioned in this talk
Search inside this talk
What was claimed 12
- built
“We built it for developers so they could see what's going on inside their agent”
8:27in3 ingredients for building reliable enterprise agentsYouTube Verified10 sources· Talk, Job posting, Web· archived
- built
“one thing we've released is LangGraph”
6:30in3 ingredients for building reliable enterprise agentsYouTube Verified10 sources· Talk, GitHub, Job posting, Web· archived
- feature
LangGraph: Expresses control flows as graphs with nodes, edges, and shared state“LangGraph is a library ... that can express control flows as graphs”
YouTube Unverified1 source· Talk
- builtLance Martin built Corrective RAG
“I showed that you can build Corrective RAG inside LangGraph”
YouTube Unverified1 source· Talk
- usesLance Martin uses
LangGraph“LangGraph and Llama 3 implementing three different things”
YouTube Unverified2 sources· Talk
- feature
LangSmith: Supports testing, evaluation, monitoring, and tracing
“supports testing and evaluation, as well as monitoring and tracing”
YouTube Unverified1 source· Talk
- metric
LangGraph: 60% answer score on a five-question evaluation with a local 8-billion-parameter model“It does fine, getting 60% on the ultimate answer”
YouTube Unverified1 source· Talk
- metric
LangGraph: 80% answer score and 100% tool-calling score with Fireworks Function V2 in the reported five-question evaluation“With LangGraph, this gets up to 80% on answers and 100% on tool calling”
YouTube Unverified1 source· Talk











