World's Fair 2024
Architecting and Testing Controllable Agents: Lance Martin
Overview
This talk focuses on architecting and testing reliable AI agents, moving beyond traditional chains and open-ended agents that suffer from poor reliability. The presenter introduces Lang Graph as a solution for building controllable agents that balance flexibility with robustness by expressing control flows as graphs with nodes and edges, incorporating state for memory.
Who should watch
- AI engineers and builders looking to create more reliable AI applications.
- Product Managers and engineers evaluating agentic frameworks.
- Developers struggling with the reliability issues of traditional agent architectures.
- Anyone interested in improving testing and evaluation strategies for AI agents.
Key takeaways
- Chains offer reliability but lack flexibility, while classic React agents are flexible but unreliable due to LLM non-determinism and tool-calling errors.
- Lang Graph allows for defining control flows as graphs, enabling more reliable and controllable agentic behavior by constraining LLM decision-making at specific points.
- Key concepts in Lang Graph include state (short-term memory), nodes (tools or functions), and edges (decision-making logic).
- Techniques like corrective RAG and self-reflection can be implemented using Lang Graph to improve agent robustness, such as validating retrieved documents or checking for hallucinations.
- Testing and evaluation are crucial for agents, with methods including in-app error correction, pre-production testing with datasets, and production monitoring. Lang Smith is presented as a tool to aid in this process.
- Evaluating agent reasoning involves assessing not only the final answer but also the tool-calling trajectory, where Lang Graph demonstrates higher consistency than React agents.
- The "model is not the moat" philosophy emphasizes the importance of robust systems, orchestration frameworks like Lang Graph, and evaluation chassis like Lang Smith.
Notable quotes
*Tool calling is just an LM producing a structured output.*
*Chains are very reliable, but they're not flexible. React agents are very flexible, but they do have reliability problems.*
*Lang Graph sits in the middle where you can actually implement these user-defined, LLM-gated control flows, and they can actually be extremely reliable because of that constraint.*
Unofficial community note. Prefer the recording for nuance.