#8: Reverse Prompt Engineering

I hope you liked the email yesterday about prompt injection attacks!

ChatGPT Plus is finally available in the UK so I went ahead and subscribed.

Life is good.

Alright, today I brought to you a concept that I saw first in this video and it’s called Reverse Prompt Engineering.

Let’s see what it is about…

Reverse Prompt Engineering

Alright, by now we all know what prompt engineering is.

In order to make the AI do the thing, you give it a prompt that is customised in a way that it fits to your specific application.

But how about reversing this and figuring out what the original prompt was based on your output?

This way you could 1. take any text you like, 2. reverse engineer the prompt and 3. use it for your own specific application.

How does it work in practice?

Let’s start with generation of a list of 5 different European countries.

Then we take the output and open up a new conversation tab. We start with “Reverse prompt engineer the following output“ and then paste the output of the previous step.

You can see here that ChatGPT has figured out a possible prompt that could generate this output and we now can use this for later evaluation.

Tomorrow and Friday I’ll cover more difficult examples and actual applications of reverse prompt engineering.

Hope you liked this!

Best,
Gabor Soter, PhD

A little about me:

  • did my PhD in Europe’s largest AI and robotics research lab

  • worked as software engineer and CTO at Y-combinator-backed and AI startups

  • in my previous startup my team worked with OpenAI