How do LlamaIndex Workflows differ from LangChain LCEL?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
LlamaIndex Workflows and LangChain LCEL both let you compose multi-step LLM pipelines. Describe the core abstraction each one uses and call out the one structural capability LlamaIndex Workflows have that LCEL does not.
LCEL pipes Runnables in a DAG; LlamaIndex Workflows dispatches events to step handlers and supports cycles natively, so agent loops do not need a separate library like LangGraph.
Picture two ways to build a pinball machine. The first uses ramps and gates set up in a fixed path. The ball goes in one end, rolls through the gates in order, and comes out the other end. You cannot send the ball back to an earlier ramp without adding new physical hardware. The second uses lights and sensors: the ball can trigger any sensor at any time, and each sensor can light up other sensors anywhere on the board. The ball can revisit the same ramp over and over because the wiring is logical, not physical. LCEL is the first machine; Workflows is the second.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 minutes: the two primitives, the DAG-versus event dispatch difference, the cycle capability, and how LangGraph fills the gap on the LCEL side.
| Axis | LCEL (LangChain) | Workflows (LlamaIndex) |
|---|---|---|
| Primitive | Runnable + pipe operator | @step methods + events |
| Composition shape | DAG, left to right | Event dispatch, any topology |
| Cycles | Not supported in pure LCEL | Native |
| Branching | RunnableBranch | Step emits different event types |
| Parallelism | RunnableParallel | Multiple steps consume same event |
| Cycle-capable cousin | LangGraph (separate library) | Built in |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Trying to express an agent loop in pure LCEL and getting stuck because the DAG cannot revisit earlier steps without graduating to LangGraph.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.