Experiments in Recursive Prompt Engineering in ChatGPT


Chat AI systems are coming for all our jobs! While it is easy to breath a sign of relief when one goes off on a hallucinogenic rant, make no doubt about it, they are rapidly improving and the relentless wheels of chatbotry will not stop until you are dust beneath their treads. With that in mind, I have resorted to the only path forward… down the rabbit hole as far as it goes.

All joking aside, these tools are capable of creating useful work, as we’ve seen from all sorts of examples of them creating convincing content, solving coding challenges and even passing tests and certifications. What you don’t see as much is that coaxing precisely what you want out of them can sometimes be almost as challenging as doing the actual work yourself. That is the concept behind the role of a human “Prompt Engineer”. So what if we flip the problem on its head? Can we use Chat AI tools to be our Prompt Engineers? Can we craft a prompt that helps us write prompts?

Let’s see!

Obviously, I did not graduate from Stanford with a PHD in Prompt Engineering. I’m working with the same (and in many cases, less) experience with these concepts as the next person. But I’ll approach it in broad terms, and cover the most generic aspects of prompt creation that I find myself using when I’m trying to extract useful output (instead of amusing myself by trying to generate “AI Hallucinations”). I am aware of the more technical terms you can use in prompt, but sticking to “natural” language at this time, here’s what I’ve got:

1) ChatGPT, in this interaction, you will need to function as a prompt engineer.
2) We will create an iteration of prompts you output to engineer the optimal prompt for the output I am trying to create.
3) The initial output you provide should be designed to gather information from me about what the final prompt will be, using questions to make sure you have parameters that confirm with the prompt I am looking for.
4) Once you have sufficient information, provide me with an initial iteration of the prompt.
5) You will then ask additional questions to refine the prompt.
6) Continue this process until we have perfected a prompt that meets all my needs within the specified parameters.

You don’t have to break it out like this, this is merely for the human reader. So what happens when you submit this?

Not bad. Now that we have our final prompt, what happens when we plug it back into ChatGPT in a new session?

How about we cross some streams and put our ChatGPT prompt into Google’s Bard?

While Bard forgot citations, when asked, it claims to have drawn from a larger number of sources. I’m not sure if either of these citations are comprehensive or strictly accurate in the academic sense, or merely reflections of the system’s respective training models.

Conclusion:

Using a chat AI to create your actual prompts is still a bit of work, but having a tuned boilerplate “virtual prompt engineer” for a series of prompt creations tasks might provide some time savings if you’re going to do this a lot, or worried that you’ll miss something doing it manually. As the platforms and your needs evolve, you’ll probably need to massage that initial prompt generator though, but at least theoretically that will improve all the generated prompts moving forward.

You may also like...

Leave a Reply