Runnables and LCEL
Discover how the LangChain framework allows us to execute a sequence of calls to LLMs.
PositiveProblem-solving typically involves a series of steps. When using LLMs, some applications have relatively complex requirements and a sequence of calls for performing an operation. Here’s when runnables come into play.
This functionality was previously fulfilled by LLMChain
class, however, that was deprecated in version 0.1.17. We now use runnables instead.
What is a runnable?
In Langchain, runnables are a powerful abstraction representing any callable unit of work. They're used to encapsulate and manage different kinds of tasks, including LLM calls, database queries, or calls to external APIs. This allows us to chain together diverse operations in a consistent and manageable way, making it easy to construct complex workflows within Langchain applications.
Get hands-on with 1300+ tech skills courses.