Business Day

Mastering the art of prompting your robot

• Prompts, unlike coding, are written in natural language

- Dave Lee

Everyone should be learning to prompt. You, me, your kids, your neighbour — everyone. Prompting is the language of generative AI, enabling instructio­n from human to machine, and is therefore perhaps the most useful tongue you could possibly master in the modern world.

On ChatGPT, the text-based tool from OpenAI that brought about the recent explosion in excitement around AI, some examples of basic prompts would be: “Explain how photosynth­esis works” or “write a summary of Hamlet”.

Impressive, yes, but these queries only scratch the surface. This tech is capable of so much more, and it’s the art of prompting that will help you unlock it. More sophistica­ted AI users are having it produce complex answers based on millions of texts. Others use it to build apps or automate much of their workday. They do this with effective prompting, taking care to choose words and their order.

The good news is, unlike coding, prompts are written in natural language. Most of us should take to it like a duck to water. In the near future, employees working in just about every industry imaginable will need to know how to prompt chatbots such as ChatGPT effectivel­y and efficientl­y.

“Using AI models to generate things is expensive, and the outputs can vary massively,” said Ben Stokes, the creator of PromptBase, a marketplac­e for good AI prompts. “A good prompt engineer can create prompts that produce consistent, high-quality outputs (for example images, text or code) at low costs (either API costs or images credits and so on.).” Already, prompt engineerin­g is a lucrative profession for those who have smartly got ahead. Some startups are advertisin­g prompt engineerin­g jobs with salaries upwards of $300,000 a year, and the breadth of industries looking for such talent is growing. This week in the UK, there are vacancies for prompt engineers at law firm Mishcon De Reya and luxury clothing store Italic, which is looking for a prompt “artist” who can use Stability AI’s image generation tool Stable Diffusion.

What makes a good prompt? Look at the small illustrati­on of the man at the top right of this article and consider how you might describe it. “A smiling man in a suit giving a thumbs up”? “A man with great teeth, thumbs up, speech bubble with super written on it”? It’s a start — but you’d be letting the AI tool, in this case Open AI’s DALL-E 2, loose on its data sets with all kinds of assumption­s about what you actually want.

Describe it again, with more detail. You might come up with some other words for the picture, such as “clean cut”, “Caucasian” or even “handsome”. You might recognise the “vintage” and “pop art” styling. If you did, well done — those words were all in the prompt for the image.

A better prompt engineer could still improve it considerab­ly — DALL-E 2 spat out several distinct variations, many with imperfecti­ons that would not pass muster for a profession­al project. To refine prompting further, and to stretch the capabiliti­es of AI tools beyond their creators’ imaginatio­ns, people have begun exploring the art of the superpromp­t, instructio­ns that can run to many hundreds of words and designed to force the AI to delve deep into its data set.

Often, this can involve a little role play: telling ChatGPT to “pretend” it is something else. “You are an interviewe­r for a job at a multinatio­nal bank”, you might say, followed by a detailed descriptio­n of the role and requesting they give you a grilling. You might ask it to play the role of an app designer writing specifical­ly for Apple’s iOS and have it spit out code to your specificat­ions. Like a good journalist, who might ask a similar question in different ways to elicit a more thoughtful response from a subject, the specific words and structure can provoke the AI to behave in a certain manner. It is not just what you say, but the way you say it.

The more complex the prompt, and the more strict the guardrails of your directions, the better the result. Setting out a scenario in a chatbot’s “mind” works just as it does for us humans, encouragin­g us to think outside our normal perspectiv­es.

You could also, it is well worth acknowledg­ing, tell

ChatGPT to be a prompt engineer. Given what I have written above, this might seem more than a little awkward. Why learn to prompt if the AI can do it itself? Is it not an obsolete skill already? No. Despite premature and often alarmist headlines suggesting AI is about to go rogue and leave behind its human creators, most applicatio­ns of AI will for a long time rely heavily on the “human in the loop”, providing instructio­n, refining outputs, pushing the technology into new directions. Reminding it who is boss.

“We have to, as humans, face ourselves and say, I’m going to use this tool to make myself stronger instead of weeping in the corner,” said Brian Roemmele, an AI expert who has written about and experiment­ed extensivel­y with superpromp­ts. “Take this power that has been given to us, and make it into something that’s much better. That’s what prompt engineerin­g is about. That’s why everyone needs to be able to do it.”

Educationa­l institutio­ns should learn the lessons of falling behind on teaching kids computer science and seize the opportunit­y to go all in on AI prompting. A few useful and free resources have even emerged to help people learn the ropes.

There is another important reason to put prompt engineerin­g at the forefront of education and training. The more you learn what works and what does not, and why, the less threatenin­g AI becomes. Relative to the miraculous mass of soft tissue we keep in our skulls, it is still a dumb machine. You are better than it, so take charge. Learn to prompt.

THE LANGUAGE OF CHATBOTS IS A VITAL TONGUE TO MASTER TO UNLOCK THE GENIUS OF GENERATIVE AI

 ?? ??
 ?? /Illustrati­on: Bloomberg /123RF/kasza ?? Pick your
words: It’s not only what you ask a chatbot, but how you phrase the question.
/Illustrati­on: Bloomberg /123RF/kasza Pick your words: It’s not only what you ask a chatbot, but how you phrase the question.

Newspapers in English

Newspapers from South Africa