This interactive course will guide you through the fundamentals of LangChain, LangSmith, and LangGraph. Use the navigation panel on the left to explore different modules.
You'll learn about their core concepts, key features, history, see practical examples, and find resources to continue your learning journey.
LangChain is an open-source framework launched in October 2022 by Harrison Chase. It enables developers to build applications powered by large language models (LLMs)Large Language Model: An AI model trained on vast amounts of text data to understand and generate human-like text. like GPT-4. LangChain simplifies integrating LLMsLarge Language Model. with external data sources, APIsApplication Programming Interface., and tools, facilitating the creation of applications such as chatbots, document summarizers, and code analyzers. (Source: en.wikipedia.org)
Key Features:
ChainsSequences of calls to LLMs or other utilities.: Sequences of calls to LLMsLarge Language Model. and other utilities.
AgentsLLMs that use tools to interact with their environment.:LLMsLarge Language Model. that decide which actions to take.
MemoryPersisting state between calls.: Persisting state between calls of a chain or agent.
ToolsExternal utilities an agent can use.: External utilities like APIsApplication Programming Interface. or databases.
Quick Quiz!
1. What is the primary purpose of LangChain?
What Is LangSmith?
LangSmith is a unified observability and evaluation platform introduced by LangChain. It allows developers to debug, test, and monitor the performance of their AI applications, whether built with LangChain or not. LangSmith provides detailed tracingVisualizing the execution flow of an application. and management capabilities, aiding in the development and maintenance of generative AI applications. (Sources: langchain.com, cobusgreyling.medium.com)
Key Features:
TracingVisualizing execution flow.: Visualize and debug application flow.
Evaluation: Assess AI model and chain performance.
Monitoring: Track application performance over time.
What Is LangGraph?
LangGraph is an orchestration framework built on top of LangChain. It introduces graph structuresRepresenting workflows as nodes and edges. to manage complex, multi-agent workflows, allowing for more sophisticated and scalable AI applications. LangGraph is particularly useful for coordinating multiple components that need to collaborate intelligently. (Sources: academy.finxter.com, medium.com)
Key Features:
Graph StructuresWorkflows as nodes and edges.: Define workflows as graphs.
LangChain raised over $20 million in funding from Sequoia Capital.
Q3 2023
Introduction of LangChain Expression Language (LCEL).
Oct 2023
Launch of LangServe for deploying LCEL code as APIs.
2024
Introduction of LangSmith and LangGraph for enhanced observability and orchestration.
Practical Examples
Interact with the Python code examples below. Edit the code in the text areas and click "Run" to see a simulated output. Click "Reset" to restore the original code.
Example 1: Basic Chain
Simulated Output:
Example 2: Agent with Tools
Simulated Output:
Example 3: LangGraph Workflow
Simulated Output:
Code copied to clipboard!
Visual Overview
This diagram illustrates the typical flow involving LangChain, LangGraph, and LangSmith.
User Input
LangChain
LangGraph
LangSmith
Output
LangChain: Handles the initial processing of user input.
LangGraph: Manages complex workflows and agent interactions.
LangSmith: Provides observability and evaluation tools. (Sources: langchain-ai.github.io, reddit.com, langchain.com)
Learning Resources
This crash course provides a solid foundation. For more in-depth learning, tutorials, and community support, explore these recommended resources: