You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**LangChain** is a framework for developing applications powered by language models. It enables applications that:
38
-
-**Are context-aware**: connect a language model to sources of context (prompt instructions, few shot examples, content to ground its response in, etc.)
39
-
-**Reason**: rely on a language model to reason (about how to answer based on provided context, what actions to take, etc.)
40
-
41
-
This framework consists of several parts.
42
-
-**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.
43
-
-**[LangChain Templates](templates)**: A collection of easily deployable reference architectures for a wide variety of tasks.
44
-
-**[LangServe](https://github.com/langchain-ai/langserve)**: A library for deploying LangChain chains as a REST API.
45
-
-**[LangSmith](https://smith.langchain.com)**: A developer platform that lets you debug, test, evaluate, and monitor chains built on any LLM framework and seamlessly integrates with LangChain.
46
-
-**[LangGraph](https://python.langchain.com/docs/langgraph)**: LangGraph is a library for building stateful, multi-actor applications with LLMs, built on top of (and intended to be used with) LangChain. It extends the LangChain Expression Language with the ability to coordinate multiple chains (or actors) across multiple steps of computation in a cyclic manner.
47
-
48
-
The LangChain libraries themselves are made up of several different packages.
49
-
-**[`langchain-core`](libs/core)**: Base abstractions and LangChain Expression Language.
50
-
-**[`langchain-community`](libs/community)**: Third party integrations.
51
-
-**[`langchain`](libs/langchain)**: Chains, agents, and retrieval strategies that make up an application's cognitive architecture.
37
+
**LangChain** is a framework for developing applications powered by large language models (LLMs).
38
+
39
+
For these applications, LangChain simplifies the entire application lifecycle:
40
+
41
+
-**Open-source libraries**: Build your applications using LangChain's [modular building blocks](https://python.langchain.com/docs/expression_language/) and [components](https://python.langchain.com/docs/modules/). Integrate with hundreds of [third-party providers](https://python.langchain.com/docs/integrations/platforms/).
42
+
-**Productionization**: Inspect, monitor, and evaluate your apps with [LangSmith](https://python.langchain.com/docs/langsmith/) so that you can constantly optimize and deploy with confidence.
43
+
-**Deployment**: Turn any chain into a REST API with [LangServe](https://python.langchain.com/docs/langserve).
44
+
45
+
### Open-source libraries
46
+
-**`langchain-core`**: Base abstractions and LangChain Expression Language.
47
+
-**`langchain-community`**: Third party integrations.
48
+
- Some integrations have been further split into **partner packages** that only rely on **`langchain-core`**. Examples include **`langchain_openai`** and **`langchain_anthropic`**.
49
+
-**`langchain`**: Chains, agents, and retrieval strategies that make up an application's cognitive architecture.
50
+
-**`[LangGraph](https://python.langchain.com/docs/langgraph)`**: A library for building robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph.
51
+
52
+
### Productionization:
53
+
-**[LangSmith](https://python.langchain.com/docs/langsmith)**: A developer platform that lets you debug, test, evaluate, and monitor chains built on any LLM framework and seamlessly integrates with LangChain.
54
+
55
+
### Deployment:
56
+
-**[LangServe](https://python.langchain.com/docs/langserve)**: A library for deploying LangChain chains as REST APIs.
52
57
53
58

@@ -72,34 +78,51 @@ And much more! Head to the [Use cases](https://python.langchain.com/docs/use_cas
72
78
73
79
## 🚀 How does LangChain help?
74
80
The main value props of the LangChain libraries are:
75
-
1.**Components**: composable tools and integrations for working with language models. Components are modular and easy-to-use, whether you are using the rest of the LangChain framework or not
81
+
1.**Components**: composable building blocks, tools and integrations for working with language models. Components are modular and easy-to-use, whether you are using the rest of the LangChain framework or not
76
82
2.**Off-the-shelf chains**: built-in assemblages of components for accomplishing higher-level tasks
77
83
78
84
Off-the-shelf chains make it easy to get started. Components make it easy to customize existing chains and build new ones.
79
85
86
+
## LangChain Expression Language (LCEL)
87
+
88
+
LCEL is the foundation of many of LangChain's components, and is a declarative way to compose chains. LCEL was designed from day 1 to support putting prototypes in production, with no code changes, from the simplest “prompt + LLM” chain to the most complex chains.
89
+
90
+
-**[Overview](https://python.langchain.com/docs/expression_language/)**: LCEL and its benefits
91
+
-**[Interface](https://python.langchain.com/docs/expression_language/interface)**: The standard interface for LCEL objects
92
+
-**[Primitives](https://python.langchain.com/docs/expression_language/primitives)**: More on the primitives LCEL includes
93
+
94
+
## Components
95
+
80
96
Components fall into the following **modules**:
81
97
82
98
**📃 Model I/O:**
83
99
84
-
This includes prompt management, prompt optimization, a generic interface for all LLMs, and common utilities for working with LLMs.
100
+
This includes [prompt management](https://python.langchain.com/docs/modules/model_io/prompts/), [prompt optimization](https://python.langchain.com/docs/modules/model_io/prompts/example_selectors/), a generic interface for [chat models](https://python.langchain.com/docs/modules/model_io/chat/) and [LLMs](https://python.langchain.com/docs/modules/model_io/llms/), and common utilities for working with [model outputs](https://python.langchain.com/docs/modules/model_io/output_parsers/).
85
101
86
102
**📚 Retrieval:**
87
103
88
-
Data Augmented Generation involves specific types of chains that first interact with an external data source to fetch data for use in the generation step. Examples include summarization of long pieces of text and question/answering over specific data sources.
104
+
Retrieval Augmented Generation involves [loading data](https://python.langchain.com/docs/modules/data_connection/document_loaders/) from a variety of sources, [preparing it](https://python.langchain.com/docs/modules/data_connection/document_loaders/), [then retrieving it](https://python.langchain.com/docs/modules/data_connection/retrievers/)for use in the generation step.
89
105
90
106
**🤖 Agents:**
91
107
92
-
Agents involve an LLM making decisions about which Actions to take, taking that Action, seeing an Observation, and repeating that until done. LangChain provides a standard interface for agents, a selection of agents to choose from, and examples of end-to-end agents.
108
+
Agents allow an LLM autonomy over how a task is accomplished. Agents make decisions about which Actions to take, then take that Action, observe the result, and repeat until the task is complete done. LangChain provides a [standard interface for agents](https://python.langchain.com/docs/modules/agents/), a [selection of agents](https://python.langchain.com/docs/modules/agents/agent_types/) to choose from, and examples of end-to-end agents.
93
109
94
110
## 📖 Documentation
95
111
96
112
Please see [here](https://python.langchain.com) for full documentation, which includes:
97
113
98
114
-[Getting started](https://python.langchain.com/docs/get_started/introduction): installation, setting up the environment, simple examples
99
-
- Overview of the [interfaces](https://python.langchain.com/docs/expression_language/), [modules](https://python.langchain.com/docs/modules/), and [integrations](https://python.langchain.com/docs/integrations/providers)
100
-
-[Use case](https://python.langchain.com/docs/use_cases/qa_structured/sql) walkthroughs and best practice [guides](https://python.langchain.com/docs/guides/adapters/openai)
101
-
-[LangSmith](https://python.langchain.com/docs/langsmith/), [LangServe](https://python.langchain.com/docs/langserve), and [LangChain Template](https://python.langchain.com/docs/templates/) overviews
102
-
-[Reference](https://api.python.langchain.com): full API docs
115
+
-[Use case](https://python.langchain.com/docs/use_cases/) walkthroughs and best practice [guides](https://python.langchain.com/docs/guides/)
116
+
- Overviews of the [interfaces](https://python.langchain.com/docs/expression_language/), [components](https://python.langchain.com/docs/modules/), and [integrations](https://python.langchain.com/docs/integrations/providers)
117
+
118
+
You can also check out the full [API Reference docs](https://api.python.langchain.com).
119
+
120
+
## 🌐 Ecosystem
121
+
122
+
-[🦜🛠️ LangSmith](https://python.langchain.com/docs/langsmith/): Tracing and evaluating your language model applications and intelligent agents to help you move from prototype to production.
123
+
-[🦜🕸️ LangGraph](https://python.langchain.com/docs/langgraph): Creating stateful, multi-actor applications with LLMs, built on top of (and intended to be used with) LangChain primitives.
124
+
-[🦜🏓 LangServe](https://python.langchain.com/docs/langserve): Deploying LangChain runnables and chains as REST APIs.
125
+
-[LangChain Templates](https://python.langchain.com/docs/templates/): Example applications hosted with LangServe.
0 commit comments