2022-10-24 21:51:15 +00:00
Welcome to LangChain
==========================
2023-05-15 22:20:37 +00:00
| **LangChain** is a framework for developing applications powered by language models. We believe that the most powerful and differentiated applications will not only call out to a language model, but will also be:
1. *Data-aware* : connect a language model to other sources of data
2. *Agentic* : allow a language model to interact with its environment
2022-11-14 04:13:23 +00:00
2023-05-15 22:20:37 +00:00
| The LangChain framework is designed around these principles.
2023-01-24 08:37:26 +00:00
2023-05-15 22:20:37 +00:00
| This is the Python specific portion of the documentation. For a purely conceptual guide to LangChain, see `here <https://docs.langchain.com/docs/> `_ . For the JavaScript documentation, see `here <https://js.langchain.com/docs/> `_ .
2022-11-14 04:13:23 +00:00
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
Getting Started
----------------
2022-11-14 04:13:23 +00:00
2023-05-15 22:20:37 +00:00
| How to get started using LangChain to create an Language Model application.
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
- `Quickstart Guide <./getting_started/getting_started.html> `_
2023-05-15 04:22:25 +00:00
2023-05-15 22:20:37 +00:00
| Concepts and terminology.
2023-05-15 18:09:25 +00:00
- `Concepts and terminology <./getting_started/concepts.html> `_
2023-05-15 22:20:37 +00:00
| Tutorials created by community experts and presented on YouTube.
2023-05-15 04:22:25 +00:00
- `Tutorials <./getting_started/tutorials.html> `_
2022-11-22 14:16:26 +00:00
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
.. toctree ::
2023-05-15 18:09:25 +00:00
:maxdepth: 2
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
:caption: Getting Started
:name: getting_started
:hidden:
2022-11-22 14:16:26 +00:00
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
getting_started/getting_started.md
2023-05-15 18:09:25 +00:00
getting_started/concepts.md
2023-05-15 04:22:25 +00:00
getting_started/tutorials.md
2022-11-22 14:16:26 +00:00
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
Modules
-----------
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
| These modules are the core abstractions which we view as the building blocks of any LLM-powered application.
2023-05-17 22:30:23 +00:00
For each module LangChain provides standard, extendable interfaces. LangChain also provides external integrations and even end-to-end implementations for off-the-shelf use.
2023-05-15 22:20:37 +00:00
| The docs for each module contain quickstart examples, how-to guides, reference docs, and conceptual guides.
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
| The modules are (from least to most complex):
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
- `Models <./modules/models.html> `_ : Supported model types and integrations.
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
- `Prompts <./modules/prompts.html> `_ : Prompt management, optimization, and serialization.
2023-02-06 08:26:20 +00:00
2023-05-15 22:20:37 +00:00
- `Memory <./modules/memory.html> `_ : Memory refers to state that is persisted between calls of a chain/agent.
2022-12-21 03:24:08 +00:00
2023-05-15 22:20:37 +00:00
- `Indexes <./modules/indexes.html> `_ : Language models become much more powerful when combined with application-specific data - this module contains interfaces and integrations for loading, querying and updating external data.
2022-12-21 03:24:08 +00:00
2023-05-15 22:20:37 +00:00
- `Chains <./modules/chains.html> `_ : Chains are structured sequences of calls (to an LLM or to a different utility).
2022-12-21 03:24:08 +00:00
2023-05-15 22:20:37 +00:00
- `Agents <./modules/agents.html> `_ : An agent is a Chain in which an LLM, given a high-level directive and a set of tools, repeatedly decides an action, executes the action and observes the outcome until the high-level directive is complete.
2023-04-30 18:14:09 +00:00
2023-05-15 22:20:37 +00:00
- `Callbacks <./modules/callbacks/getting_started.html> `_ : Callbacks let you log and stream the intermediate steps of any chain, making it easy to observe, debug, and evaluate the internals of an application.
2022-12-21 03:24:08 +00:00
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
.. toctree ::
:maxdepth: 1
:caption: Modules
:name: modules
:hidden:
2022-12-21 03:24:08 +00:00
2023-03-27 02:49:46 +00:00
./modules/models.rst
./modules/prompts.rst
2023-02-20 07:14:50 +00:00
./modules/indexes.md
2023-03-27 02:49:46 +00:00
./modules/memory.md
2023-01-05 05:39:50 +00:00
./modules/chains.md
./modules/agents.md
2023-04-30 18:14:09 +00:00
./modules/callbacks/getting_started.ipynb
2022-11-22 14:16:26 +00:00
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
Use Cases
----------
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
| Best practices and built-in implementations for common LangChain use cases:
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
- `Autonomous Agents <./use_cases/autonomous_agents.html> `_ : Autonomous agents are long-running agents that take many steps in an attempt to accomplish an objective. Examples include AutoGPT and BabyAGI.
2023-04-19 04:54:30 +00:00
2023-05-15 22:20:37 +00:00
- `Agent Simulations <./use_cases/agent_simulations.html> `_ : Putting agents in a sandbox and observing how they interact with each other and react to events can be an effective way to evaluate their long-range reasoning and planning abilities.
2023-04-19 04:54:30 +00:00
2023-05-15 22:20:37 +00:00
- `Personal Assistants <./use_cases/personal_assistants.html> `_ : One of the primary LangChain use cases. Personal assistants need to take actions, remember interactions, and have knowledge about your data.
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
- `Question Answering <./use_cases/question_answering.html> `_ : Another common LangChain use case. Answering questions over specific documents, only utilizing the information in those documents to construct an answer.
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
- `Chatbots <./use_cases/chatbots.html> `_ : Language models love to chat, making this a very natural use of them.
2022-11-22 14:16:26 +00:00
2023-05-15 22:20:37 +00:00
- `Querying Tabular Data <./use_cases/tabular.html> `_ : Recommended reading if you want to use language models to query structured data (CSVs, SQL, dataframes, etc).
2023-03-18 18:12:18 +00:00
2023-05-15 22:20:37 +00:00
- `Code Understanding <./use_cases/code.html> `_ : Recommended reading if you want to use language models to analyze code.
2023-04-09 19:29:47 +00:00
2023-05-15 22:20:37 +00:00
- `Interacting with APIs <./use_cases/apis.html> `_ : Enabling language models to interact with APIs is extremely powerful. It gives them access to up-to-date information and allows them to take actions.
2022-11-22 14:16:26 +00:00
2023-03-27 02:49:46 +00:00
- `Extraction <./use_cases/extraction.html> `_ : Extract structured information from text.
2022-11-26 13:58:54 +00:00
2023-05-15 22:20:37 +00:00
- `Summarization <./use_cases/summarization.html> `_ : Compressing longer documents. A type of Data-Augmented Generation.
2022-11-26 13:58:54 +00:00
2023-05-15 22:20:37 +00:00
- `Evaluation <./use_cases/evaluation.html> `_ : Generative models are hard to evaluate with traditional metrics. One promising approach is to use language models themselves to do the evaluation.
2022-11-26 13:58:54 +00:00
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
.. toctree ::
:maxdepth: 1
:caption: Use Cases
:name: use_cases
:hidden:
2022-11-22 14:16:26 +00:00
2023-04-19 04:54:30 +00:00
./use_cases/autonomous_agents.md
./use_cases/agent_simulations.md
2023-05-15 22:20:37 +00:00
./use_cases/personal_assistants.md
2023-01-05 05:39:50 +00:00
./use_cases/question_answering.md
2023-03-27 02:49:46 +00:00
./use_cases/chatbots.md
2023-03-18 18:12:18 +00:00
./use_cases/tabular.rst
2023-04-09 20:10:46 +00:00
./use_cases/code.md
2023-03-27 03:50:36 +00:00
./use_cases/apis.md
2023-03-27 02:49:46 +00:00
./use_cases/summarization.md
2023-03-22 22:00:44 +00:00
./use_cases/extraction.md
2023-01-05 05:39:50 +00:00
./use_cases/evaluation.rst
2022-12-26 14:16:37 +00:00
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
Reference Docs
---------------
2022-12-26 14:16:37 +00:00
2023-05-15 22:20:37 +00:00
| Full documentation on all methods, classes, installation methods, and integration setups for LangChain.
2022-11-14 04:13:23 +00:00
2023-01-05 05:39:50 +00:00
- `Reference Documentation <./reference.html> `_
2022-11-14 04:13:23 +00:00
.. toctree ::
:maxdepth: 1
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
:caption: Reference
:name: reference
:hidden:
2022-11-14 04:13:23 +00:00
2023-01-05 05:39:50 +00:00
./reference/installation.md
./reference.rst
2022-11-14 04:13:23 +00:00
2023-05-18 16:29:57 +00:00
Ecosystem
------------
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
2023-05-18 16:29:57 +00:00
| Guides for how other products can be used with LangChain.
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
2023-05-18 16:29:57 +00:00
- `Integrations <./integrations.html> `_
2022-11-14 04:13:23 +00:00
2022-10-24 21:51:15 +00:00
.. toctree ::
2023-05-18 16:29:57 +00:00
:maxdepth: 2
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
:glob:
:caption: Ecosystem
:name: ecosystem
:hidden:
2022-10-24 21:51:15 +00:00
2023-05-18 16:29:57 +00:00
./integrations.rst
2022-11-14 04:13:23 +00:00
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
Additional Resources
---------------------
2022-11-14 04:13:23 +00:00
2023-05-15 22:20:37 +00:00
| Additional resources we think may be useful as you develop your application!
2022-11-14 04:13:23 +00:00
2023-01-24 07:06:23 +00:00
- `LangChainHub <https://github.com/hwchase17/langchain-hub> `_ : The LangChainHub is a place to share and explore other prompts, chains, and agents.
2023-05-18 03:59:41 +00:00
- `Gallery <https://github.com/kyrolabs/awesome-langchain> `_ : A collection of great projects that use Langchain, compiled by the folks at `Kyrolabs <https://kyrolabs.com> `_ . Useful for finding inspiration and example implementations.
2022-11-14 04:13:23 +00:00
2023-05-16 00:12:47 +00:00
- `Deployments <./additional_resources/deployments.html> `_ : A collection of instructions, code snippets, and template repositories for deploying LangChain apps.
2023-01-10 15:41:16 +00:00
2023-05-16 00:12:47 +00:00
- `Tracing <./additional_resources/tracing.html> `_ : A guide on using tracing in LangChain to visualize the execution of chains and agents.
2023-01-30 04:24:22 +00:00
2023-05-16 00:12:47 +00:00
- `Model Laboratory <./additional_resources/model_laboratory.html> `_ : Experimenting with different prompts, models, and chains is a big part of developing the best possible application. The ModelLaboratory makes it easy to do so.
2023-03-27 02:49:46 +00:00
- `Discord <https://discord.gg/6adMQxSpJS> `_ : Join us on our Discord to discuss all things LangChain!
2023-05-16 00:12:47 +00:00
- `YouTube <./additional_resources/youtube.html> `_ : A collection of the LangChain tutorials and videos.
2023-04-19 22:16:29 +00:00
2023-01-29 06:53:04 +00:00
- `Production Support <https://forms.gle/57d8AmXBYp8PP8tZA> `_ : As you move your LangChains into production, we'd love to offer more comprehensive support. Please fill out this form and we'll set up a dedicated support Slack channel.
2022-11-14 04:13:23 +00:00
2023-01-30 04:24:22 +00:00
2022-11-04 15:02:21 +00:00
.. toctree ::
:maxdepth: 1
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
:caption: Additional Resources
2022-11-14 04:13:23 +00:00
:name: resources
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
:hidden:
2022-11-04 15:02:21 +00:00
2023-01-24 07:06:23 +00:00
LangChainHub <https://github.com/hwchase17/langchain-hub>
2023-05-18 06:36:45 +00:00
Gallery <https://github.com/kyrolabs/awesome-langchain>
2023-05-16 00:12:47 +00:00
./additional_resources/deployments.md
./additional_resources/tracing.md
./additional_resources/model_laboratory.ipynb
2023-01-29 06:53:04 +00:00
Discord <https://discord.gg/6adMQxSpJS>
2023-05-16 00:12:47 +00:00
./additional_resources/youtube.md
2023-01-29 06:53:04 +00:00
Production Support <https://forms.gle/57d8AmXBYp8PP8tZA>