avatarQendel AI

Summary

The article introduces the "Chain of Density" prompting technique for generating concise and entity-dense summaries using GPT-4.

Abstract

The "Chain of Density" technique, developed by researchers from MIT, Columbia University, and Salesforce AI, involves iteratively creating summaries that are increasingly informative and concise. The process begins with a non-specific, verbose summary and progresses through five rounds of identifying missing key entities and rewriting the summary to include these entities without increasing the word count. The technique emphasizes the importance of making every word count, removing uninformative phrases, and ensuring the final summary is self-contained and understandable without the original article. The article also provides practical examples of how this method can be applied to summarize content effectively.

Opinions

  • A strong summary is characterized as being brief, entity-rich, detailed, and easy to follow, while a weak summary lacks these qualities.
  • The "Chain of Density" prompting technique is presented as a superior method for creating effective summaries compared to traditional prompting methods.
  • The article suggests that the technique can be adjusted according to the user's preference for summary density.
  • Overly dense summaries may compromise coherence and should be avoided to maintain clarity.
  • The article encourages interaction with the content by asking readers to engage with the author's work on various platforms.

You Can Do Better Than Prompting “Summarize Text: {text}”

I only have 3 minutes — how do I read my 5 pages now?

Your time is precious, and a strong summary honors that!

A strong summary is brief — a weak summary is unnecessarily lengthy. A strong summary has key entities(or characters) from the source document — a weak summary misses them. A strong summary has good detail (dense) and is easy to follow — a weak summary lacks detail (or overly dense) and is hard to follow.

If you have only 3 minutes — prompt ChatGPT effectively to generate a great summary with the right amount of information, and in this article, I will show you how exactly to create dense summaries.

The technique was created by researchers from MIT, Columbia University, and Salesforce AI, and they called it 👇

“Chain of Density” Prompt

If you are already asking how it works, these are the main steps behind it 👇

Generate First summary: A summary of 4–5 sentences long, yet non-specific and verbose.

Step 1: Identify 1–3 informative entities from the article that are missing in the previous summary.

Step 2: Write a denser summary of identical length covering the entities and details from the previous summary and the new entities from Step 1.

Repeat steps 1 and 2 → 5 times.

Before we go too far, here’s the whole Chain of Density prompt 👇

“Chain of Density” Prompt

Article: {{PASTE YOUR ARTICLE HERE}}

You will generate increasingly concise, entity-dense summaries of the above Article.


Repeat the following 2 steps 5 times.

Step 1. 
Identify 13 informative Entities (";" delimited) from the Article which are missing from the previously generated summary.

Step 2. 
Write a new, denser summary of identical length that covers every entity and detail from the previous summary, plus the Missing Entities.

A Missing Entity is: 
   Relevant: to the main story. 
   Specific: descriptive yet concise (5 words or fewer). 
   Novel: not in the previous summary. 
   Faithful: present anywhere in the Article.
   Anywhere: located anywhere in the Article.

Guidelines:
    - The first summary should be long (45 sentences, 80 words) yet highly non-specific, containing little information beyond the entities marked as missing. Use overly verbose language and fillers (e.g., "this article discusses") to reach 80 words.
    - Make every word count: re-write the previous summary to improve flow and make space for additional entities.
    - Make space with fusion, compression, and removal of uninformative phrases like "the article discusses."
    - The summaries should become highly dense and concise yet self-contained. E.g., easily understood without the Article.
    - Missing entities can appear anywhere in the new summary.
    - Never drop entities from the previous summary. If space cannot be made, add fewer new entities.

Remember, use the exact same number of words for each summary.

Answer in JSON. The JSON should be a list (length 5) of dictionaries whose keys are "Missing_Entities" and "Denser_Summary."

GPT-4 Example

I summarized my previous article, Audience Persona Prompt, using the Chain of Density prompt on GPT-4. See the generated five variable density summaries below:

First dense summary:

“Missing_Entities”: “Audience Persona Pattern; tailor message; ChatGPT”,

“Denser_Summary”: “The article discussed extensively about the concept of the Audience Persona Pattern, which revolves around how messages can be effectively tailored using ChatGPT to ensure they are thoroughly resonant and pertinent to the intended audience, enhancing communicative efficiency and pertinence.”

Second dense summary:

“Missing_Entities”: “Digital Currency; 5-year-old child; painter”,

“Denser_Summary”: “The Audience Persona Pattern helps tailor messages with ChatGPT by considering specific audiences like a 5-year-old child or a painter, thereby making explanations, such as those about Digital Currency, relatable and understandable through utilizing familiar language and context.”

Third dense summary:

“Missing_Entities”: “doctor; explanatory examples; resonate with audience”,

“Denser_Summary”: “Utilizing the Audience Persona Pattern, ChatGPT ensures messages, including explanatory examples about Digital Currency, are tailored to resonate with varied audience personas like a child, painter, and doctor, by adeptly using contextually relevant and comprehensible language.”

Fourth dense summary:

“Missing_Entities”: “specific message; persona prompt pattern; Large Language Models”,

“Denser_Summary”: “ChatGPT, leveraging the Audience Persona Pattern, adeptly tailors explanatory messages, even about complex topics like Digital Currency or Large Language Models, ensuring they resonate meaningfully with varied audiences, such as children, painters, and doctors, utilizing persona-specific language.”

Fifth dense summary:

“Missing_Entities”: “convey; reach to none; happy tailoring”,

“Denser_Summary”: “Using Audience Persona Pattern, ChatGPT skillfully tailors and conveys complex messages, like those concerning Digital Currency or Large Language Models, to distinct personas such as children or painters, ensuring meaningful resonance and adherence to the principle: ‘speak to all, reach to none’, culminating in happy tailoring.”

Review 🧠

As shown in the example, the density of the summaries increases in each iteration. Although dense summaries are preferred, overly dense summaries are not coherent, making them difficult to follow — as in the fifth dense summary.

TIP 🍬: Adjust the number of iterations based on your summary density preference.

If you still have 3 minutes to read. . .

You only need to modify the first point in the guidelines as shown below:

👎 The first summary should be long (4–5 sentences, 80 words) yet highly non-specific, containing little information beyond the entities marked as missing. Use overly verbose language and fillers (e.g., “this article discusses”) to reach 80 words.

To. . .

👍 The first summary should be a 3-minute read long yet highly non-specific, containing little information beyond the entities marked as missing. Use overly verbose language and fillers (e.g., “this article discusses”) to reach a 3-minute read.

🎖 Now, you have a 3-minute read dense summary. 🎖️

🎖️Thanks For Reading🎖️

⚡️LIGHT UP⚡️ MY DAY with a C-L-A-P👏

🚀 F-O-L-L-O-W Qendel AI on Medium | LinkedIn, and Twitter for upcoming PROMPTING content 🚀

References:

From Sparse to Dense: GPT-4 Summarization with Chain of Density Prompting — https://arxiv.org/pdf/2309.04269.pdf

ChatGPT
Prompt
Data Science
Machine Learning
Artificial Intelligence
Recommended from ReadMedium