Skip to main content

[ ![🦜️🔗 Langchain](/img/brand/wordmark.png) ![🦜️🔗
Langchain](/img/brand/wordmark-dark.png) ](/) [ Docs
](/docs/get_started/introduction) [ Use cases ](/docs/use_cases) [
Integrations ](/docs/integrations/platforms/) [ Guides
](/docs/guides/debugging) [ API  ](https://api.python.langchain.com)

More

  * [ People ](/docs/people/)
  * [ Versioning ](/docs/packages)
  * [ Changelog ](/docs/changelog)
  * [ Contributing ](/docs/contributing)
  * [ Templates ](/docs/templates/)
  * [ Cookbooks  ](https://github.com/langchain-ai/langchain/blob/master/cookbook/README.md)
  * [ Tutorials ](/docs/additional_resources/tutorials)
  * [ YouTube ](/docs/additional_resources/youtube)

🦜️🔗

  * [ LangSmith  ](https://smith.langchain.com)
  * [ LangSmith Docs  ](https://docs.smith.langchain.com/)
  * [ LangServe GitHub  ](https://github.com/langchain-ai/langserve)
  * [ Templates GitHub  ](https://github.com/langchain-ai/langchain/tree/master/templates)
  * [ Templates Hub  ](https://templates.langchain.com)
  * [ LangChain Hub  ](https://smith.langchain.com/hub)
  * [ JS/TS Docs  ](https://js.langchain.com)

[ 💬  ](https://chat.langchain.com) [ ](https://github.com/langchain-
ai/langchain)

Search

  * [ Get started ](/docs/get_started)

    * [ Introduction ](/docs/get_started/introduction)
    * [ Installation ](/docs/get_started/installation)
    * [ Quickstart ](/docs/get_started/quickstart)
    * [ Security ](/docs/security)
  * [ LangChain Expression Language ](/docs/expression_language/)

    * [ Get started ](/docs/expression_language/get_started)
    * [ Why use LCEL ](/docs/expression_language/why)
    * [ Interface ](/docs/expression_language/interface)
    * [ Streaming ](/docs/expression_language/streaming)
    * [ How to ](/docs/expression_language/how_to/)

    * [ Cookbook ](/docs/expression_language/cookbook/)

      * [ Prompt + LLM ](/docs/expression_language/cookbook/prompt_llm_parser)
      * [ RAG ](/docs/expression_language/cookbook/retrieval)
      * [ Multiple chains ](/docs/expression_language/cookbook/multiple_chains)
      * [ Querying a SQL DB ](/docs/expression_language/cookbook/sql_db)
      * [ Agents ](/docs/expression_language/cookbook/agent)
      * [ Code writing ](/docs/expression_language/cookbook/code_writing)
      * [ Routing by semantic similarity ](/docs/expression_language/cookbook/embedding_router)
      * [ Adding memory ](/docs/expression_language/cookbook/memory)
      * [ Adding moderation ](/docs/expression_language/cookbook/moderation)
      * [ Managing prompt size ](/docs/expression_language/cookbook/prompt_size)
      * [ Using tools ](/docs/expression_language/cookbook/tools)
    * [ LangChain Expression Language (LCEL) ](/docs/expression_language/)
  * [ Modules ](/docs/modules/)

    * [ Model I/O ](/docs/modules/model_io/)

    * [ Retrieval ](/docs/modules/data_connection/)

    * [ Agents ](/docs/modules/agents/)

    * [ Chains ](/docs/modules/chains)
    * [ More ](/docs/modules/memory/)

  * [ LangServe ](/docs/langserve)
  * [ LangSmith ](/docs/langsmith/)

  * [ LangGraph ](/docs/langgraph)

  * [ ](/)
  * [ LangChain Expression Language  ](/docs/expression_language/)
  * Cookbook 

#  Cookbook

Example code for accomplishing common tasks with the LangChain Expression
Language (LCEL). These examples show how to compose different Runnable (the
core LCEL interface) components to achieve various tasks. If you're just
getting acquainted with LCEL, the [ Prompt + LLM
](/docs/expression_language/cookbook/prompt_llm_parser) page is a good place
to start.

## [ 📄️  Prompt + LLM  The most common and valuable composition is taking:
](/docs/expression_language/cookbook/prompt_llm_parser) ## [ 📄️  RAG  Let’s
look at adding in a retrieval step to a prompt and LLM, which adds
](/docs/expression_language/cookbook/retrieval) ## [ 📄️  Multiple chains
Runnables can easily be used to string together multiple Chains
](/docs/expression_language/cookbook/multiple_chains) ## [ 📄