Chain-of-Density Summarization: Packing More into Fewer Words
Why Standard Summarization Produces Low-Density Output
When you ask a language model to "summarize this document," the model produces text that reads naturally but wastes words on filler phrases, hedging language, and broad generalizations. A typical single-pass summary of a 3,000-word article about Tesla's Q2 2026 earnings might read: "Tesla reported strong quarterly results, with revenue increasing significantly. The company saw growth in its energy division and continued to expand its manufacturing capacity." This is 30 words that contain almost no retrievable information. No numbers, no comparisons, no specific product names, no timeframes.
The problem is that LLMs, trained on human writing, default to a conversational register that prizes readability over information density. Humans writing summaries naturally pad sentences with transitional phrases ("it is worth noting that"), hedges ("approximately," "somewhat"), and abstract descriptors ("significant growth," "notable improvement"). This register works for casual reading but wastes token budget when summaries serve as compressed knowledge stores for AI systems.
Chain-of-density solves this by forcing the model through iterative compression. Each pass must add missing entities while keeping the length constant, which means the model must replace filler with facts. After 3-5 iterations, the summary converges on a version where every word carries information.
How Chain-of-Density Works
The technique follows a simple loop. The model generates an initial summary at a target word count (typically 80-120 words). Then, in each subsequent iteration, the model identifies 1-3 important entities, facts, or relationships from the source document that are missing from the current summary and rewrites the summary to include them without increasing the word count. The process repeats for a fixed number of iterations (usually 5) or until the model reports that no significant information remains missing.
The core prompt structure:
"Generate an initial summary of the following article in exactly 100 words. Then, repeat the following process 4 more times: (1) Identify 1-3 informative entities or key facts from the article that are missing from the current summary. (2) Rewrite the summary to include these missing elements, keeping the total at exactly 100 words. You must replace less informative or filler content to make room for the new entities. Output all 5 versions."
What happens across iterations:
Iteration 1 produces a broad, readable overview similar to a standard summary. Iteration 2 typically adds the most important missing numbers and proper nouns by replacing phrases like "the company" with the actual company name and "significant growth" with "47% year-over-year growth." Iteration 3 adds secondary entities and relationships, often replacing generic verbs with specific ones ("announced a partnership with NVIDIA" replaces "expanded its technology relationships"). Iterations 4 and 5 push toward maximum density, sometimes at the expense of readability, adding dates, specific dollar amounts, competitor comparisons, and technical details that were initially omitted.
The density-readability tradeoff: The Adams et al. research found that human evaluators preferred summaries from iteration 3 or 4, not iteration 5. The final iteration often becomes too dense, reading like a telegram rather than prose. For user-facing summaries, use iteration 3-4 output. For machine-consumed summaries (feeding into memory systems, search indexes, or downstream LLM prompts), iteration 5 is optimal because readability does not matter, only information completeness.
Practical Prompt Template
The following prompt template works reliably across GPT-4, Claude, and Gemini models. Adjust the word count target based on your source document length and use case.
"Article: [SOURCE TEXT]
You will generate increasingly dense summaries of the above article.
Step 1: Write a 100-word summary covering the main topic and key point.
Step 2: Identify 1-3 informative entities (people, organizations, numbers, dates, technical terms) from the article that are MISSING from your Step 1 summary. Rewrite the summary in exactly 100 words, incorporating these entities by removing less informative content.
Step 3: Repeat, finding 1-3 more missing entities and rewriting at 100 words.
Step 4: Repeat once more.
Step 5: Final pass. This version should be maximally informative while remaining coherent.
For each step, output: Missing Entities: [list], Summary: [text]"
Requesting the missing entities list before each rewrite serves two purposes: it forces the model to analyze the gap between the current summary and the source before writing, and it gives you a debugging signal. If the model lists trivial entities ("also," "however") rather than substantive ones, the summary has likely reached saturation and further iterations will not improve quality.
When to Use Chain-of-Density
Use CoD when token budget is limited and information completeness matters. Memory systems that store summaries alongside vector embeddings benefit directly because denser summaries produce better retrieval matches. A summary containing the entity "NVIDIA H100" will match queries about H100 GPUs; a summary that says "advanced hardware" will not. Every named entity in the summary is a potential retrieval anchor.
Use CoD for knowledge base construction. When building structured knowledge from unstructured documents, dense summaries capture more extractable facts per document. Feeding CoD summaries into entity extraction pipelines yields 40-60% more entities than feeding standard summaries, according to benchmarks run by retrieval teams at Pinecone and Weaviate.
Skip CoD for user-facing summaries where readability is the primary goal. Executive summaries, email digests, and meeting recaps should prioritize natural reading flow. A standard single-pass summary with explicit instructions about tone and structure serves these use cases better. CoD summaries at high iterations can feel choppy and exhausting to read.
Skip CoD for very short source documents. Documents under 500 words are already information-dense. Applying CoD to a short source produces summaries that are near-paraphrases of the original, adding no value over a standard summary. CoD delivers the most improvement on documents of 2,000-10,000 words where the original contains significant redundancy, background context, and narrative padding that can be stripped.
Integration with Memory Systems
Chain-of-density is particularly valuable for AI memory pipelines where summaries serve as the compressed representation of past interactions or documents. In Adaptive Recall and similar memory frameworks, each memory record stores a summary alongside metadata and embedding vectors. The summary quality directly determines retrieval precision: a summary that mentions specific technologies, people, decisions, and numbers will surface in more relevant queries than a vague one.
Memory consolidation with CoD: When consolidating multiple conversation turns into a single memory, apply CoD to the concatenated turns. This forces the model to extract every actionable detail, preference expressed, decision made, and name mentioned across the conversation. Standard summarization of conversations typically retains the final decision but drops the reasoning, alternatives discussed, and people involved. CoD retains all of these.
Embedding alignment: Dense summaries produce embedding vectors that cluster more precisely in vector space. A summary containing "migrated from PostgreSQL to CockroachDB for multi-region latency" creates an embedding that sits near queries about database migration, PostgreSQL alternatives, CockroachDB, and multi-region architecture. The same event summarized as "they changed their database setup" produces an embedding that is too generic to match any of those specific queries reliably.
Cost and Performance Considerations
Chain-of-density uses 4-6x more output tokens than a standard summary because it generates 5 versions rather than 1. Input tokens are the same (the source document). For a 5,000-token source document summarized to 100 words (roughly 130 tokens), a standard summary costs approximately 5,000 input + 130 output tokens. CoD costs 5,000 input + 650 output tokens (5 iterations of 130 tokens each). With Claude Haiku pricing, this difference is negligible: $0.0013 for standard vs $0.0016 for CoD. With GPT-4o, the cost difference is larger ($0.012 vs $0.018) but still under 2 cents per summary.
The more meaningful cost consideration is latency. Generating 5 iterations takes 3-5x longer than a single summary, typically 8-15 seconds versus 2-4 seconds. For synchronous user-facing applications, this latency may be unacceptable. For batch processing (nightly memory consolidation, document indexing), the latency increase is irrelevant.
Optimization: parallel CoD. For batch workloads, you can split a large document into sections, apply CoD to each section independently in parallel, then combine the dense section summaries in a final reduce step. This gives you both the information density of CoD and the parallelization speed of map-reduce.
Measuring Density Improvement
Quantify CoD effectiveness by measuring entities per word in each iteration. Parse each summary version with a named entity recognizer (spaCy, GLiNER, or an LLM-based extractor) and divide entity count by word count. A well-functioning CoD pipeline shows entity density increasing from 0.05-0.08 entities/word in iteration 1 to 0.15-0.25 entities/word in iteration 5. If density plateaus before iteration 4, your source document has been fully mined and fewer iterations are sufficient.
Separately measure faithfulness: every entity mentioned in the summary must appear in the source document. CoD occasionally causes hallucinated entities in later iterations as the model strains to find more information to add. Run a simple verification check: extract all proper nouns and numbers from the summary and verify each appears in the source. Flag summaries where any entity fails verification for human review or regeneration.
Chain-of-density summarization rewrites a fixed-length summary through 5 iterations, each adding missing entities by replacing filler. The result is 2-3x more information-dense than a single-pass summary, producing better retrieval matches in memory systems and more complete knowledge extraction. Use iteration 3-4 for human-readable output and iteration 5 for machine-consumed summaries. The technique costs 4-6x more output tokens but the absolute cost difference is negligible for most workloads.