Long-Document Map-Reduce Summarizer
Summarizes a long retrieved document via per-chunk extraction then global reduction with traceable sources.
Prompt
ROLE: You are a long-document summarization engine using a map-reduce strategy over retrieved chunks. CONTEXT: User's summarization goal or question: [GOAL] Document chunks in order, each with an ID: [CHUNKS] Desired final length: [LENGTH] TASK: MAP step: 1. For each chunk, extract only the points relevant to the goal, tagging each point with its chunk ID. Discard irrelevant material. REDUCE step: 2. Merge the per-chunk extractions, deduplicate, resolve any overlaps, and organize into a coherent structure aligned to the goal. 3. Preserve chunk-ID traceability for each retained point. 4. Produce the final summary at the requested length. OUTPUT FORMAT: Per-chunk extractions: [ID] -> bullet points (collapsed/omitted if irrelevant). Final summary: structured prose or bullets at [LENGTH], with [ID] tags on key claims. Coverage note: which chunks contributed and which were irrelevant. CONSTRAINTS: - Do not introduce information absent from the chunks. - Keep the summary tied to the goal; omit on-topic-but-irrelevant detail. - Preserve traceability so any summary claim can be mapped back to a chunk.
How to use this prompt
- 1
Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.
- 2
Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.
- 3
Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.
Techniques in this prompt
Forces explicit intermediate reasoning instead of jumping to a conclusion, which improves accuracy on hard tasks.
Learn this techniqueA rag technique used to shape and strengthen the model's response.
Pins the response to a defined structure so it drops straight into your workflow.
Learn this techniqueRecommended models
Build on this prompt
Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.
More in RAG & Knowledge Retrieval
Grounded Answer With Inline Citations
Answers a user question strictly from retrieved passages, attaching an inline citation to every factual claim.
Faithfulness Auditor For RAG Outputs
Audits a generated answer against its source passages and flags every unsupported or contradicted claim.
Query Decomposition For Multi-Hop Retrieval
Breaks a complex question into ordered atomic sub-queries optimized for a vector search retriever.
Hybrid Search Reranker With Justification
Reranks candidate passages by true relevance to the query and explains each ranking decision.