Inferensys

Glossary

Chain-of-Density

An iterative prompting technique for generating increasingly dense and entity-rich summaries without increasing their overall length.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
Iterative Summarization Prompting

What is Chain-of-Density?

A structured prompting technique for generating increasingly information-dense summaries without increasing length.

Chain-of-Density (CoD) is an iterative prompting technique that instructs a large language model to repeatedly revise a summary, adding more salient entities and details while keeping the total length fixed. Starting from an initial sparse summary, the model identifies missing entities—such as people, dates, or legal concepts—and fuses them into the existing text without adding words, producing an increasingly entity-rich and information-dense output.

The method is particularly valuable in legal text summarization, where capturing key parties, case citations, and statutory references is critical. By constraining length while demanding higher density, CoD forces the model to prioritize salient legal entities and eliminate verbose phrasing, resulting in summaries that pack more actionable intelligence per token for time-constrained attorneys and legal analysts.

ITERATIVE SUMMARIZATION

Key Features of Chain-of-Density

Chain-of-Density (CoD) is an iterative prompting technique that generates increasingly dense, entity-rich summaries without increasing overall length. Each iteration fuses and abstracts information from the previous summary, trading narrative fluency for maximum information density.

01

Iterative Density Optimization

CoD operates through a multi-turn refinement loop where a language model repeatedly revises its own summary. Starting from an initial sparse summary, each iteration identifies missing salient entities and fuses them into the existing text without adding words. The process typically runs for 5 iterations, with each step producing a progressively denser output that packs more unique entities per token while maintaining the original word budget.

02

Entity-Centric Salience Tracking

Unlike traditional summarization that prioritizes sentence importance, CoD explicitly tracks entity coverage as its optimization target. The technique identifies key named entities, technical terms, and factual anchors that are absent from the current summary and instructs the model to incorporate them. This entity-first approach is particularly valuable for legal documents where missing a specific party name, statute reference, or case citation constitutes a critical failure.

03

Fixed-Length Constraint Enforcement

A defining characteristic of CoD is its strict length invariance. The summary must remain at the original target word count throughout all iterations, forcing the model to abstract and fuse concepts rather than simply appending new information. This constraint mirrors real-world legal use cases where summaries must fit within fixed display constraints—such as a single screen in a case management system or a standardized brief format.

04

Trade-off: Density vs. Readability

Research on CoD reveals a measurable inverse relationship between information density and human readability. As entity density increases across iterations, human evaluators consistently rate summaries as less coherent and more difficult to parse. This creates a deployment design choice for legal applications: high-density summaries for expert rapid scanning versus lower-density summaries for client-facing or non-specialist audiences. The optimal stopping point depends on the end-user's domain expertise.

05

Integration with Legal RAG Pipelines

CoD summaries serve as highly efficient retrieval targets in Retrieval-Augmented Generation (RAG) architectures. Because each CoD summary packs maximum entity density into minimal tokens, it produces information-rich embeddings that improve semantic search recall for legal document collections. When a user queries for a specific case detail, the dense vector representation of a CoD summary is more likely to match than a sparse, narrative summary that omitted key entities.

06

Factual Consistency Preservation

A critical risk in iterative summarization is hallucination amplification—where a factual error introduced in one iteration compounds across subsequent refinements. CoD implementations for legal domains must incorporate factual consistency verification at each iteration step, typically using Natural Language Inference (NLI) models to check that newly fused entities are entailed by the source document. Without this guardrail, the density optimization can inadvertently produce highly confident but legally inaccurate summaries.

CHAIN-OF-DENSITY EXPLAINED

Frequently Asked Questions

Clear, technical answers to the most common questions about the Chain-of-Density prompting technique for generating highly informative, entity-rich summaries without increasing word count.

Chain-of-Density (CoD) is an iterative prompting technique that instructs a large language model to generate increasingly dense and entity-rich summaries of a source text without increasing the summary's overall length. The mechanism works by starting with an initial sparse summary and then, over multiple rounds of refinement, asking the model to identify and fuse missing salient entities into the existing text while removing redundant or less informative words. Each iteration explicitly targets the incorporation of 1-3 new key entities—such as people, organizations, dates, monetary amounts, or legal concepts—that were absent from the previous version. The result is a summary with a higher density of factual information per token, making it particularly valuable for legal document analysis where precision and completeness are paramount. The technique was introduced by researchers at Salesforce AI and MIT in 2023 and has since been adopted for tasks requiring high-fidelity information compression, including multi-document legal reasoning and contract clause extraction.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.