Summarize a 500-page PDF with Kimi
A long-context workflow that chunks, maps, and reduces a huge document into a structured brief with Kimi.
#research #long-context
What vetted this — trust report
Goal
Compress a very large document into a structured, citable brief using Kimi's long context — without losing the details that matter.
Why chunk at all, if the context is long?
Fair question, and the answer is the reason this workflow exists. A large context window means the model can hold the document; it does not mean it will attend to all of it evenly. Recall degrades in the middle of very long inputs, and degrades further when you ask one question that requires synthesizing across the whole thing.
Map-reduce fixes this by making every part of the document the subject of at least one focused pass. You trade one cheap call for many, and get coverage you can verify.
Steps
1. Prepare
Extract the text and split it into labelled sections — chapter, heading, or 5–10 page blocks. Keep a page number on every chunk. This is not bookkeeping; it's what makes the final brief checkable, and an unciteable summary of a 500-page document is worth very little because nobody can act on it without trusting you completely.
Chunk by meaning, not by a fixed byte count that splits a sentence — or worse, a table — in half. Where a section is genuinely long, overlap consecutive chunks by a paragraph so a thought spanning the boundary survives.
Note what your extractor lost. Tables, figure captions, and footnotes are the usual casualties, and they're often where the numbers live.
2. Map
Summarize each section on its own:
Summarize this section in 3–5 bullets of substance. Include any figures, definitions, thresholds, dates, or claims a reader would need. Tag every bullet with its source pages. If the section contains a table, preserve its numbers. Do not editorialize and do not add context from outside this section.
Keep the map summaries. They are the audit trail, and you'll want them when a claim in the final brief looks wrong.
3. Reduce
Feed the section summaries back and ask for one merged brief:
Here are section summaries with page cites. Produce one brief for a reader who will not see the original. Group by theme, not by chapter. Preserve page citations on every claim. List anything the sections disagree on. Do not add facts that aren't in the inputs.
Structure the output as:
- a 5-sentence executive summary
- key findings grouped by theme
- a table of the numbers that matter, with page cites
- contradictions and open questions the document leaves unresolved
Grouping by theme rather than chapter is the whole value of the reduce step. A chapter-ordered summary is just a shorter table of contents; the insight is in what chapter 3 and chapter 11 say about the same thing.
4. Spot-check
Pick three claims at random — one from the exec summary, one number, one from a theme — and verify them against the cited pages yourself.
If any is wrong, don't patch the brief. The map step was too lossy: shrink the chunk size for that region and redo it. A patched brief has the same defect everywhere you didn't check.
5. Coverage check
Ask: "Which sections contributed nothing to the final brief?" Sometimes the answer is legitimate (boilerplate, appendices). Sometimes it means a section was summarized into blandness and its content silently vanished.
Guardrails
- Citations end-to-end. A summary you can't trace back is hard to trust and impossible to defend.
- Numbers are copied, never restated. Ask explicitly for verbatim figures; paraphrased numbers drift.
- Preserve disagreement. Documents contradict themselves — across authors, across revisions. Smoothing that over is the single most misleading thing a summarizer can do.
- Note what the document does not say. For contracts, filings and policies the absence is frequently the finding.
Troubleshooting
- The brief is generic. Your map bullets were too abstract. Force specificity: "every bullet must contain a number, a name, or a date."
- A claim can't be found on its cited page. The citation was generated rather than carried. Re-run that section with the page number in the chunk header text itself, so it's copied rather than inferred.
- It contradicts itself. Two sections disagreed and the reduce step picked one. That's a finding — put it under contradictions.
- Tables came out wrong. Extract tables separately as CSV and hand them over as data, not prose. PDF table extraction is a known-hard problem and no prompting fixes a mangled input.
Cost and time
A 500-page document is roughly 50–100 map calls plus one large reduce. Budget for it, and run the maps in parallel if your tooling allows. For a document under about 50 pages, skip all of this and ask directly — the machinery costs more than it returns.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.