Parallelism runs independent operations concurrently instead of waiting for each operation to finish. In an LLM workflow, separate inputs can pass through the same chain at the same time, reducing total processing time. section 3.1.5 section 4.7
A practical pattern splits a document or query into independent units, maps one chain over those units, combines the results, and then produces a final response. The work is parallel only where the inputs do not depend on one another. section 3.1.5 section 4.7.4
A parallel LCEL workflow typically follows these steps:
- Create independent processing units, such as document chunks or generated web searches. section 3.1.5 section 4.7.4
- Apply a reusable chain with map(), launching one chain instance for each unit. section 3.1.5 section 4.7.4
- Join the returned summaries or results before running dependent post-processing. section 3.1.5 section 4.7.4
- Use the Runnable interface to invoke, stream, batch, or asynchronously execute compatible chains, while retaining logging and fallback options. section 4.7
Parallel web research
A Web Research chain generates several searches, runs the Search and Summarization chain for each search concurrently, joins the summaries, and sends the combined context to a final report chain. A query about Astorga demonstrates the resulting Markdown research report. section 4.7.4
map_reduce_chain = ( text_chunks_chain #1 | summarize_map_chain.map() #2 | summarize_reduce_chain #3 )
Shows the compact MapReduce composition: split input, map summarization across chunks, and reduce the results. section 3.1.5
Figure 4.7 Chain architectural diagram showing how parallelization is applied in the research summarization engine, highlighting the execution of separate chain instances in parallel for efficiency
Visualizes separate chain instances executing in parallel within the research summarization engine. section 4.7





































