
An artificial intelligence model that makes suggestions to another AI can get it to produce results that are as good as if the prompts came from humans. The technique could be used to improve the performance of AIs whose internal workings remain opaque.
Large language models (LLMs) are neural networks that are trained on vast data sets of online text and can produce convincing language. You give the model an input, called a prompt, and it gives you a response. No one knows exactly how these LLMs arrive at the results they do, but by tweaking the prompt, you can sometimes get better results.
For instance, adding the phrase âletâs think step-by-stepâ to prompts seems to make these language models better at solving problems that they tend to struggle with.
Advertisement
Now, at the University of Toronto in Canada and his colleagues have developed a model called Automatic Prompt Engineer (APE) that uses a language model to come up with similar prompts aimed at a desired outcome that appear to be just as effective, or better than, if a human was thinking up the suggestions.
âUsing our algorithm, we find better prompts than a world-class human prompt engineer,â says Zhou. For example, one prompt they found is âLetâs work this out in a step-by-step way to be sure that we have the right answerâ, though Zhou says exactly why this works is a mystery. âIt is not quite obvious to humans why this prompt works better than just âLetâs work this out step-by-stepâ.â
The prompts that APE finds arenât necessarily the best and there could be better ones out there â but they are now on par with anything a human operator could find.
APE works by showing a large language model a desired output from a particular input, then generating various inputs that it guesses will produce the output. It then decides how to rank these suggestions and picks the one that seems best, although how APE reaches its decision isnât known.
Zhou and his team used APE to come up with prompts for 24 tasks that tackle different aspects of language understanding, such as identifying similarity or causality, and compared the results with those from prompts made by 10 human âprompt engineersâ. They found that APE was comparable or better on 19 of the tasks.
This could be used to improve the performance of large language models for little extra effort, or even to increase the safety of these models. If APE finds a prompt that increases the trustworthiness or accuracy of an output, the prompt could then be added to all public-facing models to, for example, reduce the chances of AI-spread misinformation, says Zhou.
The results are impressive, says at University College London. âThe model doesnât improve itself, but it improves the way it questions itself. This is very difficult and time-consuming from a humanâs perspective.â
While the model only works for language, a useful extension could be in expanding APE to work for AI text-to-image generators like DALL-E or Imagen, says Lu. At the moment, prompts that seem similar to us, such as a âgrey-haired manâ or âa man with grey hairâ, can lead to very different outputs. The model could take a prompt and then optimise it to make sure the output is as accurate as possible and reduce the variability between prompts, says Lu.
Reference: