AI Gateway

Langchain

LangChain is a framework for developing applications powered by language models. It enables applications that:

  • Are context-aware: connect a language model to sources of context (prompt instructions, few shot examples, content to ground its response in, etc.)
  • Reason: rely on a language model to reason (about how to answer based on provided context, what actions to take, etc.)

The main value props of LangChain are:

  1. Components: abstractions for working with language models, along with a collection of implementations for each abstraction. Components are modular and easy-to-use, whether you are using the rest of the LangChain framework or not
  2. Off-the-shelf chains: a structured assembly of components for accomplishing specific higher-level tasks

Off-the-shelf chains make it easy to get started. For complex applications, components make it easy to customize existing chains and build new ones.

Modules

LangChain provides standard, extendable interfaces and external integrations for the following modules, listed from least to most complex:

  1. Model I/O
    Interface with language models
  2. Retrieval
    Interface with application-specific data
  3. Chains
    Construct sequences of calls
  4. Agents
    Let chains choose which tools to use given high-level directives
  5. Memory
    Persist application state between runs of a chain
  6. Callbacks
    Log and stream intermediate steps of any chain
🦜️🔗 Langchain
About the author

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to AI Gateway.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.