Understanding Prompt Engineering
Prompt engineering will become increasingly important over the next several years, as AI tools advance and their technology becomes diffused throughout society. Prompt engineering refers to giving an AI tool a natural language prompt to do something. Here's Wiki:
Prompt engineering is a concept in artificial intelligence, particularly natural language processing (NLP). In prompt engineering, the description of the task is embedded in the input, e.g., as a question instead of it being implicitly given. Prompt engineering typically works by converting one or more tasks to a prompt-based dataset and training a language model with what has been called "prompt-based learning" or just "prompt learning".[1][2] Prompt engineering may work from a large "frozen" pretrained language model and where only the representation of the prompt is learned, with what has been called "prefix-tuning" or "prompt tuning".[3][4]
The GPT-2 and GPT-3 language models[5] were important steps in prompt engineering. In 2021, multitask prompt engineering using multiple NLP datasets showed good performance on new tasks.[6] Prompts with train of thought show indication of reasoning in language models.[7] Adding "Let's think step by step" to the prompt may improve the performance of a language model in multi-step reasoning problems.[8]
Though accurate, this quote assumes quite a bit of knowledge on the part of the reader. Here's a post from May 2021 which proclaims prompt engineering to be the career of the future:
While creating any GPT-3 application the first and foremost thing to consider is the design and content of the training prompt. Prompt design is the most significant process in priming the GPT-3 model to give a favorable and contextual response.
In a way, prompt design is like playing a game of charades!
The Secret to writing good prompts is understanding what GPT-3 knows about the world and how to get the model to use that information to generate useful results. As in the game of charades, we give the person just enough information to figure out the word using his/her intelligence. Similarly, with GPT-3 we give the model just enough context in the form of a training prompt to figure out the patterns and perform the given task. We don't want to interrupt the natural intelligence flow of the model by giving all the information at once.
But that still doesn't give us a great explanation of what "prompt engineering" is. Perhaps the simplest way I can explain it is this: in an AI tool that accepts natural language inputs, prompt engineering is the crafting of that natural language prompt such that you get the AI to perform a task that you want it to perform.
If this sounds like science fiction, that's because it has been a trope of many science fiction shows. Here's a supercut of every character from the seventh season of Star Trek: The Next Generation interacting with computers via voice command:
Of course, you can do a limited version of this today when you tell your iPhone to set the alarm for 6AM.
Here's another view:
What are all the artists and authors going to do for work when the full impact of this breakthrough technology is realized? Will they all be out of a job?
The answer is no, of course not. As remarkable as DALL-E and GPT are, they're not magic. They're tools like any other. After a tumultuous period of change from introduction of new technology, people retrain or switch jobs, and we continue along with higher productivity.
Disney no longer illustrates cartoons by hand, but they own Pixar where higher quality renderings can be done via computer. Many illustrators learned computers, a lot will have retired, some progressed to management, and others still do things manually.
Over a long enough time period, even technologies that obliterate whole categories of industry eventually become commonplace, and those people find other things to do.
In 1908, before the car dominated transport, New York alone had a population of 120,000 horses that had to be fed, groomed, and cared for. They produced 2.5 million pounds of manure every day on the city's streets. Do you know any out of work horse crap shovelers today?
The truth is that most of the time creative professionals spend is on the equivalent of shoveling horse crap. Generative AI tools have the potential to handle that for them.
To capitalize on this opportunity, creatives just need to reframe the value they provide. Let DALL-E be the artist; you can be the curator. Let GPT-3 be the writer; you can be the editor.
Here are a few tangible examples of how AI promises to make creative work better:
- No more bad briefs: clients can use AI to show you exactly what they want, so there's no time wasted second-guessing
- Unlimited variations: rather than charging for or limiting the number of variants, you can generate 10+ new versions with the click of a button
- Consistent brand guidelines: once you've designed a stable prompt that works, it'll almost always replicate the right style and tone of voice for approval
- Self-service small jobs: rather than handle unprofitable commissions manually, you can encode your 'style' in a prompt library and sell that for passive income
- Unexpected inspiration: the tight feedback loop between prompt and results lets you take weird and wonderful routes to ideas you would have never thought of
My sense is that "prompt engineering" will be abstracted away, and we will merely interact with computers with natural language queries, whether spoken or written. Right now, AI tools are so new, and are improving so rapidly, that our principal way of interacting with them is through prompt engineering. But I suspect that over time, as people learn best practices and AI tools become more powerful, what was once called prompt engineering will simply fade into the background. People will just type or speak natural language queries or instructions into their computer, and the computer will spit back some semblance of an answer.