Skip to main content

How-to guides

Here you'll find answers to "How do I...?" types of questions. These guides are goal-oriented and concrete; they're meant to help you complete a specific task. For conceptual explanations see the Conceptual guide. For end-to-end walkthroughs see Tutorials. For comprehensive descriptions of every class and function see the API Reference.

Installation

Key features

This highlights functionality that is core to using LangChain.

LangChain Expression Language is a way to create arbitrary custom chains. It is built on the Runnable protocol.

LCEL cheatsheet: For a quick overview of how to use the main LCEL primitives.

Components

These are the core building blocks you can use when building applications.

Prompt templates

Prompt Templates are responsible for formatting user input into a format that can be passed to a language model.

Chat models

Chat Models are newer forms of language models that take messages in and output a message.

LLMs

What LangChain calls LLMs are older forms of language models that take a string in and output a string.

Document loaders

Document Loaders are responsible for loading documents from a variety of sources.

Text splitters

Text Splitters take a document and split into chunks that can be used for retrieval.

Vector stores

Vector stores are databases that can efficiently store and retrieve embeddings.

Retrievers

Retrievers are responsible for taking a query and returning relevant documents.

Agents

Function Tool calling

Tools

Embedding Models

Output Parsers