Tutorials¶
Welcome to the LangGraph Tutorials! These notebooks introduce LangGraph through building various language agents and applications.
Quick Start¶
Learn the basics of LangGraph through a comprehensive quick start in which you will build an agent from scratch.
- Quick Start: In this tutorial, you will build a support chatbot using LangGraph.
- LangGraph Cloud Quick Start: In this tutorial, you will build and deploy an agent to LangGraph Cloud.
Use cases¶
Learn from example implementations of graphs designed for specific scenarios and that implement common design patterns.
Chatbots¶
- Customer Support: Build a customer support chatbot to manage flights, hotel reservations, car rentals, and other tasks
- Prompt Generation from User Requirements: Build an information gathering chatbot
- Code Assistant: Build a code analysis and generation assistant
RAG¶
- Agentic RAG: Use an agent to figure out how to retrieve the most relevant information before using the retrieved information to answer the user's question.
- Adaptive RAG: Adaptive RAG is a strategy for RAG that unites (1) query analysis with (2) active / self-corrective RAG. Implementation of: https://arxiv.org/abs/2403.14403
- For a version that uses a local LLM: Adaptive RAG using local LLMs
- Corrective RAG: Uses an LLM to grade the quality of the retrieved information from the given source, and if the quality is low, it will try to retrieve the information from another source. Implementation of: https://arxiv.org/pdf/2401.15884.pdf
- For a version that uses a local LLM: Corrective RAG using local LLMs
- Self-RAG: Self-RAG is a strategy for RAG that incorporates self-reflection / self-grading on retrieved documents and generations. Implementation of https://arxiv.org/abs/2310.11511.
- For a version that uses a local LLM: Self-RAG using local LLMs
- SQL Agent: Build a SQL agent that can answer questions about a SQL database.
Agent Architectures¶
Multi-Agent Systems¶
- Network: Enable two or more agents to collaborate on a task
- Supervisor: Use an LLM to orchestrate and delegate to individual agents
- Hierarchical Teams: Orchestrate nested teams of agents to solve problems
Planning Agents¶
- Plan-and-Execute: Implement a basic planning and execution agent
- Reasoning without Observation: Reduce re-planning by saving observations as variables
- LLMCompiler: Stream and eagerly execute a DAG of tasks from a planner
Reflection & Critique¶
- Basic Reflection: Prompt the agent to reflect on and revise its outputs
- Reflexion: Critique missing and superfluous details to guide next steps
- Tree of Thoughts: Search over candidate solutions to a problem using a scored tree
- Language Agent Tree Search: Use reflection and rewards to drive a monte-carlo tree search over agents
- Self-Discover Agent: Analyze an agent that learns about its own capabilities
Evaluation¶
- Agent-based: Evaluate chatbots via simulated user interactions
- In LangSmith: Evaluate chatbots in LangSmith over a dialog dataset
Experimental¶
- Web Research (STORM): Generate Wikipedia-like articles via research and multi-perspective QA
- TNT-LLM: Build rich, interpretable taxonomies of user intentand using the classification system developed by Microsoft for their Bing Copilot application.
- Web Navigation: Build an agent that can navigate and interact with websites
- Competitive Programming: Build an agent with few-shot "episodic memory" and human-in-the-loop collaboration to solve problems from the USA Computing Olympiad; adapted from the "Can Language Models Solve Olympiad Programming?" paper by Shi, Tang, Narasimhan, and Yao.
- Complex data extraction: Build an agent that can use function calling to do complex extraction tasks