Skip to content

Commit 605c3f2

Browse files
jacoblee93ccurmebaskaryan
authored
docs: reorg and visual refresh (langchain-ai#19765)
- put use cases in main sidebar - move modules to own sidebar, rename components - cleanup lcel section - cleanup guides - update font, cell highlighting --------- Co-authored-by: Chester Curme <[email protected]> Co-authored-by: Bagatur <[email protected]>
1 parent 51bdfe0 commit 605c3f2

File tree

186 files changed

+4278
-5041
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+4278
-5041
lines changed

README.md

Lines changed: 50 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,40 @@ conda install langchain -c conda-forge
3434

3535
## 🤔 What is LangChain?
3636

37-
**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.
5257

5358
![Diagram outlining the hierarchical organization of the LangChain framework, displaying the interconnected parts across multiple layers.](docs/static/svg/langchain_stack.svg "LangChain Architecture Overview")
5459

5560
## 🧱 What can you build with LangChain?
56-
**❓ Retrieval augmented generation**
61+
62+
**❓ Question answering with RAG**
5763

5864
- [Documentation](https://python.langchain.com/docs/use_cases/question_answering/)
5965
- End-to-end Example: [Chat LangChain](https://chat.langchain.com) and [repo](https://github.com/langchain-ai/chat-langchain)
6066

61-
**💬 Analyzing structured data**
67+
**🧱 Extracting structured output**
6268

63-
- [Documentation](https://python.langchain.com/docs/use_cases/qa_structured/sql)
64-
- End-to-end Example: [SQL Llama2 Template](https://github.com/langchain-ai/langchain/tree/master/templates/sql-llama2)
69+
- [Documentation](https://python.langchain.com/docs/use_cases/extraction/)
70+
- End-to-end Example: [SQL Llama2 Template](https://github.com/langchain-ai/langchain-extract/)
6571

6672
**🤖 Chatbots**
6773

@@ -72,34 +78,51 @@ And much more! Head to the [Use cases](https://python.langchain.com/docs/use_cas
7278

7379
## 🚀 How does LangChain help?
7480
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
7682
2. **Off-the-shelf chains**: built-in assemblages of components for accomplishing higher-level tasks
7783

7884
Off-the-shelf chains make it easy to get started. Components make it easy to customize existing chains and build new ones.
7985

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+
8096
Components fall into the following **modules**:
8197

8298
**📃 Model I/O:**
8399

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/).
85101

86102
**📚 Retrieval:**
87103

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.
89105

90106
**🤖 Agents:**
91107

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.
93109

94110
## 📖 Documentation
95111

96112
Please see [here](https://python.langchain.com) for full documentation, which includes:
97113

98114
- [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.
103126

104127

105128
## 💁 Contributing

cookbook/LLaMA2_sql_chat.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
"\n",
3939
"To run locally, we use Ollama.ai. \n",
4040
"\n",
41-
"See [here](https://python.langchain.com/docs/integrations/chat/ollama) for details on installation and setup.\n",
41+
"See [here](/docs/integrations/chat/ollama) for details on installation and setup.\n",
4242
"\n",
43-
"Also, see [here](https://python.langchain.com/docs/guides/local_llms) for our full guide on local LLMs.\n",
43+
"Also, see [here](/docs/guides/development/local_llms) for our full guide on local LLMs.\n",
4444
" \n",
4545
"To use an external API, which is not private, we can use Replicate."
4646
]

cookbook/Semi_structured_multi_modal_RAG_LLaMA2.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@
191191
"source": [
192192
"## Multi-vector retriever\n",
193193
"\n",
194-
"Use [multi-vector-retriever](https://python.langchain.com/docs/modules/data_connection/retrievers/multi_vector#summary).\n",
194+
"Use [multi-vector-retriever](/docs/modules/data_connection/retrievers/multi_vector#summary).\n",
195195
"\n",
196196
"Summaries are used to retrieve raw tables and / or raw chunks of text.\n",
197197
"\n",
198198
"### Text and Table summaries\n",
199199
"\n",
200-
"Here, we use ollama.ai to run LLaMA2 locally. \n",
200+
"Here, we use Ollama to run LLaMA2 locally. \n",
201201
"\n",
202-
"See details on installation [here](https://python.langchain.com/docs/guides/local_llms)."
202+
"See details on installation [here](/docs/guides/development/local_llms)."
203203
]
204204
},
205205
{

docs/docs/additional_resources/tutorials.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121

2222
### Featured courses on Deeplearning.AI
2323

24-
- [LangChain for LLM Application Development](https://learn.deeplearning.ai/langchain)
25-
- [LangChain Chat with Your Data](https://learn.deeplearning.ai/langchain-chat-with-your-data)
26-
- [Functions, Tools and Agents with LangChain](https://learn.deeplearning.ai/functions-tools-agents-langchain)
27-
- [Build LLM Apps with LangChain.js](https://learn.deeplearning.ai/courses/build-llm-apps-with-langchain-js)
24+
- [LangChain for LLM Application Development](https://www.deeplearning.ai/short-courses/langchain-for-llm-application-development/)
25+
- [LangChain Chat with Your Data](https://www.deeplearning.ai/short-courses/langchain-chat-with-your-data/)
26+
- [Functions, Tools and Agents with LangChain](https://www.deeplearning.ai/short-courses/functions-tools-agents-langchain/)
27+
- [Build LLM Apps with LangChain.js](https://www.deeplearning.ai/short-courses/build-llm-apps-with-langchain-js/)
2828

2929
### Online courses
3030

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
label: 'Documentation'
2+
position: 3

0 commit comments

Comments
 (0)