Chain-of-Density Summarization Prompt

Build Adams et al. chain-of-density prompts for richer summaries

Implements the chain-of-density technique — iteratively rewriting a summary to be denser by adding missing entities without increasing word count — to produce high-information summaries, with configurable length and iteration count. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is chain of density?

Chain of Density (CoD), from Adams et al. (2023), is a prompting technique that generates several summaries of identical length, each iteration adding 1-3 previously missing entities while compressing existing wording. The result is a progressively denser, more informative summary at a fixed length.

Chain-of-density summarization prompt

A normal summary often skips the specific entities — names, numbers, places — that carry the real information. Chain of Density (CoD), introduced by Adams et al. in 2023, fixes that by generating several summaries of the same length, each one adding missing entities while compressing existing wording. The result is a summary that packs far more information into the same number of words. This builder generates a correct CoD prompt with your chosen length and iteration count.

How it works

You paste the source text, set a fixed word length, and choose how many density passes to run. The generated prompt instructs the model to repeat two steps: identify 1–3 informative entities missing from the previous summary, then rewrite a new summary of identical length that includes all prior entities plus the new ones. Because the length is fixed, the model must fuse and compress to make room, which is what drives densification. Output is a JSON array, one object per iteration, with the densest summary last.

What densification looks like in practice

To make it concrete, consider a single pass on a news article. The first summary might read: “The government announced new spending measures to address rising costs for households.” After one densification step, the same word-count might read: “Chancellor Hunt’s Autumn Statement included a £10bn support package targeting energy and food costs for low-income households, offset by a freeze on income-tax thresholds.” The second version contains three additional specific entities (person name, policy name, cost figure, target group, mechanism) in the same number of words — generic filler was compressed to make room.

When to use each iteration

IterationCharacteristicsBest for
First (sparse)Reads naturally, low densityInitial oriented read, accessibility
MiddleGood balance of specificity and flowGeneral audience summaries
Last (densest)High information per word, terserAnalyst briefings, knowledge bases, RAG context

The original Adams et al. paper found that readers often preferred intermediate iterations for readability, while the final iteration was preferred when the goal was information density for downstream processing — such as feeding into retrieval-augmented generation pipelines.

Tips and notes

  • Take the last element when density is the goal; earlier ones are intermediate steps you can use for quality comparison.
  • Five iterations is the default and the paper’s recommendation — enough to densify without degrading into a list of fragments.
  • Fixed length is the trick. Do not let the model grow the summary; the constraint is what raises information density per word rather than just adding more words.
  • Watch readability. If the densest version reads like a fact dump rather than a sentence, drop back to an earlier iteration or increase the target word count slightly.