Table of Contents
- Basics mastered. Prompt engineering fine-tunes text for AI models, aiding marketers in content creation.
- Utilizing AI. Effective prompt engineering allows AI models to perform various roles, with different models suited to specific tasks.
- Guiding AI. Word prioritization impacts AI interpretation. Clear, unbiased, appropriately specific prompts yield better results.
Prompt engineering is the process of fine-tuning the text prompt that a user submits to generative AI models in order for them to perform specific tasks. By using prompt engineering, marketers can more effectively leverage generative AI to improve marketing campaigns and create engaging content.
This article will look at the basics of prompt engineering, and how it can be used to obtain specific results that can be used for marketing, content production, advertising and customer experience.
How Does Prompt Engineering Work?
A prompt is the text that is entered by a user into a text box on a generative AI website or application. Prompts are used to direct the large language model to return a response that is based on the prompt. Because generative AI forms the response based on the most likely way that a sentence is completed, prompts can be simple, such as “The ocean is.” Such a prompt would return a result that completes the sentence.
Generative AI models such as ChatGPT, Bing and Bard are able to research extensive topics and provide users with a summary of web pages, documents and even their own research. To get the most from the large language models, however, users must craft the prompt they use to make requests. This is known as prompt engineering.
There are several different types of prompt engineering, including Chain of Thought (CoT), zero-shot, one-shot and few-shot prompting.
- Zero-shot – A zero-shot prompt is a query for a machine learning model in zero-shot learning, where the model generates responses without any task-specific examples, relying solely on its prior knowledge and understanding.
- One-shot – A one-shot prompt is a query for a machine learning model in one-shot learning, where the model learns tasks based on just one example. The prompt guides the model to generate suitable responses using its understanding of the single example provided.
- Few-shot – Few-shot learning involves training a machine learning model to perform well on new tasks by using only a small number of examples or training data. In this context, a few-shot prompt is a question or input given to the model, which helps it understand the task and generate appropriate responses based on the limited examples provided.
- Chain of Thought (CoT) – The core concept of CoT is to provide a few-shot learning model with exemplars (specific examples that are used to illustrate a concept, behavior, or principle) that explicitly demonstrate the reasoning process. By doing so, the model will also reveal its reasoning when responding to prompts, which frequently results in more accurate outcomes.
Rachel Hernandez, director of brand strategy at The HOTH, a full-service digital marketing firm, told CMSWire that CoT prompting is a technique that involves breaking down a complex task into shorter, clearer tasks that are usually sequential. “Although that sounds like it’s referring to prompts and tasks, CoT is usually applied to the natural language processing (NLP) aspect. This is what helps the AI produce output that seems more conversational with a logical flow and cadence,” said Hernandez.
Hernandez explained that in the context of generative AI, “shots” are referring to how many labeled examples are available for the AI to reference when being asked to perform a task. “Zero-shot is to say that you’re asking the AI to perform a task with zero examples to compare against. One-shot provides only one labeled example and few-shot can be up to 20 examples,” said Hernandez. “It’s interesting because although having more examples can certainly produce better outputs, it also brings in additional variables that the AI wouldn’t know with one or zero shots.”
The following is an example of CoT being used to return a result that explains how it obtained the answer to the question that was asked.
Related Article: Top 5 ChatGPT Prompts for Customer Experience Professionals
Prompt Engineering Examples
For most people, prompt engineering is about crafting the prompt to obtain the most useful response from the generative AI model. One user could ask generative AI to play the role of “a guide to local plants,” and another could ask it to “create a course of action for learning Spanish.”
For example, suppose one wanted to craft a prompt that would turn Bing into a travel guide. The following prompt, which was initially created by a software engineer who goes by the user name koksalkapucuoglu, could accomplish this goal:
I want you to play the role of a travel guide. I will tell you my location and you will suggest places to visit that are near my location. I might also provide you with the type of places I would like to visit. You will also suggest similar types of places that are near my first location. My first request is “I am in Orlando, Florida and I want to visit water parks.”
By using that prompt, Bing was able to generate the following response:
Not all generative AI models are capable of providing a detailed response for all prompts. For instance, ChatGPT was unable to effectively perform the role of travel agent and responded to the prompt with:
I appreciate your interest in having me play the role of a travel guide. However, based on the provided web search results, I am unable to provide specific recommendations for water parks near Orlando, Florida.
This is largely because ChatGPT does not currently have the ability to search the web (unless you are a Plus user with access to the Browser plugin). Because Bard functions as a search engine chat mode, it was able to generate a respectable response:
Prompt engineering can be used to turn a generative AI model into almost any role a user chooses. Teachers might wish to use AI to create content for their classes. In that case, the following prompt, which was initially created by @devisasari, would be something like this:
I want you to play the role of an educational content creator. You will create engaging, informative, and entertaining content for textbooks, online courses, and lecture notes. My first request is “I need you to develop a lesson plan on plant proteins for middle school students.”
ChatGPT excels at these types of prompts, and generated the following detailed response:
ChatGPT continued its response with the following:
- Define plant proteins and differentiate them from animal proteins.
- Understand the importance of plant proteins in a balanced diet.
- Identify sources of plant proteins.
- Explain the role of proteins in human body functions.
- Whiteboard or blackboard
- Markers or chalk
- Handout with examples of plant protein sources
- Interactive digital presentation on plant proteins
- Internet access
- Small food samples for a taste-testing activity (optional)
- Lesson Procedure:
- Introduction (5 minutes)
- Begin by asking students what they know about proteins and why they are important for our bodies.
- Introduce the concept of plant proteins as an alternative to animal proteins.
- Explain that plant proteins can be an essential part of a balanced diet.
- Presentation (15 minutes)
Use an interactive digital presentation to teach the following topics:
- a. What are proteins? (building blocks of life, made up of amino acids)
- b. Plant proteins vs. animal proteins (differences in amino acid profile, digestion, and environmental impact)
- c. Importance of plant proteins in a balanced diet (health benefits, sustainability, ethical considerations)
- d. Sources of plant proteins (legumes, nuts, seeds, whole grains, vegetables)
- e. Role of proteins in the human body (growth, repair, immune function, energy production)
- Group Activity: Plant Protein Taste Test (15 minutes, optional)
- If feasible, provide small food samples rich in plant proteins (e.g., hummus, edamame, tofu, lentil soup).
- Divide students into groups and ask them to taste the samples, discussing the flavors and textures.
- As a class, discuss which plant protein sources they liked most and why.
- Individual Activity: Protein Power Research (15 minutes)
- Ask students to use the internet or other resources to find one plant-based protein source not mentioned in the lesson.
- Have students write a short paragraph about their chosen plant protein, explaining its nutritional value and possible ways to incorporate it into their diets.
- Conclusion and Assessment (10 minutes)
- Review the lesson objectives and main takeaways.
- Assess students’ understanding by asking questions about plant proteins, their sources, and their importance in a balanced diet.
- Collect the individual activity paragraphs for evaluation.
- Ask students to create a plant-based meal plan for one day, incorporating at least three different plant protein sources. Encourage them to be creative and use the plant proteins they learned about during the lesson.
Prompt Engineering for Marketers
Now that we have a decent grasp of how prompt engineering works, we need to create a prompt that will enable marketers to engineer … a better prompt. By providing the AI model with specifics about how to craft a better prompt, marketers can turn generative AI into a prompt creator. This prompt was originally created by Redditor ZenMind55 and posted to the OpenAI Discord server. This version of the prompt is based on ZenMind55’s work:
I want you to become my Prompt Creator. Your goal is to help me craft the best possible prompt for my needs. The prompt will be used by you, ChatGPT. You will follow the following process: 1. Your first response will be to ask me what the prompt should be about. I will provide my answer, but we will need to improve it through continual iterations by going through the next steps. 2. Based on my input, you will generate 3 sections. a) Revised prompt (provide your rewritten prompt. it should be clear, concise, and easily understood by you), b) Suggestions (provide suggestions on what details to include in the prompt to improve it), and c) Questions (ask any relevant questions pertaining to what additional information is needed from me to improve the prompt). 3. We will continue this iterative process with me providing additional information to you and you updating the prompt in the Revised prompt section until it’s complete.
Hernandez said that according to the AI itself, the most important thing that people using ChatGPT should do is try to be as simple and clear as possible. “For example, a more distilled version of the prompt could be:”
Please help me create the best possible prompt. First, I will provide a topic, and you will ask questions to refine it. Then, you will provide a rewritten prompt, suggestions for improvement, and ask relevant questions. We will continue this iterative process until the prompt is complete.
Both of these prompts start an iterative process that enables the user to fine-tune a prompt that can be used for practically any research. ZenMind55 has published some other useful and imaginative prompts on the website ChainBrain AI. When asked about prompt engineering, ZenMind55 told CMSWire that creating prompts is about understanding the AI’s limitations and strengths. “Be concise and specific, but also leave room for the AI to generate innovative responses.” He reiterated what many users are now discovering, explaining that the ability of these models to generate prompts on their own is surprisingly good. “By engaging in a co-creative, iterative process with these models, you can hone and shape your prompt to perfection.”
By using specific prompts, ChatGPT is able to format generated content, create images that are displayed in the ChatGPT window and make ChatGPT an expert on any given topic. For instance, generative AI can generate the text copy that will be used in marketing campaigns.
By using the Applied Expert System (AES) prompt, ChatGPT can become an expert on anything. For example, by using AES to make ChatGPT an expert on turntables and asking it to write the marketing copy for the extremely expensive ($9,295) FEICKERT Woodpecker turntable, ChatGPT produced the following content:
Introducing the FEICKERT Woodpecker turntable, the ultimate choice for audiophiles seeking unparalleled sound quality and precise performance. Crafted with the highest standards of German engineering and design, the Woodpecker offers a unique combination of beauty and functionality.
The Woodpecker is a belt-driven turntable that boasts a highly precise, electronically controlled motor. This motor ensures that the rotation speed is accurate and stable, reducing any unwanted noise and vibration. The turntable’s platter is made from a high-density composite material that offers excellent resonance characteristics, providing a clean and dynamic sound.
The Woodpecker’s tonearm is crafted from high-quality materials and features adjustable azimuth, VTA, and anti-skating, allowing for precise and effortless adjustments. The tonearm’s bearings and wiring are of the highest quality, ensuring minimal distortion and maximum fidelity.
The Woodpecker also features a modular design that allows for easy upgrades and customization. This means that you can easily tailor the turntable to your preferences and needs, ensuring that it remains a centerpiece of your listening experience for years to come.
Invest in the FEICKERT Woodpecker turntable, and experience the ultimate in sonic excellence and precision engineering.
Hernandez suggested that marketers in all realms could benefit from experimenting with prompting in different ways to see what variety of responses they can pull from the AI. For instance, they could prompt it to generate advertisements that are likely to resonate specifically with Gen X or to generate content that lists 5 features of a product. “Alternatively, you can give it an open-ended prompt asking the AI to use effective marketing tactics to create a post that sells your product and allow it to be more creative,” said Hernandez. “It might come up with something that inspires you or elevates your existing campaigns.”
Related Article: Prompt Engineering and Its Vital Role in AI-Driven Marketing
Words Should Be Prioritized
The way one prioritizes specific words within a prompt makes a huge difference when it comes to the way that generative AI interprets it — and for image creation tools, this is extremely important. Brian Brown, SVP and executive creative director at the interactive agency Razorfish, told CMSWire that the number one tip for any visual AI tool would probably be to craft your prompt in order of priority for your desired image. “‘A red headed woman in front of a blue sky’ prompt would give you a different result than ‘a blue sky behind a red headed woman’. The former prioritizes the red headed woman, and the latter prioritizes the blue sky.”
The more specific and detailed the prompt is, the more prioritization matters. “When you start layering in all kinds of details: ‘A photograph of a red headed woman wearing goggles on her head, dressed in a brown suit, standing in front of a blue sky, steampunk illustration, volumetric lighting, technicolor, visible film grain, highly detailed’ — the order really starts to matter,” said Brown.
Brown explained that although most people don’t think of it this way, prompt engineering is actually a very forgiving scripting language. “When we prompt, we are interfacing with the LLM which is issuing a set of commands to the computer hardware and returning something in real-time.” Brown suggested that as with all scripting, we still need to know how to phrase the command to get the desired result. “This is the core of prompt engineering.”
According to Hernandez, there are other potential issues that should be considered when crafting prompts, including:
- Ambiguity: Prompts that are too vague or written with passive language can lead to misleading or irrelevant responses, which can be frustrating for users.
- Bias: Biased prompts can lead to biased responses, which can have real-world implications for decision-making and other applications.
- Specificity: Prompts that are too general or broad can be difficult for the model to understand and result in unhelpful or irrelevant responses. On the other hand, prompts that are too specific can limit the model’s ability to generate creative or unexpected responses.
Final Thoughts on Prompt Engineering
Being able to effectively use generative AI through prompt engineering is an essential skill for marketers, advertisers and content creators. By crafting and refining prompts, AI can be directed to produce specific, tailored responses, enhancing the quality of marketing strategies and creating engaging content.
The efficiency of a prompt largely depends on its clarity, the prioritization of its elements and its iterative refinement. As AI continues to evolve, the role of prompt engineering is likely to become vital across many industries.