What is the map-reduce pattern in LLM prompting?
Prompt Engineering Patterns: Prompt Chaining, Decomposition, and Multi-Step Workflows
Audio flashcard · 0:20Nortren·
What is the map-reduce pattern in LLM prompting?
0:20
Map-reduce in LLM prompting splits a large input into chunks, processes each chunk independently with an LLM call (map), then combines the results into a final answer with another LLM call (reduce). It is the standard pattern for summarizing or analyzing documents that exceed the context window. Frameworks like LangChain and LlamaIndex provide built-in map-reduce chains.
python.langchain.com