Skip to main content

Components

LangChain provides standard, extendable interfaces and external integrations for the following main components:

Model I/O

Formatting and managing language model input and output

Prompts

Formatting for LLM inputs that guide generation

Chat models

Interfaces for language models that use chat messages as inputs and returns chat messages as outputs (as opposed to using plain text).

LLMs

Interfaces for language models that use plain text as input and output

Retrieval

Interface with application-specific data for e.g. RAG

Document loaders

Load data from a source as Documents for later processing

Text splitters

Transform source documents to better suit your application

Embedding models

Create vector representations of a piece of text, allowing for natural language search

Vectorstores

Interfaces for specialized databases that can search over unstructured data with natural language

Retrievers

More generic interfaces that return documents given an unstructured query

Composition

Higher-level components that combine other arbitrary systems and/or or LangChain primitives together

Tools

Interfaces that allow an LLM to interact with external systems

Agents

Constructs that choose which tools to use given high-level directives

Chains

Building block-style compositions of other runnables

Additional

Memory

Persist application state between runs of a chain

Callbacks

Log and stream intermediate steps of any chain


Help us out by providing feedback on this documentation page: