Generative AIby Dhruv Narang

1. What Is LangChain?

Definition

LangChain is an open-source framework for building applications powered by large language models. It gives you ready-made building blocks to connect an LLM with prompts, memory, your data and tools.

Created by Harrison Chase in 2022. Available in Python and JavaScript.


2. What LangChain Gives You

You could write all of this code yourself. But LangChain already gives you ready-made, well-managed code that its developers write and maintain. It is open source, easy to use, and the best way to build AI applications. That is why we prefer it.

The LangChain toolbox
ModelsCall any LLM with the same codeDifferent code for every company?
PromptsReusable prompts with blanksSame prompt typed again and again?
Output ParsersClean, structured data instead of paragraphsAnswers come as messy text?
MemoryKeep the conversation historyIt forgets the chat?
your appLLM+ building blocks
ChainsConnect steps one after anotherMany steps to join?
Document LoadersRead PDFs, websites and filesIt cannot read your PDFs?
Vector StoresSearch your data by meaningToo much data to search?
ToolsLet the LLM call functions and take actionsIt cannot take actions?
RunnablesThe common standard every block follows. Because of it, any block can connect to any other block.
connect with|and every block can.invoke().stream().batch()