Chain of Density (CoD) prompting

Chain of Density (CoD) prompting

Chain of density (COD)是使用生成式AI摘要文章的提示工程技術。這個技術是藉由多輪重複摘要文章,並評估每一次摘要的關鍵訊息(informative entity)是否有所遺漏,若有遺漏則在維持字數的情況下想辦法將關鍵訊息補上。每一次摘要的結果都必須要比前一次的摘要有更高的訊息密度。透過這樣子的方式,研究發現可以產生品質良好的摘要(Adams et al., 2023)。

prompting example

prompts

Article: {{ ARTICLE }}
You will generate increasingly concise, entity-dense summaries of the above article.
Repeat the following 2 steps 5 times.
Step 1. Identify 1-3 informative entities (";" delimited) from the article which are missing from the previously generated summary.
Step 2. Write a new, denser summary of identical length which covers every entity and detail from the previous summary plus the missing entities.
A missing entity is: - relevant to the main story,
- specific yet concise (5 words or fewer),
- novel (not in the previous summary),
- faithful (present in the article),
- anywhere (can be located anywhere in the article).
Guidelines:
- 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.
- Make every word count: rewrite 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, i.e., 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".