mailmodo-hamburger

A Complete Guide to Prompt Engineering: Marketer's Edition

ByMashkoor Alam

Share

Linkedin logo
Twitter logo
copy link
Facebook logo
Whatsapp logo
Pinterest logo
mail logo

ChatGPT is one of the most popular conversational AI tools and uses natural language processing (NLP) to understand and generate human-like text responses based on the input received. Users may sometimes not receive the desired response because they don't understand what kind of ChatGPT prompts they should use. Prompt engineering allows users to refine their prompts to receive the desired and accurate responses. Read on to learn all about prompt engineering, the different categories and the parameters that define the responses produced.

Table of contents

What is AI prompt engineering?

AI prompt engineering refers to crafting and optimizing prompts for natural language processing systems to get specific and desired responses. Prompt engineering allows for accurate and relevant outputs. It involves using various techniques like adding context, providing examples and specifying constraints to influence the behavior of the AI system and generate more satisfactory results.

“When considering content marketing, one key way that the AI is used most effectively is with writer's block and setting the foundations of a piece of content. This, however, is entirely dependent on the quality of the prompts you give it.”
-George Blandford, Owner and Sales Director, UK Linkology

What do prompt engineers do?

Prompt engineers specialize in designing and optimizing text prompts for language models that can be used to elicit the desired behavior or produce more accurate responses.

You can check out some examples of well-crafted prompts in Mailmodo’s prompt library, which has a collection of more than 200 prompts for various tasks like generating a LinkedIn post or even an article. These prompts don’t only elicit different responses but also differ in style and structure. So they can be classified into different categories.

What are the different prompt categories?

Prompts can be divided into different categories based on the structure they use to elicit the desired response. While there are more, we have listed the 5 major prompt categories below.

1. Information-seeking prompts: Designed to gather information and mostly ask questions like what and how.

2. Instruction-based prompts: Designed to give instructions to the language model.

3. Context-providing prompts: Used to provide more information to the language model to help it better understand the user's request.

4. Opinion-seeking prompts: Used to seek the opinion of the language model on a topic.

5. Role-based prompts: Used to assign a role to the AI model and the model responds while in that role.

What are ChatGPT parameters and why are they important?

ChatGPT’s performance relies on a complex web of parameters. Parameters refer to the variables that define its behavior and the kind of response it generates. ChatGPT 4 has nearly 170 trillion parameters that can be tweaked while prompt engineering to generate the desired responses. Look at some of the parameters you can use for better content writing.

"For something presumably as simple as an article title, there are several important things that we need to capture when developing this text. For optimal SEO performance, as it pertains to the Google Search Engine, we need to keep the length of the title to a maximum of 60 characters, we need to include a long-tail keyword, and we can optionally include an eye-catching emoji as well. The perspective counts, and we may need to develop the title from the buyer's point of view."
-Thomas Fuller, Digital Marketing Consultant

1. Temperature

This parameter refers to the randomness of the response generated. The value of the temperature lies between 0.0 and 1.0. Higher values produce a more creative and diverse response, whereas lower values produce a more deterministic and focused response. You can check out the table below for reference.

Temperature value Result
0.0 to 0.3 Formal and non-creative
0.3 to 0.7 Balanced tone
0.7 to 1.0 Creative and diverse tone

You can see in the image below how a higher temperature value (1.0) adds more creativity to the response achieved from the same prompt, while the prompt with a lower temperature value (0.1) returns a more formal response. This can help marketers control the kind of content produced by ChatGPT.

A screenshot showing how temperature value affects the response generated by ChatGPT

2. Top K

This parameter ranges from 1 to infinity and controls the number of next tokens considered when generating text. While generating text, ChatGPT has the potential to produce numerous suggestions and considering all of them can result in less relevant responses. Here, top K parameter decides how many suggestions should be focussed on while generating responses.

For instance, if top K is set to 4, ChatGPT will examine the top 4 options based on their likelihood. ChatGPT’s internal calculations rank these options. Lower top k produces more focused results based on the limited options, while a higher top K produces creative and varied results. You can see the same in the table below.

Top K value Result
1 to 5 Focused and deterministic content
5 to 10 Balanced between focused and diverse content
20+ More diverse and creative content

You can see in the image below how a lower top K value (1) returns a more specific and formal response while a higher top K value (2000) returns a response which is more creative. This helps marketers control the kind of content produced by ChatGPT.

A screenshot showing how top K value affects the response generated by ChatGPT

3. Top P

Sometimes, choosing the right top k value becomes challenging. This gives way to another strategy called top P, which ranges between 0 to 1. Like top k, where ChatGPT considers a specific number of options, top P is a strategy that considers the top options whose value adds up to a specific percentage.

For instance, if you choose 0.5 as your top P value, ChatGPT will consider the top options whose values add up to 50% of the total probability. A lower top P value results in a more focused and deterministic output and a higher top P value in a more creative and diverse output.

Top P value Result
0.0 to 0.3 Focused and deterministic content
0.4 to 0.6 Balanced between focused and diverse content
0.7 to 1.0 More diverse and creative content

Similar to the case of top K, you can see how a lower top P value (0.1) returns a more focused and formal response while a higher top P value (0.9) returns a response which is more creative. This also helps marketers control the kind of content produced by ChatGPT.

A screenshot showing how top P value affects the response generated by ChatGPT

4. Max tokens

ChatGPT has a limit on how much information it can process at once. This is measured in terms of tokens. A token is a small unit of information ranging between 1 and infinity. The Max tokens parameter allows you to limit the amount of information that ChatGPT can process and produce as a response.

For instance, if you set the max token limit as 60 and then ask a question that requires ChatGPT 80 tokens to process, it will cut off the extra to fit the input within 60 tokens and might lead to a confusing response. The same effect can be seen in the responses produced, which can be longer for higher max token values and shorter for lower max token values. You can see the same in the table below.

Max tokens value Result
10 to 50 Shorter responses
50 to 100 Reasonable length of response
100+ Detailed and extensive response

You can see in the image below how the value of max token control the length of the response generated. A lower max tokens value (20) generates a response that is much shorter than the one generated with a higher max token value (250). This helps marketers control the length of the content produced.

A screenshot showing how max token value value affects the response generated by ChatGPT

5. Presence penalties

Presence penalty, which ranges between -2.0 to 2.0, is a parameter that reduces the likelihood of repetition of words and phrases already appearing in the input text. So if a higher value of presence penalty has been assigned, ChatGPT refrains itself from repeating words already used in the prompt. In contrast, a negative value would result in repetitions of words from the prompt itself.

6. Frequency penalties

Frequency penalty, which also ranges between -2.0 to 2.0, is a parameter similar to the presence penalty but differs in a particular aspect. While presence penalties make ChatGPT refrain from using the words and phrases from the input, frequency penalties control the repetition of words and phrases that have appeared before in the output. A higher frequency penalty will refrain ChatGPT from repeating words and return newer words in the output.

Why should a marketer learn about prompt engineering?

Knowledge of prompt engineering benefits digital marketers in various aspects of their work. Take a look at some key advantages below.

1. Enhanced control

Knowledge of prompt engineering empowers content marketers with greater control over AI-generated content. They can craft specific prompts to produce content that aligns with their brand voice and objectives.

2. Improved efficiency

Being able to produce desired content easily and faster is a major benefit of knowing prompt engineering. Marketers can provide clear and specific instructions regarding the structure, format, etc., to streamline the process of desired content generation.

3. Adaptability to new technologies

The adoption rate of AI and natural language processing technologies is increasing. Marketers with prompt engineering skills are better prepared to adapt and leverage the new tools and platforms. It also gives them a better understanding of the AI-powered tools that they use in their day-to-day work.

4. To beat the competition

In this age of technology, AI is being widely adopted as a common tool across industries. Even in the marketing industry, the use of AI is widespread and marketers who have a better understanding of it have better chances of success. This understanding also helps marketers to level the playing field against bigger competitors.

Takeaways

Considering the different parameters in play while inputting a prompt helps you gain more control over the model’s behavior. They also allow you to structure your prompts better and get more relevant responses. Using them would greatly reduce the inaccuracy of responses and make ChatGPT more helpful and productive toward your specific goals.

What you should do next

Hey there, thanks for reading till the end. Here are 3 ways we can help you grow your business:

  1. Talk to an email expert. Need someone to take your email marketing to the next level? Mailmodo’s experts are here for you. Schedule a 30-minute email consultation. Don’t worry, it’s on the house. Book a meet here.

  2. Send emails that bring higher conversions. Mailmodo is an ESP that helps you to create and send app-like interactive emails with forms, carts, calendars, games, and other widgets for higher conversions. Get started for free.

  3. Get smarter with our email resources. Explore all our knowledge base here and learn about email marketing, marketing strategies, best practices, growth hacks, case studies, templates, and more. Access guides here.

Frequently asked questions

Some tips for using ChatGPT prompts are:
a. Be as specific as possible
b. Provide a context for your prompt
c. Use natural language
d. Use specific keywords
e. Make use of different parameters
f. Refer to prompt galleries

The best way to learn ChatGPT prompts is to read through some prompts in a prompt gallery like Mailmodo’s and try and test their variations in ChatGPT.

As a marketer, you must have a basic understanding of prompt engineering. That includes knowing the capabilities and limitations of AI models, setting clear contexts, providing specific instructions, structuring the prompts and evaluating generated content.

What should you do next?

Thanks for reading till the end. Here are 3 ways we can help you grow your business:

Group_102411_1fd1b38156

Get smarter with our email resources

Explore our email marketing guides, ebooks and other resources to master email marketing.

Transactional_email_within_your_marketing_plan_0532bc94ee

Do better email marketing with Mailmodo

Send app-like interactive emails with forms, carts, calendars, games, etc. to boost email ROI.

support_820ceb7ecf

Talk to an email expert

Get a 30-min. free email consultation with a Mailmodo expert to optimize your email marketing.

Was this post useful?

Improve your email marketing

With interactive emails, smarter automation workflows, AI-powered email content and higher conversions

Group_1110165311
Union_1_6200367a50