LangChain is an open-source library that helps developers build applications with large language models (LLMs). It provides a standard interface for chains, which combine LLMs with other computation or knowledge sources. This makes it easier to develop LLM-powered applications.
This framework consists of several parts.
-
LangChain Libraries: The Python and JavaScript libraries. Contains interfaces and integrations for a myriad of components, a basic run time for combining these components into chains and agents, and off-the-shelf implementations of chains and agents.
-
LangChain Templates: A collection of easily deployable reference architectures for a wide variety of tasks. (Python only)
-
LangServe: A library for deploying LangChain chains as a REST API. (Python only)
-
LangSmith: A developer platform that lets you debug, test, evaluate, and monitor chains built on any LLM framework and seamlessly integrates with LangChain.
LCEL is a declarative way to compose chains.
LangChain provides several key modules to help build applications with large language models (LLMs):
- Prompts: Manage prompts for LLMs
- Chains: Combine LLMs with other components
- Agents: Use LLMs to decide actions to take
- Memory: Add state to chains and agents
- Indexes: Combine LLMs with your own data
- Chains/Callbacks: Log and stream intermediate steps
