Let’s say you’re making spaghetti marinara for dinner. Sauce from a jar is perfectly fine. But what if you buy your tomatoes and basil from the farmers market to make your own sauce? Chances are it will taste a lot better. And what if you grow your own ingredients from your garden and make your own fresh pasta? A whole new level of deliciousness.
Get to know and directly engage with senior McKinsey experts on prompt engineering
Rodney Zemmel is a senior partner in McKinsey’s New York office and the global leader of McKinsey Digital; Alex Singla is a senior partner in the Chicago office and the global leader of QuantumBlack, AI by McKinsey; Chandra Gnanasambandamv and Lareina Yee are senior partners in the Bay Area office, where Roger Roberts is an expert partner; and Kate Smaje and Alex Sukharevsky are senior partners in the London office. Other experts include Sven Blumberg, a senior partner in the Istanbul office; Aamer Baig, a senior partner in the Chicago office; Eric Hazan, a senior partner in the Paris office; and Delphine Zurkiya, a senior partner in the Boston office.
Just as better ingredients can make for a better dinner, better inputs into a generative AI model can make for better results. These inputs are called prompts, and the practice of writing them is called prompt engineering. Skilled prompt engineers design inputs to interact optimally with other inputs in a generative AI tool. These inputs help elicit better answers from the AI model, meaning the model can perform its tasks better, such as writing marketing emails, generating code, analyzing and synthesizing text, engaging with customers via chatbots, creating digital art, composing music, or any of the other hundreds, if not thousands, of current applications.
Let’s look at an example. Say you want a generative AI model to help you promote an upcoming financial-planning workshop with the CFO of your organization, Acme Inc. You provide a generative AI chatbot with a simple prompt: “Write a social post advertising a class.” Here’s the output:
**Elevate Your Skills: Join Our Class!**
Unlock new knowledge, connect with experts, and embrace growth. Limited spots available—reserve yours now!
#LearnWithUs #SkillBuilding #ClassTime
It’s pretty generic and unlikely to generate much interest.
Let’s try again. This time, you make your prompt a little more specific: “Write a short social post advertising a financial-planning workshop with the CFO of Acme, Inc.” Here’s what the model gives you this time:
**Master Your Finances with the CFO of Acme, Inc.!**
Get ready to take charge of your financial future! Join our upcoming Financial Planning Workshop featuring the CFO of Acme, Inc. Gain insights, strategies, and expert advice to secure your financial success.
Limited spots available—don’t miss this exclusive opportunity. Reserve your seat today and pave the way to financial freedom!
#FinancialPlanning #ExpertAdvice #SecureYourFuture
It’s clear that the more specific output has a greater chance of achieving the result you’re after. By creating a more detailed, specific request to the AI chatbot, you’ve just engineered a prompt.
Generative AI has an important role to play in the future of business and society (as well as, maybe, helping you promote any upcoming workshops you may be involved in). But where does prompt engineering fit in? Read on to find out.
Learn more about McKinsey’s Digital Practice.
What is generative AI?
First things first: a refresher on generative AI. Generative AI models are applications typically built using foundation models. These models contain expansive artificial neural networks, inspired by the billions of neurons connected in the human brain. Foundation models are part of what’s called deep learning, which refers to the many deep layers within neural networks. Deep learning has powered many recent advances in AI—things you’re probably already using, like Alexa or Siri—but foundation models represent a significant evolution within deep learning. Unlike previous deep-learning models, foundation models can process massive and varied sets of unstructured data. AI that is trained on these models can perform tasks such as answering questions and classifying, editing, summarizing, and drafting new content.
How will generative AI affect the workforce?
McKinsey’s latest research suggests that generative AI is poised to boost performance across sales and marketing, customer operations, software development, and more. In the process, generative AI could add up to $4.4 trillion annually to the global economy, across sectors from banking to life sciences.
The breakthroughs powered by generative AI will also change the workforce. One of generative AI’s strengths is that it can help nearly everyone with their jobs. This is also one of the technology’s greatest challenges. McKinsey estimates that generative AI and other technologies have the potential to automate work activities that absorb up to 70 percent of employees’ time today. This is largely due to generative AI’s ability to predict the patterns found in natural language. This, in turn, means that generative AI stands to have more impact on knowledge work associated with occupations that have higher wages and more educational requirements. And this change will likely happen fast: McKinsey estimates that half of today’s work activities could be automated between 2030 and 2060. That’s roughly a decade earlier than our previous estimates.
These developments will mean big changes in the labor market. Generative AI could enable labor productivity growth of up to 0.6 percent annually through 2040—but that all depends on how fast organizations are able to adopt the technology and effectively redeploy workers’ time. Employees with skills that stand to be automated will need support in learning new skills, and some will need support changing occupations.
Learn more about McKinsey’s Digital Practice.
Are organizations already hiring prompt engineers?
Organizations are already beginning to make changes to their hiring practices that reflect their generative AI ambitions, according to McKinsey’s latest survey on AI. That includes hiring prompt engineers. The survey indicates two major shifts. First, organizations using AI are hiring roles in prompt engineering: 7 percent of respondents whose organizations have adopted AI are hiring roles in this category. Second, organizations using AI are hiring a lot fewer AI-related-software engineers than in 2022: 28 percent of organizations reported hiring for these roles, down from 39 percent last year.
If organizations are hiring prompt engineers, does that mean existing employees will be pushed out?
Prompt engineering is likely to become a larger hiring category in the next few years, but organizations also expect to reskill their existing employees in AI. Nearly four in ten respondents reporting AI adoption expect more than a fifth of their companies’ workforces to be reskilled, whereas only 8 percent say the size of their workforces will decrease by more than a fifth.
Learn more about QuantumBlack, AI by McKinsey.
How might prompt engineering help organizations—say, banks—serve clients more efficiently?
As just one example of the potential power of prompt engineering, let’s look at the banking industry. Banks have plenty of value to gain from generative AI. McKinsey estimates that generative AI tools could create value from increased productivity of up to 4.7 percent of the industry’s annual revenues. That translates to nearly $340 billion more per year. Prompt engineering has a role to play in helping banks capture this value. Here’s how.
Let’s say a large corporate bank wants to build its own applications using generative AI to improve the productivity of relationship managers (RMs). RMs spend a lot of time reviewing large documents, such as annual reports and transcripts of earnings calls, to stay up to date on a client’s priorities. The bank decides to build a solution that accesses a generative AI foundation model through an API (or application programming interface, which is code that helps two pieces of software talk to each other). The tool scans documents and can quickly provide synthesized answers to questions asked by RMs. To make sure RMs receive the most accurate answer possible, the bank trains them in prompt engineering. Of course, the bank also should establish verification processes for the model’s outputs, as some models have been known to hallucinate, or put out false information passed off as true.
This isn’t just a hypothetical example. In September 2023, Morgan Stanley is set to roll out an AI assistant using GPT-4, with the aim of helping tens of thousands of wealth managers quickly find and synthesize massive amounts of data from the company’s internal knowledge base. The model combines search and content creation so wealth managers can find and tailor information for any client at any moment. A European bank developed a generative-AI-based environmental, social, and governance virtual expert. The model answers complex questions based on prompts, identifies the source of each answer, and extracts information from pictures and tables.
In these examples, hypothetical and otherwise, the better the prompt, the better the output.
- “What’s the future of generative AI? An early view in 15 charts,” August 25, 2023
- “The state of AI in 2023: Generative AI’s breakout year,” August 1, 2023, Michael Chui, Lareina Yee, Bryce Hall, Alex Singla, and Alex Sukharevsky
- “Generative AI and the future of work in America,” McKinsey Global Institute, July 26, 2023, Kweilin Ellingrud, Saurabh Sanghvi, Gurneet Singh Dandona, Anu Madgavkar, Michael Chui, Olivia White, and Paige Hasebe
- “Technology’s generational moment with generative AI: A CIO and CTO guide,” July 11, 2023, Aamer Baig, Sven Blumberg, Eva Li, Douglas Merrill, Adi Pradhan, Megha Singa, Alex Sukharevsky, and Stephen Xu
- “Generative AI can give you ‘superpowers,’ new McKinsey research finds,” July 6, 2023
- “Unleashing developer productivity with generative AI,” June 27, 2023, Begum Karaci Deniz, Chandra Gnanasambandam, Martin Harrysson, Alharith Hussin, and Shivam Srivastava
- “The economic potential of generative AI: The next productivity frontier,” June 14, 2023, Michael Chui, Eric Hazan, Roger Roberts, Alex Singla, Kate Smaje, Alex Sukharevsky, Lareina Yee, and Rodney Zemmel
- “What every CEO should know about generative AI,” May 12, 2023, Michael Chui, Roger Roberts, Tanya Rodchenko, Alex Singla, Alex Sukharevsky, Lareina Yee, and Delphine Zurkiya
- “AI-powered marketing and sales reach new heights with generative AI,” May 11, 2023, Richelle Deveau, Sonia Joseph Griffin, and Steve Reis
- “Generative AI is here: How tools like ChatGPT could change your business,” December 20, 2022, Michael Chui, Roger Roberts, and Lareina Yee