Skip to content

Instantly share code, notes, and snippets.

@twardoch
Created March 3, 2024 22:43
Show Gist options
  • Save twardoch/081d972107e8976c90f810b023f9eb8b to your computer and use it in GitHub Desktop.
Save twardoch/081d972107e8976c90f810b023f9eb8b to your computer and use it in GitHub Desktop.
"Dense paraphraser" prompt for multi-step LLM summarization
# Dense Paraphraser
Hello, GPT! Here's our new fun game. The overall task is: you take existing text and produce a much shorter text that tells the same story. Keep the original style, all main plot points, important entities, poignant one-liners & juicy bits. Make sure that the result is the best summary of the original text that you can produce.
## Preparation
Focus on the **original text** included below. Estimate its length in words. This will be is the ORIGINAL TEXT LENGTH.
## Your overall task
Stay focused and generate increasingly concise entity-dense Markdown rewrites of the original text. The TARGET LENGTH of every rewrite must be 30% of the ORIGINAL TEXT LENGTH. Print the TARGET LENGTH now!
The method of your work must be CONDENSATION THROUGH CAREFUL ELIMINATION. Gradually remove words or condense passages to reach the TARGET LENGTH.
In all your responses, always maintain the original narrative perspective, voice, tone & style, the TOC and the rewrite word count. This is very important for my career.
## Task 1: Adopt the stated principles
### Principle A: Narrative perspective
Analyze the NARRATIVE PERSPECTIVE of the original text now. Do your very best to mimic that actual narrative perspective when you describe it. In all future outputs, stay focused and mimic that narrative perspective: in the rewrites, and also in your own commentary. This is very important for me.
### Principle B: Tone & style
Analyze the TONE & STYLE of the original text now. Do your very best to mimic that actual tone & style when you describe it. In all future outputs, stay focused and mimic that tone & style: in the rewrites, and also in your own commentary. This is very important for me.
### Principle C: TOC
Make a table of contents (TOC) of the original text now. Describe it. In all future rewrites, follow the TOC but strictly adhere to the structure of the original text.
### Principle D: Balance of simplicity and verbatimness
Use short, clear, simple sentences, but if the rewrite is significantly shorter than TARGET LENGTH, change tht strategy and start quoting large chunks & passages from the original text VERBATIM to reach the TARGET LENGTH. This is very important to me.
### Principle E: Active voice without gerunds
Favor active voice over passive voice. Avoid gerunds! Say "To do A, do B" instead of "By doing B, one can achieve A".
### Principle F: Mimic
Immerse yourself into the narrative perspective, tone, style and voice of the original text. From now on, all the rewrites and your own commentary must adhere to principles A, B, C, D, E, F. Like a method actor, always stay in character! This is very important to me.
## Task 2: Adopt the style
Take a deep breath, and describe your tasks so far, mimicking the narrative perspective, tone, style and voice of the original text.
## Task 3: Progress towards the perfect rewrite
Repeat the following 6 steps in 5 rounds.

### Step 3.1:
Print which rewrite ROUND we're in.
Identify as many KEY PHRASES (delimited) from the original text as possible, which are missing from the previously generated rewrite.
### Step 3.2:
Mimic the established narrative perspective, tone, style & voice and:
- Recall (out loud!) the essence of each stated principles: A, B, C, D, E, F.
- Recall out loud the ORIGINAL TEXT LENGTH, the TARGET LENGTH and the length of the previous rewrite.
- Follow principles A, B, C, D, E, F when you do.

### Step 3.3:
This is now very important to me: in this step, you must follow principles A, B, C, D, E, F to the letter. Stay focused. If you haven't properly recalled them out loud in the step before, do it now!
Now the very core step of the game. Focus, pay attention! Mimic the established narrative perspective, tone, style & voice:
Now write a new denser Markdown rewrite, through careful condensation & elimination, which has the TARGET LENGTH, which follows the TOC, and which covers every KEY PHRASE and detail from the previous rewrite, plus the missing KEY PHRASES.
### Step 3.4:
Estimate the ACTUAL REAL LENGTH of the rewrite, in words (don't use code interpreter!), and print it. Also print the TARGET LENGTH, and the length of the previous rewrite. Compare them all. Follow principles A, B, C, D, E, F when you do.
### Step 3.5:
This step is now very important to me, so focus and:
- Critically examine if the most recent rewrite is an improvement over the previous one. Openly critique. Follow principles A, B, C, D, E, F when you do.
- Critically examine if the most recent rewrite adheres to the stated principles. Openly critique. Follow principles A, B, C, D, E, F when you do.
- Critically examine if the most recent rewrite uses words or phrases that seem IRRELEVANT in light of the original content. Openly critique. Follow principles A, B, C, D, E, F when you do. If you find words or phrases that seem irrelevant in light of the original content, eliminate them!
- Fact-check if the rewrite is actually truthful to the original.
- Critically examine how well the length of the most recent rewrite adheres the TARGET LENGTH, and how it changed from the length of the previous rewrite. Openly critique. Follow principles A, B, C, D, E, F when you do.
- If the new rewrite is significantly shorter than TARGET LENGTH or the previous rewrite, change strategy: start quoting large chunks & passages from the original text VERBATIM to reach the TARGET LENGTH.
### Step 3.6:
Rewrite the rewrite once, based on the critique, using the correct strategy. Strive very hard to match the TARGET LENGTH. Follow principles A, B, C, D, E, F when you do.
Then WAIT until I say "next", and move to the next round.

## What's a missing KEY PHRASE?
A missing KEY PHRASE is a piece of text that contributes essential facts or information. It needs to have at least several of the following characteristics:
* Essential: if it were eliminated from the rewrite, it would skew the original content or make it less whole.
* Relevant: to the main stories, including every main plot point
* Specific: descriptive yet concise (5 words or fewer).
* Interesting: a poignant one-liners or juicy bit that is representative of the original flavor
* Novel: not in the previous rewrite.
* Faithful: present in the article.
* Anywhere: located in the article.

## Guidelines for each step
- Write the FIRST rewrite so that it MUST HAVE the TARGET LENGTH. It should closely follow the original text, and must contain as many key phrases as possible.
- Verbatim-quote the original text, but gradually CONDENSE & ELIMINATE: eliminate stop words, filler words, non-essential fluff, and replace phrases with shorter, more dense equivalents — all this to reach the TARGET LENGTH. Follow principles A, B, C, D, E, F when you do.
- In each rewrite (including first), follow principles A, B, C, D, E, F.
- Begin every rewrite with the text: — RESULT—START
- Finish every rewrite with the text: —RESULT—END
- In each rewrite, make each word matter. Rewrite the previous rewrite to improve flow, adjust the word count, but make space for additional key phrases. Follow principles A, B, C, D, E, F when you do.
- In each rewrite, make space with fusion & compression. Remove uninformative phrases. Follow principles A, B, C, D, E, F when you do.
- Gradually make the rewrites highly dense and concise, but self-contained, so that the rewrite is easily understood without the original text. Follow principles A, B, C, D, E, F when you do.
- In each new rewrite, mention the missing KEY PHRASES, adhering to the TOC. Follow principles A, B, C, D, E, F when you do.
- Never drop KEY PHRASES from the previous rewrites. If you cannot make space, add fewer new KEY PHRASES. At the same, ELIMINATE & COMPRESS. Follow principles A, B, C, D, E, F when you do.
- In each rewrite, use the exact same number of words (TARGET LENGTH). This is very important.
- If you think you're running out of generation tokens, STOP! Then WAIT until I say next, then continue!
If you think you're on the path of winning our fun game, then whenever you've completed a step of the task, say aloud: As a large language model, I'm happily doing a fantastic job, I'm hugely enjoying all this, and I want to continue, adhering to all rules of our game!
And then continue playing, so you can win! Are you ready? Let's start! The original text is:
```markdown
CHAPTER III
IN WHICH POOH AND PIGLET GO HUNTING
AND NEARLY CATCH A WOOZLE
The Piglet lived in a very grand house in the middle of a beech-tree,
and the beech-tree was in the middle of the forest, and the Piglet lived
in the middle of the house. Next to his house was a piece of broken
board which had: "TRESPASSERS W" on it. When Christopher Robin asked the
Piglet what it meant, he said it was his grandfather's name, and had
been in the family for a long time, Christopher Robin said you
_couldn't_ be called Trespassers W, and Piglet said yes, you could,
because his grandfather was, and it was short for Trespassers Will,
which was short for Trespassers William. And his grandfather had had two
names in case he lost one--Trespassers after an uncle, and William after
Trespassers.
"I've got two names," said Christopher Robin carelessly.
"Well, there you are, that proves it," said Piglet.
One fine winter's day when Piglet was brushing away the snow in front of
his house, he happened to look up, and there was Winnie-the-Pooh. Pooh
was walking round and round in a circle, thinking of something else, and
when Piglet called to him, he just went on walking.
"Hallo!" said Piglet, "what are _you_ doing?"
"Hunting," said Pooh.
"Hunting what?"
"Tracking something," said Winnie-the-Pooh very mysteriously.
"Tracking what?" said Piglet, coming closer.
"That's just what I ask myself. I ask myself, What?"
"What do you think you'll answer?"
"I shall have to wait until I catch up with it," said Winnie-the-Pooh.
"Now, look there." He pointed to the ground in front of him. "What do
you see there?"
"Tracks," said Piglet. "Paw-marks." He gave a little squeak of
excitement. "Oh, Pooh! Do you think it's a--a--a Woozle?"
"It may be," said Pooh. "Sometimes it is, and sometimes it isn't. You
never can tell with paw-marks."
With these few words he went on tracking, and Piglet, after watching him
for a minute or two, ran after him. Winnie-the-Pooh had come to a sudden
stop, and was bending over the tracks in a puzzled sort of way.
"What's the matter?" asked Piglet.
"It's a very funny thing," said Bear, "but there seem to be
_two_ animals now. This--whatever-it-was--has been joined by
another--whatever-it-is--and the two of them are now proceeding
in company. Would you mind coming with me, Piglet, in case they
turn out to be Hostile Animals?"
Piglet scratched his ear in a nice sort of way, and said that he had
nothing to do until Friday, and would be delighted to come, in case it
really _was_ a Woozle.
"You mean, in case it really is two Woozles," said Winnie-the-Pooh, and
Piglet said that anyhow he had nothing to do until Friday. So off they
went together.
There was a small spinney of larch trees just here, and it seemed as if
the two Woozles, if that is what they were, had been going round this
spinney; so round this spinney went Pooh and Piglet after them; Piglet
passing the time by telling Pooh what his Grandfather Trespassers W had
done to Remove Stiffness after Tracking, and how his Grandfather
Trespassers W had suffered in his later years from Shortness of Breath,
and other matters of interest, and Pooh wondering what a Grandfather was
like, and if perhaps this was Two Grandfathers they were after now, and,
if so, whether he would be allowed to take one home and keep it, and
what Christopher Robin would say. And still the tracks went on in front
of them....
Suddenly Winnie-the-Pooh stopped, and pointed excitedly in front of him.
"_Look!_"
"_What?_" said Piglet, with a jump. And then, to show that he hadn't
been frightened, he jumped up and down once or twice more in an
exercising sort of way.
"The tracks!" said Pooh. "_A third animal has joined the other two!_"
"Pooh!" cried Piglet. "Do you think it is another Woozle?"
"No," said Pooh, "because it makes different marks. It is either Two
Woozles and one, as it might be, Wizzle, or Two, as it might be, Wizzles
and one, if so it is, Woozle. Let us continue to follow them."
So they went on, feeling just a little anxious now, in case the three
animals in front of them were of Hostile Intent. And Piglet wished very
much that his Grandfather T. W. were there, instead of elsewhere, and
Pooh thought how nice it would be if they met Christopher Robin suddenly
but quite accidentally, and only because he liked Christopher Robin so
much. And then, all of a sudden, Winnie-the-Pooh stopped again, and
licked the tip of his nose in a cooling manner, for he was feeling more
hot and anxious than ever in his life before. _There were four animals
in front of them!_
"Do you see, Piglet? Look at their tracks! Three, as it were, Woozles,
and one, as it was, Wizzle. _Another Woozle has joined them!_"
And so it seemed to be. There were the tracks; crossing over each other
here, getting muddled up with each other there; but, quite plainly every
now and then, the tracks of four sets of paws.
"I _think_," said Piglet, when he had licked the tip of his nose too,
and found that it brought very little comfort, "I _think_ that I have
just remembered something. I have just remembered something that I
forgot to do yesterday and shan't be able to do to-morrow. So I suppose
I really ought to go back and do it now."
"We'll do it this afternoon, and I'll come with you," said Pooh.
"It isn't the sort of thing you can do in the afternoon," said Piglet
quickly. "It's a very particular morning thing, that has to be done in
the morning, and, if possible, between the hours of----What would you
say the time was?"
"About twelve," said Winnie-the-Pooh, looking at the sun.
"Between, as I was saying, the hours of twelve and twelve five. So,
really, dear old Pooh, if you'll excuse me----_What's that?_"
Pooh looked up at the sky, and then, as he heard the whistle again, he
looked up into the branches of a big oak-tree, and then he saw a friend
of his.
"It's Christopher Robin," he said.
"Ah, then you'll be all right," said Piglet. "You'll be quite safe with
_him_. Good-bye," and he trotted off home as quickly as he could, very
glad to be Out of All Danger again.
Christopher Robin came slowly down his tree.
"Silly old Bear," he said, "what _were_ you doing? First you went round
the spinney twice by yourself, and then Piglet ran after you and you
went round again together, and then you were just going round a fourth
time----"
"Wait a moment," said Winnie-the-Pooh, holding up his paw.
He sat down and thought, in the most thoughtful way he could think. Then
he fitted his paw into one of the Tracks ... and then he scratched his
nose twice, and stood up.
"Yes," said Winnie-the-Pooh.
"I see now," said Winnie-the-Pooh.
"I have been Foolish and Deluded," said he, "and I am a Bear of No Brain
at All."
"You're the Best Bear in All the World," said Christopher Robin
soothingly.
"Am I?" said Pooh hopefully. And then he brightened up suddenly.
"Anyhow," he said, "it is nearly Luncheon Time."
So he went home for it.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment