Thursday, May 4, 2023

In the ChatGPT Age, Prompting Is the Language to Learn

Everyone should be learning to prompt. You, me, your kids, your neighbor — everyone. Prompting is the language of generative AI, enabling instruction from human to machine, and is therefore perhaps the most useful tongue you could possibly master in today’s 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 photosynthesis 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 sophisticated 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 very near future, employees working in just about every industry imaginable will need to know how to prompt chatbots such as ChatGPT effectively and efficiently. “Using AI models to generate things is expensive, and the outputs can vary massively,” said Ben Stokes, the creator of PromptBase, a marketplace for good AI prompts. “A good prompt engineer can create prompts that produce consistent, high-quality outputs (e.g. images, text or code) at low costs (either API costs or images credits etc.).”

Already, prompt engineering is a lucrative profession for those who have smartly gotten ahead. Some startups are advertising prompt engineering 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 image at the top 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 datasets with all kind of assumptions about what you actually want.

Describe it again, with more detail. You might come up with some other words for the picture, like “clean cut,” “Caucasian” or even “handsome.” You might recognize 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 considerably — DALL-E 2 spat out several distinct variations, many with imperfections that wouldn’t pass muster for a professional project. To refine prompting further, and to stretch the capabilities of AI tools beyond their creators’ own imaginations, people have begun exploring the art of the super prompt, instructions that can run to many hundreds of words and are designed to force the AI to delve deep into its dataset.

Often, this can involve a little role play: telling ChatGPT to “pretend” it is something else. “You are an interviewer for a job at a multinational bank,” you might say, followed by a detailed description of the role and requesting they give you a grilling. You might ask it to play the role of an app designer writing specifically for Apple’s iOS and have it spit out code to your specifications. 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’s 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, encouraging us to think outside our normal perspectives.

You could also, it’s well worth acknowledging, 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? Isn’t it 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 applications of AI will for a long time rely heavily on the “human in the loop,” providing instruction, refining outputs, pushing the technology into new directions. Reminding it who’s boss.

by Dave Lee, Bloomberg |  Read more:
Image: Open AI. Photographer: Bloomberg/DALL-E 2/DALL-E 2
[ed. Define "long time". I've posted about prompt engineering before, which is likely to be one of the most ephemeral job classes ever. It's AI. It'll eventually prompt you on how to be clearer.]