← back

Architecting and Testing Controllable Agents: Lance Martin

8.6K views · Oct 11, 2024 · 141:53 min · Watch on YouTube ↗
Takeaway

Use LangGraph to encode the parts of an agent's control flow you want fixed while letting the LLM steer the parts that need flexibility.

Summary

  • Lance Martin (LangChain) frames the chain-vs-agent spectrum: chains are reliable but rigid; ReAct agents are flexible but unreliable due to tool-call errors and non-determinism.
  • Tool calling is just an LLM producing structured payload+name; failure modes worsen with 5-10 tools and long dialogues.
  • LangGraph as the middle ground: graphs with state (short-term memory), tool-calling nodes, and edges with optional LLM-dictated decisions — combining developer-fixed and model-flexible control flow.
  • Uses Corrective RAG as a flagship example: reflect on retrieved docs and fall back to web search if irrelevant; sets up a hands-on Colab workshop.
langgraphagentscorrective-rag
Original description
LLM-powered autonomous agents combine (1) Tool calling, (2) Memory, and (3) Planning to autonomously perform tasks. While they hold tremendous promise, agent reliability has been a barrier for large-scale deployment and productionisation. We’ll cover ways to design and build reliable agents using LangGraph, which can support diverse self-corrective applications such as RAG and code generation. But, just as critically, we’ll cover ways to use LangSmith to test your agents, examining both agent's final response as well as agent tool use trajectories. Collectively, we’ll talk about three types of testing loops you can incorporate into your agent design process - at run time, pre-production, and for production monitoring.

Recorded live in San Francisco at the AI Engineer World's Fair. See the full schedule of talks at https://www.ai.engineer/worldsfair/2024/schedule & join us at the AI Engineer World's Fair in 2025! Get your tickets today at https://ai.engineer/2025

About Lance Martin
Recorded live in San Francisco at the AI Engineer World's Fair. See the full schedule of talks at https://www.ai.engineer/worldsfair/2024/schedule & join us at the AI Engineer World's Fair in 2025! Get your tickets today at https://ai.engineer/2025