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