How to create increasingly better AI outputs

Using the recursive element of the Chain of Density prompt

The Prompt Warrior Cover

Read time: 5 minutes | Subscribe to this newsletter

Hey there! Moritz here. Thank you for joining me on another post of The Prompt Warrior, where I help you grow your business by leveraging AI.

This week’s newsletter is sponsored by Glean.​

Glean is like Google + ChatGPT for the workplace.

An AI-powered search across your company’s knowledge base, in a safe and secure manner.

Trusted by Okta, Grammarly, and Fortune 500 companies.

Today, we’re going to be looking at how to improve any of your AI prompts to make the output better.

And to be clear, I don’t just mean a little better…

I mean 5x better.

We’ll do this by using a new prompt (used by Salesforce, MIT, and Columbia) called the Chain of Density.

It’s a highly effective prompt that creates increasingly better article summaries.

But the concept of the prompt (recursion) can be used to supercharge your other prompts, too.

(Thanks to Jeremy for bringing this to my attention here.)

This means that any of your favorite prompts that you use on a regular basis are going to get much better.

Whether it's summarising articles, generating content, or brainstorming.

Your outputs are about to improve.

When using AI, many people find a prompt that gives pretty good output and stick with it forever. I’ve been guilty of this in the past, too.

But as AI evolves and improves, our prompts need to improve with it. And this recursion principle will really spice it up for you.

Here’s exactly what you’ll learn today:

  • What the chain of density prompt is

  • How it works

  • How you can apply it to any of your prompts to make the output way better

  • A walkthrough of relevant examples

How the chain of density prompt works

The chain of density prompt is a prompt designed to create increasingly better summaries of articles.

We’ll break down the prompt in detail below, but here’s the full prompt to get an overview:

Now let’s break it down:

1. The Recursion

The most important part of this prompt is the first bit. Because this part adds a recursive element.

It basically tells the AI to create 5 versions that are increasingly better by continuously identifying “missing entities”.

2. Missing entities

The next section of the prompt gives exact definitions of what a missing entity is so the output can be continuously improved.

It works so well because it is so precise in what a “better” output is.

3. Additional guidelines

This last section of the prompt gives some additional instructions on the writing style of the summaries and reminds the AI multiple times to keep the same length throughout each recursion.

This part is added to make sure that the AI doesn’t start hallucinating and doing its own thing during the process of improvement.

Here’s one example of this prompt in action:

We’ll use it to summarise this Wikipedia page about the Battle of Valmy.

The first summary is ok, not great:

The final summary is much better:

Applying recursion to other prompts

You might think ok great, this prompt creates better summaries, but so what? I don’t often need to summarise things.

Well you can apply the concept of recursion to your other prompts as well to improve them.

Just add this simplified prompt as a follow-up prompt:

You will generate increasingly better outputs of the output generated from the above prompt.

Repeat the following 2 steps 5 times.

Step 1. Identify 1-3 points from the initial output which are missing.

Step 2. Write a new, improved output of identical length which includes the missing points.

(To enhance this prompt you can further define “missing points” relevant to your use case or add “additional guidelines”. I’ve left them out here to keep it simple.)

Let’s do a few examples so you can see how powerful this is:

1. Creating increasingly better newsletter descriptions

Here’s the initial prompt we’ll use to generate a simple newsletter description:

Create a short 3-sentence description for the landing page of my newsletter. My newsletter is for solopreneurs that want to grow their business by leveraging AI.

And here is the output from the initial prompt:

At first glance, it looks okay.

We can do better, though. Here’s the output after running the recursive follow-up prompt:

As you can see, the output that has gone through the recursion process has added several new (and highly relevant) points, such as a CTA, social proof and more USPs.

2. Creating increasingly better Twitter hooks

Initial prompt:

"Write an engaging and compelling Twitter hook following the AIDA framework for my thread, which is about writing calls to actions in emails."

Here is the output from the initial prompt:

It just feels a little “meh”. Not terrible, but nothing crazy.

But after running the follow-up prompt, the 5th iteration produced this:

I think this is much better. It’s more specific in mentioning the benefits the readers will get from reading and uses much clearer language throughout.

It’s a big improvement.

3. Creating increasingly better prompts

We’ll use ChatGPT for this one since it's not a copywriting task (Claude is much better at those)

Initial prompt:

"Craft the perfect prompt I can use with you to write me a blog post"

And here is the first output from ChatGPT:

This is actually pretty good. But after running the follow-up prompt, here is the final iteration:

The new and improved prompt adds a section to fill in your desired tone. It also provides further instructions, such as adding images, links, and formatting suggestions. It even included instructions for testimonials!

I hope that by going through these examples, you can see how you can apply this amazing prompt to improve your AI outputs and in turn grow and improve your business.

Thanks for reading!

If you found this helpful, please support me by forwarding this newsletter to a friend or colleague.

What did you think of today's email?

Your feedback helps me create better emails for you!

Login or Subscribe to participate in polls.

See you in the next one!

Join the conversation

or to participate.