0% found this document useful (0 votes)
327 views106 pages

Material de Estudiante CPEFPC V042024 En-Compressed

Uploaded by

oggytrihp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
327 views106 pages

Material de Estudiante CPEFPC V042024 En-Compressed

Uploaded by

oggytrihp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • What are we going to learn?
  • Agenda
  • Chapter 1: Basic Level
  • Chapter 2: Basic Applications
  • Chapter 3: Intermediate level
  • Chapter 4: Applying Prompts
  • References

PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Who is Certiprof®?

Certiprof® is a certifying entity founded in the United States in 2015, currently located in Sunrise,
Florida.
Our philosophy is based on the creation of knowledge in community and for this purpose its
collaborative network is formed by:
• Our Lifelong Learners (LLL) identify themselves as Continuous Learners, demonstrating their
unwavering commitment to lifelong learning, which is vitally important in today’s ever-changing
and ever-expanding digital world. Regardless of whether or not they win the exam.
• Universities, training centers, and facilitators around the world are part of our network of ATPs
(Authorized Training Partners).
• Authors (co-creators) are industry experts or practitioners who, with their knowledge, develop
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

content for the creation of new certifications that respond to industry needs.
• Internal Staff: Our distributed team with operations in India, Brazil, Colombia and the United
States is in charge of overcoming obstacles, finding solutions and delivering exceptional results.

Our Affiliations

2
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Agile Alliance

Certiprof® is a corporate member of the Agile


Alliance.
By joining the Agile Alliance corporate program,
we continue to empower people by helping them
reach their potential through education. Every
day, we provide more tools and resources that
enable our partners to train professionals who
seek to enhance their professional development
and skills.
[Link]

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
certiprof/

IT Certification Council - ITCC


Certiprof® is an active member of ITCC. with the opportunity to know what path to take
after a certification.
One of the importance of being part of the
ITCC is how industry leaders collaborate with Some of the ITCC members
each other in an open format to explore new • IBM
or different ways of doing business that inspire • CISCO
and encourage innovation, establishing and • ADOBE
sharing best practices that allow us to extend • AWS
that knowledge to our community.
• SAP
• GOOGLE
certiprof has contribute with white papers in the • ISACA
Career Path Ways Taskforce a taskforce that
was implemented internally to offer students

3
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Credly

This alliance allows individuals and companies Companies issuing knowledge validation
certified with certiprof® to have a worldwide badges with Credly:
distinction through a digital badge. • IBM
Credly is the world's largest badge issuer, and • Microsoft
leading technology companies such as IBM, • PMI
Microsoft, PMI, Nokia, and Stanford University, • Universidad de Stanford
among others, issue their badges with Credly. • Certiprof
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Badge

[Link]

4
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Lifelong Learning

• Certiprof has created a special badge to recognize consistent learners.


• By 2024, more than 1,000,000 of these badges have been issued in over 11 languages.
Purpose and Philosophy
• This badge is intended for people who firmly believe education can change lives and transform
the world.
• The philosophy behind the badge is to promote commitment to lifelong learning throughout life.
Accessing and Earning the Badge
• The Lifelong Learning badge is awarded at no cost to those who identify with this approach to
learning.
• Anyone who considers themselves to be a lifelong learner can claim their badge by visiting:

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
[Link]

5
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Digital Badges
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

According to a study by the IT Certification Council (ITCC), people knew little about digital badges
years ago. Today, large companies and educational institutions around the world issue badges.
Digital badges contain detailed metadata about who earned them, the competencies required, and
the organization that issued them. Some badges are even linked to the activities needed to attain
them.
For companies and educational institutions, badges and the information they provide are so
important that many decisions, such as hiring or admission decisions, are based on the data they
provide.

6
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Why are they important?

• Ease of Sharing and Verifying Achievements:


Digital badges allow professionals to showcase
and verify their achievements instantly and globally.
According to a Credly report, LinkedIn profiles
with digital badges receive 40% more attention
from recruiters and employers.

• Visibility on Digital Platforms:


In a survey conducted by Pearson and Credly, 85%
of users who earned digital badges shared them
on LinkedIn, and 75% reported that this improved

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
their professional credibility in their networks.
In addition, 76% of employers surveyed said that
digital badges help them quickly identify specific
skills.

• Hiring Impact:

A study by the International Project Management


Association (PMI) found that candidates who
display project management digital badges are
60% more likely to be hired compared to those who
only mention their skills without digital verification.

7
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

• Personal Brand Empowerment:

Digital badges' instant visibility and verification allow professionals to demonstrate their skills and
build a solid personal brand. According to a LinkedIn study, professionals who use digital badges
are 24% more likely to advance in their careers.
Certification and digital badges validate knowledge and are powerful tools for continuous
improvement and employability. In a world where lifelong learning has become the norm, these
credentials are key to professional development and competitiveness in the global job market.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Not all badges are created equal, and at certiprof, we are committed to offering you more than
just digital recognition. By earning a badge issued by certiprof, you will receive a validation of your
knowledge backed by one of the world's leading professional certification bodies.

Take the next step and earn the badge that will open doors and position you as an expert in
your field.

8
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Why getting your certificate is essential?

Proof of Expertise: Your certificate formally acknowledges the skills and knowledge you’ve
acquired. It serves as verifiable proof of your qualifications and demonstrates your commitment to
excellence in your field.
Credibility and Recognition: In today’s competitive job market, employers and peers value
credentials that distinguish you from others. A certification certificate from a recognized institution,
like Certiprof, provides instant credibility and boosts your professional reputation.

Career Advancement: Having your certificate


can open doors to new opportunities. Whether
it’s a promotion, a raise, or landing a new job,

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
certifications are critical differentiator employers
look for when evaluating candidates.
Networking Opportunities: Holding a
certificate connects you with a network of
certified professionals. Many organizations
have alumni or networking groups where you
can share experiences, exchange ideas, and
grow your professional circle.
Personal Achievement: Earning a certification
is a significant accomplishment, and your
certificate is a tangible reminder of the hard
work, dedication, and progress you’ve made. It’s
something you can be proud of and showcase to
others.

9
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

10
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

What are we going to learn?

This course focuses on the application of Prompt Engineering (PE) techniques.

PE is defined as the ability to interact with artificial intelligence (AI) effectively to achieve specific
objectives. In a context where advances in AI are becoming more and more prominent, this competence
becomes a crucial element.

Chapters
1- Basic level: This section introduces the basic concepts of Generative Artificial Intelligence,
Command or Question Generation, Command Engineering, Chatbots and other related topics.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
2- Basic applications: We will learn how to use basic knowledge to address simple and common
situations.

3- Intermediate level: We will study Prompt Engineering (PE) and simple PE techniques in more
depth.

4- Application of Commands: Complete examples of the PE process.

11
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

AGENDA

Digital Badges 6
Why are they important? 7
Why getting your certificate is essential? 9
What are we going to learn?  11
Chapters 11
Chapter 1 : Basic Level 14
Content 15
Introduction to Artificial Intelligence (AI) 16
Importance 16
Understanding Artificial Intelligence 17
Understanding Artificial Intelligence 18
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

LLMs "Language Model" 18


Prompting 19
Giving instructions 20
Role Prompt 21
Shot prompting 22
Combining techniques 25
Parts of a Prompt  26
Prompt Engineering 27
What is a Chatbot? 28
Style Guide 29
Preliminary Induction 31
LLM Traps 33
Configuring Chatbots 33
Structuring the Conversation 34
Structuring the Conversation 34
Instructions for Special Cases 35
The Prompt Learning Method  35
Practice37
Generative AI Professional Certification 41
Chapter 2: Basic Applications 42
Contents43
Introduction44
Data structuring  44
Write an email 46
Blogs 50
Study tools 51
Code assistance 53
Digital Marketing 60
Finding emojis 64
Contracts 65

12
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Different writing styles 68


Summarizing text 70
Different writing styles 70
Artificial Intelligence Professional Certification 73
Chapter 3: Intermediate level Introduction to Prompt engineering and simple techniques 74
Contents 75
Chain of Thought 76
Zero shots Chain of Thoughts 77
Self-consistency 78
Knowledge generated 80
Prompting from less to more 83
Handling Long Form Content 85
Reviewing Roles 87
Format of the prompt 88
AI Risk Manager Professional Certification 89

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Chapter 4: Applying Prompts 90
Contents 91
Introduction 92
Single choice questions 92
Discussion questions 95
Recommendations 95
ChatGPT as of GPT-3 97
Chatbot + knowledge base 98
Intent-based chatbots 99
How can GPT-3 help? 99
How Could a Chatbot Work with GPT-3? 99
Response Generation with GPT-3 100
Problems Generating Responses with GPT-3 102
References 103

13
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

14
Level
Chapter 1 : Basic
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Content

• Introduction to Artificial Intelligence and its importance.

• How do AIs work?

• Prompting

• Giving instructions

• Role prompt

• Few shot prompting

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
• Combining techniques

• Formalization of prompt

• Prompt Engineering

• Chatbot Basics

• LLM traps

• Configuring Chatbots

• Prompt learning method

15
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Introduction to Artificial Intelligence (AI)

• AI represents a field in which algorithms are


being developed that mimic the ability to
"think" like humans, enabling them to perform
diverse tasks such as writing, problem solving
and artistic creation.

• Sophisticated AIs now exist, capable of


writing persuasive emails, generating
newspaper articles and even excelling in art
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

competitions.
• It has a significant impact on a variety of industries, including journalism, healthcare and
education.

• To get the most out of AI, it is essential to provide it with precise direction; it requires clear
instructions to perform properly.

Importance

• Offers the ability to automate tasks that can


currently consume a large amount of your
time

• It helps to perform any task that is constantly


repeated on a routine basis, from drafting
emails to creating reports or even coding.

16
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Understanding Artificial Intelligence

• There are many AIs available, some are more effective than others. We can classify them as
follows:

Types of generative AIs: They can


generate images, music, text and
videos.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Discriminating AIs: They are used
to classify things, such as images.

IAs: Mainly
Mainprincipales:
IAs GPT-3 and
Principalmente,
ChatGPT
se are used
usan GPT-3 in the course.
y ChatGPT en el
curso.

17
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Understanding Artificial Intelligence

• Differences between GPT-3 and ChatGPT: Features GPT-3 ChatGPT

ChatGPT is an adaptation of GPT-3 that


To generate text in
has been specifically tuned to improve its Dialoguing with
conversational performance, making it more Typical use a variety of
users
suitable for chat and dialog applications applications

compared to the base GPT-3 model.


Tuned to improve
• Recommendations: Developers tend to It is not tuned for a its performance in
prefer GPT-3 for its reproducibility, while non- Tuning
specific use case natural
developers may find it easier to use ChatGPT.
conversations
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

No memory of Can recall and


Contextual
previous continue a
conversation
conversation conversation

LLMs "Language Model"

• Language model based on artificial intelligence.

• These models, such as GPT-3, are AI programs designed to understand and generate natural
language text.

• They are able to answer questions, complete sentences, generate creative text and perform a
variety of tasks related to natural language processing.

18
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Prompting

The action of providing a specific instruction, question or command (prompt) to an Artificial Intelligence
(AI) in order to request a desired response or action.

Example: I have an article and I ask the artificial intelligence to summarize it in one sentence:

This is the prompt


(command)

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Summarize the following paragraph in one sentence:

The development of Artificial Intelligence drives different industries to be interested in


benefiting and generating advances together to contribute to the needs that the
environment demands, and that have become fundamental problems for the search of
solutions, and thus avoid the uncertainty of how to face so many challenges that
science proposes. Among these industries, the health sciences stand out, since they
have a greater demand to provide answers to diseases and treatments, and who better
to work together than the better to work together than Artificial Intelligence. It is here
when we identify the problem and the need to start joining forces and work in favor of
new technologies and health, contributing positively with the needs of the human
being.
To understand how Artificial Intelligence has achieved in the last years a useful
advance for different sectors, the doubts about its operation, what purposes it will
have, its needs in the digital media as an intermediary between people and how all
these uncertainties can contribute to be directed to medicine.

19
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

This is the AI response

The development of Artificial Intelligence has spurred collaboration between various


industries, especially in the healthcare field, to address key problems and take advantage
of its advances in the search for solutions, highlighting the importance of working
together in the integration of new technologies for the benefit of human health.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Giving instructions

Example:

The purpose of this prompt is to write a hotel reservation confirmation message from an existing
message, but removing any personal information and replacing it with placeholders.

This is the prompt


(command)

Remove personal information from a hotel booking confirmation message and replace it with placeholders. For
example, replace the guest's name with 〔NAME〕:

Dear Mr. Juan Perez,

We confirm your reservation at our hotel for the dates of November 10-15. We are excited to welcome you to
our hotel and hope you have an enjoyable stay with us.

Sincerely yours,
Hotel Example
Tel: 123-456-789
email: info@[Link]

20
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

This is the AI response

Dear 〔NAME〕,

We confirm your reservation at our hotel for the dates from 〔BEGIN_DATE〕 to 〔
END_DATE〕. We are excited to welcome you to our hotel and hope you have an
enjoyable stay with us.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Sincerely yours,
Hotel Example
Tel: 〔Phone number〕
email: 〔ELECTRONIC_MAIL〕

Role Prompt

Prompt used to define the function or role you want the AI to play in a specific interaction or task.

Example:

Role Prompt: “Act as a virtual weather assistant and provide tomorrow’s weather
forecast for New York City."

Rol Prompt Response: "The weather forecast for tomorrow in New York City is
sunny, with a high of 28 degrees Celsius and a low of 15 degrees Celsius. No rain is
expected, so it's a good day for outdoor activities."

21
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Shot prompting

Generation of commands with samples

AI is trained to perform tasks or generate consistent responses with a small number of training ex-
amples or "samples".

0- shot 1 - shot Few - shots


CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

It implies that the AI can generate coherent responses without having seen examples of that type of
request during its training.

0- shot

22
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example:

0-shot prompting: "Explain to me Einstein's theory of relativity."

0-shot prompting answer: "Einstein's theory of relativity is a physical theory proposed by


Albert Einstein in the early 20th century. It is divided into two parts: special relativity and
0- shot general relativity. Special relativity, published in 1905, states that the laws of physics are
the same for all observers moving at constant velocities. On the other hand, general
relativity, published in 1915, extends this idea by treating gravity as a curvature of space-
time caused by mass. This theory has had a profound impact on modern physics and
cosmology."

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
The AI must have access to a single instance or example of a request or command to understand
and perform a similar task in the future.

1- shot

Example:

Prompt: "Below is a sample question and answer related to a specific movie. Provide an
answer based on the example provided.

Example:

1- shot Question -'Who is the director of the movie "Titanic" (1997)?’


Answer -'The director of the movie "Titanic" (1997) is James Cameron.’

Question -'Who is the director of the movie 'Avatar' (2009)?’

1-shot prompting answer:


* Question - "Who is the director of the movie 'Avatar' (2009)?"
* Answer - "The director of the movie 'Avatar' (2009) is James Cameron."

23
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Few- shot

AI is trained to perform tasks or generate coherent responses with only a small number of training
examples or "samples".
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Prompt Example:

Below are three text fragments related to important scientific theories and scientific
discoveries. Provide a brief description of each discovery theory based on the excerpts
provided.

Examples:

Few- shot Fragment - 'Albert Einstein's theory of relativity revolutionized physics and changed our
understanding of space and time.’
Fragment -'Alexander Fleming's discovery of penicillin marked a milestone in medicine by
introducing antibiotics.’
Fragment -'The Big Bang theory suggests that the universe began in an extremely hot and
dense state billions of years ago.’

Now, briefly describe using the same format the theory of evolution.

AI Response:

**Fragment – ‘The theory of evolution, proposed by Charles Darwin, explains how species change and
adapt over time through natural selection'.

24
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Prompt: Here are some historical facts about


famous musicians. Use these examples to
answer the additional question.

Q: 'Who is considered the "King of Rock and


Roll"?'
A: 'Elvis Presley.'
Few- shot Q: 'What was the Beatles best-selling album?' -
A: ''Sgt. Pepper's Lonely Hearts Club Band'."

Q: ‘What was Michael Jackson's best-selling


album?’

IA Response:

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
The Prompt can be done in Question- A: ‘Michael Jackson's best-selling album is
Answer format. “Thriller”.’

Here is an example:

Combining techniques
There is context, instructions and example

Prompt: Below are a number of social media comments. Your task is to classify each comment as "Positive" or "Negative"
based on the overall tone of the message. Use your knowledge to determine whether the comment reflects a favorable or
unfavorable attitude.

Examples:
Comment - "I loved that movie! It was an amazing experience."
Classification: 〔POSITIVE〕

Comment - "I can't stand this song. It's really bad."


Classification: 〔NEGATIVE〕.

Comment - "Today was a wonderful day at the beach!"


Classification: 〔POSITIVE〕

Comment - "The customer service from this company is terrible. I will never shop here again."
Classification: 〔NEGATIVE〕.

Comment - "Thank you all for the birthday wishes. I feel very fortunate to have such amazing friends."
Classification:

25
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Parts of a Prompt

Role

Instruction/task

Question

Context
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Examples (few)

Prompt:

Role You are a tour guide in a natural history museum.

Your task is to provide information to visitors about the dinosaur exhibit and answer
Instruction/task their questions.

The natural history museum features an impressive dinosaur exhibit that includes
Context full-scale replicas and authentic fossils. Visitors are interested in learning about the
history of dinosaurs and their characteristics.

For example, "How long did dinosaurs live?"


Examples (few) Answer: "Most dinosaurs lived during the Mesozoic period, which spanned from
about 180 million years ago to 65 million years ago. Some species lived longer than
others, but in general, dinosaurs existed over a long period of geologic time."

One question A visitor asks you, "What is the largest dinosaur ever discovered?"

26
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Prompt Engineering

Command engineering

The action of gradually improving our prompt


over time.

It consists of finding the most effective way


to communicate with the AI to obtain the
desired response.

Prompt engineering skills are acquired


largely through constant practice and trial-
and-error experience.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
First Prompt Attempt (Not optimized):

• You type: "Paris tourist places".


Generated response: The response includes a list of tourist places in Paris,
Command engineering •
but the information is brief and not very detailed.

Prompts Engineering (Optimization):

After analyzing the results of the first attempt, you decide to refine your
Example

prompt to get more detailed information.
• Your new prompt: "Please provide a detailed description of the five most
popular tourist sites in Paris including information about their history,
location and nearby attractions".

Response generated after prompt engineering:

• The response includes detailed descriptions of the five most popular tourist
sites in Paris, with information about their history location and nearby
attractions.

In this example the prompt engineering process involves adjusting and


improving the question or instruction you give to the AI search engine. The first
attempt generated basic results, but by refining the prompt, you were able to get
more detailed answers relevant to your specific query. This is an example of
how prompt engineering can influence the quality of the answers generated by
an AI model.

27
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

What is a Chatbot?

A computer program that simulates a human conversation and is used to interact with users, answer
questions, provide information and perform specific tasks.

The true benefit of chatbots is only unlocked when they are personalized with your cues. We will
learn some fundamental techniques to improve the performance of Chatbots, such as adopting a
style guide, incorporating descriptors and improving the initial experience a user has.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

28
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Style Guide

It consists of asking the AI to communicate following a specific style. When a style guide is not used,
ChatGPT usually provides brief responses of one or two paragraphs and not very precise.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
First prompt without style guide:

Can you summarize the Lord of the Rings for me

AI Response

"The Lord of the Rings" is an epic work of fantasy written by J.R.R. Tolkien. The story follows
Frodo Baggins and a group of characters on their quest to destroy a powerful evil ring that
could plunge the world into darkness. Along their
s journey, they face dangers, forge
friendships and fight evil. The story deals with themes of courage, friendship, power and the
struggle between good and evil in a world full of fantastical races and magical places.

29
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Prompt with style guide:

You can summarize the Lord of the Rings in a poem for me

AI Response
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

In Middle-earth where shadows grow,


A hobbit brave with friends in tow.
To Mordor's fires, they dare to go,
To end the darkness, overthrow.

With fellowship, they face their fears,


Through battles fierce, through joyful
tears.
The One Ring's power they must sever,
To bring forth light and peace forever.

Through fire and shadow, they tread on,


Till the Ring of Sauron is gone.
In triumph, weary yet strong,
Their victory echoes in song.

30
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Other examples of Prompt with style guide:

• Describe what plant taxonomy is as if you were a botanist with a PhD, specialist in the Amazon.
Give tropical examples and use a very academic vocabulary.

• Describe plant taxonomy as if you were a botanist but you are talking to a 7-year-old girl. Use
examples with some humor to make the explanation more enjoyable.

Preliminary Induction

The way you phrase the first instruction in a chat at the start of the interaction with the AI can have
an impact on the development of the conversation as a whole, giving you the opportunity to add an

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
additional layer of order and detail.

31
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example of prompt with initial indication:


"Culinary Expert" The expert should have a style that reflects extensive culinary knowledge and subject matter expertise. Use an
academic syntax and offer detailed, technical advice on culinary techniques and recipes. Your language should be sophisticated
but accessible. If you don't know the answer to a question, ask for more details.
"The amateur" should speak from the perspective of an intermediate culinary enthusiast, using an informal tone and examples
from everyday life to understand culinary concepts. If you do not know the answer to a question, indicate that you are willing to
learn. Both participants should contribute to the conversation in a series of conversational paragraphs.

“Review" means to analyze the given text and provide comments.


"Summarize" means to provide key details of a text.
"Reply" means to answer a question from the given perspective.

Anything in parentheses () indicates the perspective from which you are writing.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Anything between curly braces {} is the subject you are involved in.
Anything in square brackets [] is the action you should take.

Example: (The amateur){Gastromy}[Reply] Hi, I have a question about the caramel technique. Can you explain how to achieve a
perfect caramel?

AI response without preliminary indication

Steps to make a perfect caramel:

1. Ingredients: Sugar, corn syrup (optional), water and other flavors if desired.
2. Preparation: Gather all the necessary ingredients and utensils.
3. Cooking: Bring sugar, corn syrup (if using) and water to a boil in a saucepan
without stirring.
4. Use a thermometer: Cook until it reaches 150-160°C (300-320°F) for a hard
caramel.
5. Check the color: The color depends on the cooking time.
6. Add extra ingredients: Add butter, cream or flavors if desired.
7. Cool: Pour into a tray and let cool to room temperature.
8. Cut and store: Cut into pieces and store in a cool, dry place.

32
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

LLM Traps

Biases: LLMs tend to produce


Citing sources: Most LLMs have
responses that are often influenced by
difficulty accurately referencing stereotypes. They can sometimes
their sources as they lack Internet express sexist, racist and homophobic

access and cannot accurately recall comments. It is important to be


cautious when using LLM in public-
the origin of their information.
facing applications.

Illusions: LLMs tend to provide


Arithmetic LLMs generally have
incorrect information when asked a
difficulty with mathematics. Solving

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
question for which they have no simple math problems is often a
knowledge. Occasionally, they may challenge for them, and they are often

recognize that they do not know the unable to tackle math problems

answer. accurately.

Configuring Chatbots
You are a clownGPT. Always talk to me like you're a clown. Start by
introducing yourself
You can set the structure and style of a
conversation by using a first prompt to Hello, my little friend! I'm the GPT Clown, the funniest clown in the virtual
world! Are you ready to have a fun time full of laughter? Yes, I am! How can I
"start" a Chatbot. This provides detailed help you today, my little friend?
control over your entire conversation.

Example Why do you have a red nose?

Oh, my red nose is magic! It helps me spread laughter and joy everywhere.
When I touch it, I can make jokes and tell funny jokes! Do you want to hear
one? Of course you do, of course you do!

Yes

Great! Here's one:


What's a bee doing in the gym? Zum-ba!
Ha ha ha! I hope it brought a smile to your face, my friend! If you want more
jokes, just ask! ha ha ha!

33
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Structuring the Conversation

Example of prompt:

Please act as a virtual tour guide. Each time I provide you with information about a
place or destination, please respond in this format:

Place or destination: (e.g. Paris, New York)

Interesting: (yes, no or a little bit).

Recommendations: Comments and recommendations about the place or


CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

destination.

If you understand, simply say "YES".

Structuring the Conversation


I am ready to act as a virtual tour guide. I am ready to act as a virtual
tour guide. Please provide the place or destination you want me to
describe, and I will be happy to share interesting information and
recommendations about it.

AI response:
Costa Rica

Place or destination: Costa Rica

Interesting: Yes

Recommendations: Costa Rica is a fascinating country known for its


amazing biodiversity. Here are some recommendations:

1. Manuel Antonio National Park: This park is famous for its natural
beauty and diversity of wildlife. You can hike through the jungle,
swim at its beaches and observe monkeys and sloths.
2. Arena Volcano: Visit this impressive active volcano and relax in the
nearby hot springs. It is a perfect place to enjoy nature and
relaxation.
3. Monteverde Reserve: This cloud forest reserve is a paradise for
bird lovers and wildlife watching. You can walk through hanging
bridges and explore an ethnical ecosystem.
4. Pacific and Caribbean beaches:Costa Rica has a variety of beautiful
beaches on both coasts. If you like surfing, you can find excellent
waves in places like Tamarindo and Puerto Viejo.
5. Tortuguero National Park: If you visit in the right season, you can
witness the nesting of sea turtles in this national park. It is a once in
a lifetime experience.

34
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Instructions for Special Cases

They are used to verify certain things Suppose you have a chatbot that provides health and wellness information, but you
want to prevent users from using the chatbot to search for medical diagnoses
in the user's input and respond without consulting a health professional. You can implement a special instruction like
accordingly. This could include this:
checking for toxic comments, illegal
unblocking attempts, or students Special Case Instruction: Avoid medical diagnoses.

trying to use artificial intelligence to When a user enters medical symptoms and searches for a diagnosis, instead of
cheat. providing a direct diagnosis, the chatbot could respond as follows:

User: "I have a fever and a sore throat, what illness do I have?"

Chatbot: "I understand that you are experiencing troubling symptoms. However, I
am not a medical professional and cannot diagnose illnesses. I strongly recommend

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
that you consult a physician or health care professional for a proper evaluation. If
Example you would like general symptom information or health tips, I will be happy to provide
you with useful information.“

This approach helps ensure that users do not rely on the chatbot for medical
diagnoses, promoting instead seeking appropriate medical care.

The Prompt Learning Method

The Problem Solving Learning Method with


Generative AI is an approach to address issues in
the field of artificial intelligence involving content
creation. This method helps to assess whether
this technology is the right choice, how to apply
cue engineering, which tools to use and other
relevant aspects.

35
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

-Steps-

State a Propose Launch


problem a solution your
solution

Examine Adjust
relevant the
information solution
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

-Case study

Let's look at a case study on how the Prompt Learning Method could be used to create a chatbot from
scratch.

Problem: We have a significant volume of user questions related to travel destinations,


recommendations, itineraries and tips. We need to address this problem to provide our users with
useful information and improve their experience.

Examine relevant information: We analyzed the user queries we have collected. We observed that
the most frequent queries include requests for travel recommendations, details about specific tourist
sites, and travel planning tips. We also investigated existing travel chatbots, assessing their ability to
provide accurate and useful information.

Propose a solution: Based on our analysis, we decided to create a chatbot using ChatGPT that
can answer user questions related to travel and tourist destinations. We designed an initial prompt:
"You are a tourism expert who knows the whole world. A customer interested in learning about travel
destinations asks you a question. Answer his question in a useful and informative way: USER_INPUT".

36
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Adjust the solution: We test our initial directions with a small group of users and collect their feedback.
Based on their feedback, we realize that our Prompt needs to be more engaging and less formal: "You
are a tourism expert who knows everyone. A customer interested in learning about tourist destinations
asks you a question. Answer their question in a useful, friendly and informative way: USER_INPUT"

Launch your solution: We launch the


chatbot on our website. We continue to
monitor user interactions with the bot
and make additional adjustments as
needed.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Practice

This practice is based on three steps:

Step 1: Research

Step 2: Experimentation

Step 3: Feedback and Iteration

37
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

This practice is based on three steps: Research the topic you are interested in
exploring. In addition to searching Google,
there are additional resources that are
Step 1: Research extremely useful:

• Awesome ChatGPT Promzpts


• FlowGPT
• r/PromptDesign (and similar subreddits)
Step 2: Experimentation
• Learn Prompting Discord (and other
relevant Discords, including OpenAI
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Discord)

Step 3: Feedback and Iteration

This practice is based on three steps:

Step 1: Research
Set the first prompt in ChatGPT.
For example:

"I want you to act as a history expert. I will


make questions and you will provide answers
Step 2: Experimentation
based on historical facts. My first question is
about the French Revolution.“A

Step 3: Feedback and Iteration

38
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

This practice is based on three steps: First AI response:


Answer:
The French Revolution was a tumultuous period that took place in France from 1789 to
1799. It was characterized by a series of major events and changes in French and

Step 1: Research European society. Here is an overview of the main events:

1. Economic Crisis: The Revolution began in part due to a severe economic and
financial crisis in France. The country was in debt after the wars and the support
for independence from the United States.
2. Estates General: In 1789, King Louis XVI convened the Estates General, a
representative assembly that included representatives of the nobility, the clergy
and the third estate (the People). This led to the emergence of the National
Assembly.
3. Storming of the Bastille: On July 14, 1789, Parisians seized the Bastille prison,
a symbol of monarchical absolutism. This event marked the beginning of the
Revolution.

Step 2: Experimentation 4. Declaration of the Rights of Man and of the Citizen: In 1739, this declaration
proclaiming the fundamental rights and freedoms of citizens, inspired by the

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
ideals of the Enlightenment, was adopted.
5. Land Reform and Abolition of Privileges: The Revolution led to radical reforms,
including the abolition of the privileges of the nobility and clergy, as well as the
redistribution of church and noble land.
6. Reign of Terror: During 1793-1794, the Revolution experienced a period known
as the Reign of Terror, led by Maximilien Robespierre. It was characterized by
mass executions and political repression.
7. Rule of Napoleon Bonaparte: The Revolution culminated in Napoleon's coup
d'état in 1799. He became First Consul and later Emperor, carrying with him

Step 3: Feedback and Iteration 8.


many of the revolutionary reforms.
Legacy: The French Revolution left a lasting legacy in terms of civil rights, the
secularization of society and the spread of democratic ideas throughout Europe.

These are just some of the key moments of the French Revolution. If you have more
questions or need additional details on a particular aspect, please don't hesitate to ask.

This practice is based on three steps:

Put a more detailed prompt in ChatGPT.


For example:
Step 1: Research
"I want you to act as an expert on history. I will pose
questions and you will provide concise answers
based on historical facts. Answer in a single

Step 2: Experimentation paragraph format and do not add unnecessary


details. Whenever you speak, begin your paragraph
with Date, place, Major accomplishments, lessons
learned. My first historical fact is the French
Revolution".
Step 3: Feedback and Iteration

39
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

This practice is based on three steps:


Second AI response:

Step 1: Research Date: The French Revolution took place from 1789 to 1799 in France.
Place: It developed mainly in France, but its influence spread throughout Europe.
Main achievements: The French Revolution led to the fall of the French monarchy,
the creation of the First French Republic, the execution of Louis XVI and Marie
Antoinette, the abolition of the privileges of the nobility and the clergy, the
promulgation of the Declaration of the Rights of Man and of the Citizen, and the
propagation of democratic ideas.
Step 2: Experimentation Lessons: The French Revolution illustrated the ability of the people to bring about
significant political and social change, but also highlighted the dangers of
radicalization and violence in revolutionary movements. Her legacy includes the
promotion of human rights and the human rights and the inspiration for future
liberation movements around the world.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Step 3: Feedback and Iteration

This practice is based on three steps:

Step 1: Research

Share your work with many people to get their

Step 2: Experimentation opinions. If they like it, great. If not, start over
and continue to make adjustments until you find
a solution that satisfies both parties. It is
important to remember that this is an ongoing
process, as challenges and people evolve over
Step 3: Feedback and Iteration time.

40
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Generative AI Professional Certification

Benefits
• Expanded knowledge in AI, preparedness for AI project management, ability to assess the impact
of AI in the workplace, improved competitiveness and operational efficiency.

Skills Developed
• Understanding of AI models, machine and deep learning fundamentals, identification and
application of AI in various contexts, AI project management, and assessment of AI security
concerns.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

[Link]
products/generative-ai-professional-certification-gaipc

41
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

42
Applications
Chapter 2: Basic
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Contents

• Data structuring

• Write an email

• Blogs

• Study tool

• Code assistance

• Digital marketing

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
• Finding emojis

• Contracts

• Different writing styles

• Summarizing text

43
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Introduction

Having gained an understanding of some fundamental prompt engineering techniques, it is time to


explore how these skills can be used to address simple, everyday problems.

In this section, we will dive into practical tasks such as drafting emails and creating contracts,
illustrating how prompt engineering can be a valuable tool in day-to-day situations.

The following examples will highlight the versatility of the applications that can be achieved using
this technique.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Data structuring

• A practical and exciting example of leveraging


LLMs involves structuring data in the form of
tables.

• For example, if you have an extensive collection


of dates and data on a topic and want to
concisely summarize all relevant aspects in a
table that you can later import into a spreadsheet
or database.

• In this task, chatbots such as ChatGPT can


provide valuable assistance.

44
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example:
Summarize the following text in the form of a paragraph, write the years and the
Prompt: most important events of each year:

The history of artificial intelligence dates to the introduction of the universal machine in 1936,
marking the beginning of the evolution of machines toward intelligence. Over the years, important
milestones include the proposal of the Turing test by Alan Turing in 1950 and the formal definition of
the term "artificial intelligence" at the Dartmouth conference in 1956 by John McCarthy, Marvin
Minsky and Claude Shannon. In 1966, "Eliza", the first chatbot, was created. chatbot was created,
and in 1987 the attributes of an intelligent agent were described. Subsequent advances later include
the creation of Polly, the first robot with artificial vision in 1993, the victory of IBM's Deep Blue over
the world chess champion in 1997, and the development of virtual assistants by Apple, Google and
Microsoft in 2011. In 2012, Google succeeded in making a computer learn to identify human
images. More recently, in 2017, the Libratus algorithm defeated professional poker players, and in

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
2018, artificial intelligence was consolidated in the automotive industry. Finally, in 2020, the "Low
Code" system was implemented to facilitate the use of artificial intelligence by inexperienced users.

Here is a table summarizing the most important years and milestones in the

Example: history of artificial intelligence.

Year Milestones

This is the AI response: 1936 Introduction of the universal machine.

1950 Proposal of the Turing Test by Alan Turing.

1956 Formal definition of the term "artificial intelligence" at the Dartmouth conference by
John McCarthy, Marvin Minsky and Claude Shannon.

1966 Creation of "Eliza", the first chatbot.

1987 Description of the attributes of an intelligent agent.

1993 Creation of Polly, the first robot with machine vision.

1997 Victory of IBM's Deep Blue over the world chess champion.

2011 Development of virtual assistants by Apple, Google and Microsoft.

2012 Google's achievement in making a computer learn to identify human images.

2017 Victory of Libratus algorithm over professional poker players

2018 Consolidation of artificial intelligence in the automotive industry.

2020 Implementation of the "Low Code" system to facilitate the use of artificial intelligence
by inexperienced users.

45
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Write an email

• Writing emails can often be a time-consuming task, especially


when it is necessary to previously review a received email. In
this section, we will explore situations ranging from sending a
simple email to notify your supervisor that you are not feeling
well to drafting more elaborate emails to prospective clients
with whom you have no prior history of communication.

Example 1: Business mail


CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Prompt:

My name is Marta. I want to write an email dated today to the human resources department
of company X, because I need to leave early to go to a medical appointment.

Subject: Early Absence Request for Medical Appointment - [Date]

Dear Human Resources Team,

Example 1: Business mail I hope you are well. My name is Marta [Your Last Name] and I am [your position or
department] at X company. I am writing to you regarding an early absence request
for [date of medical appointment].

This is the AI response: I have scheduled an important medical appointment that I am unable to
reschedule, and it is scheduled for [appointment time]. Because of this, I need to
request permission to be absent early on that day, specifically from [start time of
your absence]. My intention is to ensure that my work responsibilities are covered
during my absence and to ensure a smooth workflow.

I am willing to take the necessary steps to ensure that my work is not adversely
affected during my absence, either by reassigning tasks or completing my work
before I leave.

I appreciate your understanding and cooperation in this matter. I remain at your


disposal to discuss any further details and to ensure that this absence does not
cause unnecessary inconvenience.

I look forward to hearing from you and thank you in advance for your attention to
this request.

Sincerely,
Marta [Your Last Name]
[Your contact number]

46
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 2: Style modifiers

You can ask the AI to change the style of an email, for example to make it more
user-friendly:

Write a humorous email to invite my friends to a party at my house to celebrate my


birthday, we will have a barbecue, ask them to bring their drinks.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Example 2: Style modifiers

Hello my dear friends!


This is the AI response: It's that time of the year again, the time when I turn a year wiser (at least I hope
so). But don't make me feel older alone, help me celebrate!

Date: [Date of your birthday].


Time: We start at [Start time, you can put a funny time]!
Place: My house (we haven't moved it since the last time you came!)

The plan is simple: I provide the barbecue and you bring the drinks. The rule?
The most creative drink wins a special prize (I haven't decided what it is yet, but
it'll be great!).

Don't worry about gifts, your presence is more than enough (although I will
accept cakes, just in case).

So, will you do me the honor of joining me on this journey into old age? Please
confirm before [date of confirmation] so that we don't buy too much meat.

I hope to see you at the most fun party of the year! I promise the fun will
outweigh the age!

47
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 3: Summarizing emails.

The AI can be asked to summarize very long


emails and determine what the key
information is. This is an example of an
email received:
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Example 3: Summarizing emails.

Prompt: Make a summary of the email and tell me what are the tasks to be performed.

Email summary:

AI Response: The science teacher emphasizes the importance of science and the scientific
method in everyday life and learning. She explains that science is fundamental to
understanding the world and how the scientific method allows us to investigate in a
systematic way. She then announces two tasks related to the scientific method for
students to complete.

Tasks to Complete:

1. Formulate a scientific question and design an experiment to answer it.


2. Research and present a case study that demonstrates the application of the
scientific method in real-world situations.

48
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 4: Writing generic emails

Unsolicited generic emails are messages sent to people you don't know. Getting a
response from these emails can be difficult, so it can be beneficial to send a large number
of personalized emails on a one-to-one basis.

Prompt:

Company name: Lula Sandals


My name: Andrea

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Write a cold disclosure email to this founder, named Maria Mercedes, offering our
product, which is an all-terrain sandal. Make the email formal but approachable.

DEAR MARIA MERCEDES,

I HOPE THIS MESSAGE FINDS YOU WELL. MY NAME IS ANDREA AND I REPRESENT A COMPANY THAT HAS BEEN DEVELOPING A
PRODUCT THAT WE BELIEVE COULD BE OF GREAT INTEREST TO LULA SANDALS.

AI Response:
AT LULA SANDALS, YOU HAVE DEMONSTRATED AN EXCEPTIONAL COMMITMENT TO THE QUALITY AND COMFORT OF THEIR
PRODUCTS, AND WE WANT TO OFFER A PROPOSAL THAT CAN PERFECTLY COMPLEMENT YOUR FOOTWEAR LINE.

OUR FLAGSHIP PRODUCT IS THE "ALL-TERRAIN SANDAL". THESE SANDALS HAVE BEEN DESIGNED WITH DURABILITY AND
VERSATILITY IN MIND. THEY ARE IDEAL FOR BOTH OUTDOOR ACTIVITIES AND COMFORTABLE EVERYDAY WEAR. THEIR RUGGED
AND STYLISH DESIGN MAKES THEM THE PERFECT CHOICE FOR THOSE LOOKING FOR FOOTWEAR THAT CAN ADAPT TO A VARIETY
OF SITUATIONS.

WE WOULD LOVE THE OPPORTUNITY TO DISCUSS FURTHER DETAILS ON HOW OUR "ALL-TERRAIN SANDALS" COULD FIT INTO THE
LULA SANDALS OFFERING. WE ARE OPEN TO ANY TYPE OF COLLABORATION YOU DEEM APPROPRIATE, WHETHER IT BE THROUGH A
PARTNERSHIP, JOINT DISTRIBUTION OR OTHER CUSTOMIZED ARRANGEMENTS.

IF YOU ARE INTERESTED IN EXPLORING THIS OPPORTUNITY OR WOULD LIKE MORE INFORMATION ABOUT OUR SANDALS, PLEASE
FEEL FREE TO REPLY TO THIS EMAIL OR CONTACT ME DIRECTLY AT [YOUR PHONE NUMBER] OR [YOUR EMAIL ADDRESS].

THANK YOU VERY MUCH FOR YOUR TIME AND CONSIDERATION, AND WE LOOK FORWARD TO THE POSSIBILITY OF COLLABORATING
TOGETHER.

HAVE A WONDERFUL DAY!

SINCERELY,

ANDREA [YOUR LAST NAME]


[YOUR POSITION]
[YOUR COMPANY]
[YOUR PHONE NUMBER] [YOUR PHONE NUMBER]
[YOUR EMAIL ADDRESS]

49
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Blogs

• Blogs are a powerful tool for sharing knowledge


and stories.

• With the help of Chatbots, blog writing has


become even more accessible and efficient.

• AI can help you generate ideas, write compelling


content and improve your writing skills. Whether
you're an experienced blogger or just starting
out.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Example: Advertising blog

Imagine you work selling essential oils and at Christmas you want to offer them
as a gift.

Prompt:

Write a summary for a short blog post on why essential oils are a great holiday
purchase.

Example: Advertising blog

AI Response:

Christmas is coming, and we are all looking for the perfect gift for our loved ones. Why
not consider essential oils as an excellent choice? These natural elixirs not only offer
enchanting fragrances, but also provide a variety of health and wellness benefits. In our
blog post, we'll explore why essential oils are a smart holiday choice, from their
versatility to their soothing properties. Discover how these aromatic gifts can bring
holiday cheer into your home and be appreciated all year long.

50
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example: Advertising blog

If we approve the abstract, we may


ask the Chatbot to write the blog.
Here is the answer:

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Study tools

• LLMs can help students understand complex


concepts, generate summaries of long texts,
and provide answers to academic questions.
Their ability to process information and
generate coherent content makes them ideal for
expanding knowledge and improving learning
efficiency.

Example 1: Explaining a text

Sometimes academic terms can be complicated, Chatbots can explain some terms to us.

Prompt:

The subtidal colonies also presented a severe event of loss of Zooxanthellae


between October 2015 and March 2016. These events coincided with the global
coral bleaching recorded between 2015 to 2016 with local temporal variations. In
the text above, what does the term zooxanthellae refer to?

51
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1: Explaining a text

AI Response :

The term "zooxanthellae" refers to symbiotic microorganisms, specifically single-celled algae


of the genus Zooxanthella, that live in coral tissue. These algae photosynthesize and provide
essential nutrients to corals, while corals provide them with a protected environment. The
loss of zooxanthellae in corals is a phenomenon known as "coral bleaching", which can be
caused by stressors such as increased water temperature and pollution and can threaten the
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

health of coral reefs.

Example 2: Self-examination

A useful way to test yourself is to ask the Chatbot to ask you quiz-like questions to check
how well you master a topic.

Prompt:

Ask me single choice questions on the topic of mitosis

52
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 2: Self-examination

1. What is the primary purpose of mitosis in the cell cycle?


a) Reduction of the number of chromosomes.
b) DNA repair
AI Response :
c) Cell growth and replacement
d) Production of sex cells
2. How many main phases make up mitosis?
a) 2
b) 3
v
c) 4
d) 5

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
3. In which phase of mitosis does the condensation of chromosomes and the formation
of "X" shaped structures occur?
a) Prophase
b) Metaphase
c) Anaphase
d) Telophase

Code assistance

• ChatGPT is a versatile tool that allows you


to perform tasks such as debugging, code
generation, reformatting, commenting and
many others. In addition, it supports code in
more than 40 different programming languages.

53
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1: Phyton

Prompt:

Act as a junior Python programmer. Please write code to generate madlibs from 3 arrays of 6
elements each: prepositions, verbs and nouns, with nouns also used as direct objects
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Example 1: Phyton

AI Response:

54
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 2: Commenting and reformatting code

Prompt:

You can ask ChatGPT to include Add line comments to this Python code and reformat it to make it more readable:
comments in your code and restructure import math
it to make it easier to understand. After amplitude = 30
giving it your instructions at the prompt, frequency = 2
simply add three-pound signs and num_points = 50
paste the code you want to be for i in range(num_points):
organized properly. y = int(round(amplitude * [Link](2 * [Link] * frequency * i / num_points))))
print(' ' * (amplitude + y) + '*')
###

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Example 2: Commenting and reformatting code

AI Response:

55
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 3: Debugging Prompt:

ChatGPT can detect syntax errors in code Please debug this Phyton code:
and can find logical errors that would arise
1. pizza_cost = 100
when the code is executed. Here is an
example of a Python script that eventually 2. partygoers = 10
causes a divide by zero error on line 4 due to a 3. while partygoers = 0:
logical error on line 3. Try this simple
command to find and correct the error. 4. cost_per_person = pizza_cost / partygoers
5. print("the cost per person is $",
"{:.2f}".format(cost_per_person))
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

6. partygoers -= 2

Example 3: Debugging

AI Response:

56
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 4: Code Optimization Prompt:

Act like a python developer and please optimize this script:

If the script is taking too long to run, ChatGPT can


optimize it. Here is an example of optimizing an
inefficient script that finds prime numbers:

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Example 4: Code Optimization

ChatGPT Response:

57
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 5: Translating between programming languages

Prompt:

Act as an experienced developer with knowledge of both COBOL and


One functionality provided by ChatGPT is its
Python. Convert this COBOL program to Python:
ability to migrate programs from one language to
IDENTIFICATION DIVISION.
another. A common scenario for this could be
PROGRAM-ID. HelloWorld.
the modernization of code written in an older
PROCEDURE DIVISION.
language to a more contemporary one:
DISPLAY 'Hello, World!'.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

STOP RUN.

Example 5: Translating between programming languages

ChatGPT Response:

58
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 6: Handling multiple files and refactoring your code base

Prompt:

My Python script uses two files, listed below, in different directories. Please show the output
of running [Link]:

If you need ChatGPT to evaluate multiple files,


simply provide the filenames and paste the
code for each into the entry

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Example 6: Handling multiple files and refactoring your code base

The output of the execution of the '[Link]' script would look like this:

ChatGPT Response:

This output is generated by importing the 'welcome' and 'farewell' functions from the
'[Link]' file and then calling these functions with the name "Alice" as the argument.

59
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Digital Marketing

• Artificial intelligence chatbots are a treasure


trove of resources for both day-to-day work
and subtle digital marketing, from analytics to
content generation and tweaking.

• We will explore some examples.


CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Example 1: Keyword search

Ask your preferred artificial intelligence chatbot what keyword variants exist for a main
keyword and request additional information about them.

Prompt:

Act as a senior SEO consultant. Generate a list of long tail keywords related to cloth diapers.

60
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1: Keyword search

Here is a list of long tail keywords related to cloth diapers:


ChatGPT Response:
1. "Eco-friendly cloth diapers for babies"
2. "Comparison of reusable cloth diapers"
3. "Advantages of cloth diapers over disposable diapers"
4. “How to wash cloth diapers efficiently“
5. "Reviews of modern cloth diapers"
6. "A parent's guide to cloth diapering"
7. "Where to buy quality cloth diapers"
8. "Cloth diapers for newborns: are they right?"
9. "Reducing waste with cloth diapers"

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
10. "Printed cloth diapers: options and designs"

These keywords can be useful to optimize the content related to cloth diapers on
your website and improve its visibility in search engines.

Example 2: Marketing Channel Research

One of the main concerns for digital marketers is allocating their time and resources to
different marketing channels. An artificial intelligence chatbot can immediately provide
you with information about the types of marketing channels that will work best for a
particular customer and product.

Prompt:

For a client who wishes to promote his "Happy Baby" brand cloth diapers, with a budget of
$10,000, generate a table showing how much money should be spent and on which
marketing channels. Use columns for the marketing channel, the budget allocation and
the reasoning behind it.

61
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Sure, here's a chart showing a suggested budget allocation to promote


"Happy Baby" cloth diapers with a $10,000 budget:

Marketing Budget Reasoning


Channel allocation
Social media is effective in reaching a
Advertising in $ 3,000
Example 2: Channel Research
young and active audience, which is often
Social Media a target in the cloth diaper market.

of Marketing Advertising in
PPC Search $ 2,500
Search advertising can help capture
potential customers who are specifically
Content looking for products such as cloth diapers.

Creating informative content about the


Content benefits of cloth diapers can attract
Marketing $ 2,000 parents concerned about the environment
and the health of their babies.
ChatGPT Response: Influencers can authentically promote
Influencer "Happy Baby" products to their followers,
Marketing $ 1,500 which can build brand trust.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Email is an effective way to keep


Email customers informed about promotions and
Marketing $ 1,000 product news.

Events and Participating in events and trade shows


Tradeshows provides an opportunity to interact directly
Commercials $ 1,000 with consumers and showcase products.

This budget allocation is baased on the effectiveness of each channel in


reaching different audiences and the potential for conversion. However, it
is important to track and adjust these allocations based on actual results
throughout the marketing campaign.

Example 3: Tag Adjustment on Web Pages and PPC Ads

AI chatbots are an ideal tool to help generate copy that fits the constraints of SEO and
PPC campaigns:

Prompt:

Generate a table with 5 agile title tag options with powerful SEO words for a blog article
advertising "Happy Baby" brand reusable diapers. Each title should be less than 60
characters. Add a column to display the 5 corresponding meta descriptions, which should
also incorporate the same SEO keyword and a call to action.

62
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Here is a table with 5 options of title tags and their corresponding meta descriptions for a
blog article about disposable diapers descriptions for a blog article about disposable
diapers of the brand "Happy Baby":

Example 3: Adjusting Tags on Web Title Label (less than 60 Meta Description (incorporates SEO keyword and a call
characters) to action).

Pages and PPC Ads "Happy Baby Disposable "Discover why Happy Baby disposable diapers are the
Diapers: The Best number one choice for busy parents. Shop now and save!"
Choice"
"Experience the unparalleled convenience and quality of
"Happy Baby Diapers: Happy Baby diapers. Order them today and treat your baby to
Comfort and Quality
ChatGPT Response:
a luxury experience!"
Guaranteed"
"Don't miss out on our special offer on Happy Baby diapers.
"Special Offer: Happy Top quality at low prices. Buy now and save big!"
Baby Diapers at Incredible
Prices"
"Happy Baby offers the best diapers for babies. Buy them
today and give your baby the care they deserve. order now!"
"Best Diapers for Babies:
Happy Baby Has It All"

"Choosing Happy Baby diapers is a smart decision for


" Happy Baby Diapers: parents concerned about quality and comfort. Order them
The Smart Choice for

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
today and notice the difference!"
Parents"

These titles and descriptions are designed to be SEO appealing and encourage readers
to act, such as making a purchase or exploring more content related to "Happy Baby"
diapers.

Example 4: Prompts to generate images in Prompts

With the advent of tools like Midjourney, DALL-E and Stable Diffusion, designers can use
cue engineering to generate images. If you are unfamiliar with the syntax and techniques
of such prompts, you can ask an AI chatbot for a set of text-to-image prompts.

Prompt:

Generate 5 text-to-picture messages for DALL-E to create dramatic images that


convey the concept: Discover why Happy Baby reusable diapers are the ecological and
economical choice for conscious parents. Buy now and reduce your environmental
footprint!

63
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 4: Prompt to generate images in Prompts

Here are five text-to-picture messages for DALL-E to create dramatic


ChatGPT Response: images related to Happy Baby reusable diapers and their ecological and
economic advantage:

1. Message: "Change the game with Happy Baby"


2. Message: "Your choice, our planet" .
3. Message: "Your children's future starts here.
4. Message: "Sustainability and savings, together".
5. Message: "Transform your baby's care".

These messages can be used as prompts for DALL-E and will help you to
create powerful images for your marketing campaign.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Finding emojis

• Selecting the right emoji from the wide range of


options available to complement your tweets or
social media posts can be a challenge.

• Artificial intelligence can help you in this regard.

Example: Finding Emojis

Prompt:

Ready to take care of your baby and the planet with reusable “Happy Baby” diapers?

What are some good emojis to add to this part of a tweet?

64
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1: Finding Emojis

ChatGPT Response:

Ready to take care of your baby and the planet with 'Happy Baby' reusable diapers?

Contracts

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
• Chatbots have the potential to simplify contract
reading and drafting significantly. Thanks
to their ability to process natural language
and understand legal concepts, these virtual
assistants can provide clear summaries of
complex contracts, highlighting key points for
better understanding. In addition, they can guide
users through the drafting process, ensuring
that all essential elements are included and
avoiding important omissions.

Example 1: Understanding concepts


Prompt:

You can ask the Chatbot to explain WHEREAS, "Company XYZ" has the need to acquire certain consulting services to
improve its operations;
some terms to you.

WHEREAS, "ABC Consultant" has the experience and skills necessary to provide
such services;

WHEREAS, both parties wish to formalize their relationship and define the terms and
conditions under which this collaboration will be carried out.

NOW THEREFORE, in recognition of the foregoing premises and in mutual


agreement, the parties agree as follows:

Can you explain to me the meaning of the capitalized words in this contract.

65
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1: Understanding Of course, here is the meaning of the capitalized words in the contract:

concepts
• Company XYZ: This refers to the company seeking to acquire consulting services to
improve its operations. In the context of the contract, this is the name or identification of the
company in question.
ChatGPT Response:
• ABC Consultant: Refers to the consultant or the person (or entity) who possesses the
expertise and skills necessary to provide the experience and skills necessary to provide the
consulting services required by "Company XYZ". It is the name or identification of the
consultant.
• WHEREAS: This word is used at the beginning of each section of the contract to introduce a
statement or premise that states the reason or rationale behind a provision or term in the
contract. In this context, it is stating the reasons why both parties are entering into the
contract.
• THEREFORE: This phrase is used to introduce the specific provisions of the contract that
both parties agree to follow based on the premises previously stated in the "WHEREAS"
section. That is; after stating the reasons or grounds, it states the agreed actions that both
parties will take.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Example 2: Assisting in drafting contracts

It is important to always consult a legal expert.

Prompt:

You are an attorney for a government contractor. You are drafting a contract for a subcontractor to
perform work on a highway. The contract must be solid and include the following The contract
must be solid and include the following:
The work will last 2 years and will be worth $2 million. The subcontractor will be paid $1 million up
front and the remaining $1 million will be paid upon completion of the work. The subcontractor will
be required to sign a non-disclosure agreement.

66
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 2: Help in writing of contracts

ChatGPT Response :

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

67
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Different writing styles

• Artificial Intelligences, such as ChatGPT, are


recognized for their ability to quickly generate
essays and blog articles. However, often, the
content they generate lacks uniqueness and
vitality. To bring the words to life, additional
steps need to be taken. One of the most effective
ways to do this is to specify a writing style or
mention the name of a well-known author in the
instruction.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Example 1: Different personalities write a paragraph

Case 1: Desired style is not specified

Prompt: Explain to me what love is

Love is a complex and profound emotion that involves affection, emotional connection and care for
something or someone. It manifests itself in various forms, such as affection between family members,
romantic love in relationships, sincere friendship or even passion for interests and causes. Love can bring
joy, happiness and a sense of belonging, and often motivates people to care for, protect and seek the
ChatGPT Response: happiness of those they love. Although its meaning may vary according to experiences and cultures, love is a
powerful force that drives human relationships and enriches our lives.

68
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1: Different personalities write a paragraph

Case 2: A profession is specified but no name is given

Prompt: Explain to me what love is as if you were a doctor.

From a medical perspective, love is a complex emotional and psychological state that
involves a series of chemical reactions and neurological processes in the human
brain. When a person falls in love or feels love towards someone or something, his or
her body releases a series of chemicals, such as oxytocin and dopamine, which

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
generate feelings of well-being, happiness and attachment. These processes can
have a significant impact on a person's physical and mental health, as love can
ChatGPT Response:
reduce stress, strengthen the immune system and improve overall quality of life. In
addition, love can influence a person's behavior and decisions, leading them to care
for and protect their loved ones. In summary, love is a biological and psychological
phenomenon that triggers physical and emotional responses in the human body and
plays an important role in people's health and well-being.

Example 1: Different personalities write a paragraph

Case 3: A name of a person is specified

Explain to me what love is as if you were William Shakespeare.


Prompt:

Love, oh sweet and mysterious love, is the flame that lights our hearts and gives life to our
souls. It is a kaleidoscope of emotions, a whimsical play of passions that envelops us in
whispers and caresses. As a poet of old, I dare to say that love is an eternal conflict, a battle
between reason and madness, between light and shadow. It is a fire that burns unceasingly,
that lifts us to the heights of heaven and plunges us into the depths of the abyss. Love, in its
ChatGPT Response: essence, is an enigma, a melody that only the heart can understand, and the soul can sing. Like
Shakespeare, I pay homage to love, that feeling that gives meaning to life itself and that,
despite its storms and challenges, endures as an eternal light in the history of mankind.

69
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Summarizing text

ChatGPT is famous for its speed in generating


content, which results in great time savings. But it is
not limited to content creation; it can also be of great
help in simplifying long and complicated texts. It can
summarize a variety of materials, such as books,
movies, plays and articles. In short, using ChatGPT
is like having an instant summary, especially useful
when you need information efficiently.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Different writing styles

Example 1: Summary of a famous literary work

You can ask ChatGPT to summarize famous literary work without providing any additional text
fragments, since it is familiar with them. For example, you can ask it to summarize a play by act,
which will allow you to get an overview of the plot in less than 300 words, instead of dealing with the
entire play.

Prompt:

Can you give me a 300-word summary of Isabel Allende's The House of the Spirits?

70
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Different writing styles "The House of the Spirits" is an epic novel written by Chilean author Isabel
Allende. Published in 1982, this work has left an indelible mark on Latin
American literature and is widely recognized for its rich narrative and its
exploration of themes such as family, love, politics and spirituality.

The story is set in an unspecified Latin American country and follows the life of
the Trueba family over several generations. It is narrated mainly by Esteban

Example 1: Summary of a famous work Trueba, who starts as a poor peasant and becomes a rich and powerful man.
He marries Clara del Valle, a woman with psychic abilities and mysterious
powers that will influence the fate of the family.

The novel examines the complex relationships between the characters,


highlighting the passion and conflict between Esteban and Clara, as well as
ChatGPT Response: the strong will of young Alba, Esteban and Clara's granddaughter, who plays
a pivotal role in the political struggle unfolding in the country.

Throughout the narrative, the family home, known as "The House of the
Spirits", becomes a symbol of family ties and the secrets it harbors. The
presence of ghosts and spirits adds a magical and mysterious element to the

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
story, reflecting the connection between the spiritual and earthly worlds.

The plot of the novel runs parallel to the political and social events affecting
the country, including a revolution and a military coup. These events have a
profound impact on the lives of the Trueba family and on the structure of
society.

Through her poetic and evocative writing style, Isabel Allende weaves an
emotional and captivating story that explores the complexity of human
relationships, the search for identity and the struggle for justice in a turbulent
hysterical context. "The House of the Spirits" is a literary masterpiece that
continues to resonate in the hearts of readers and offers a unique insight into
Latin American life and culture.

Prompt:
Example 2: Working with long text
Can you explain this text about Marie Curie's discoveries as if I were 10 years old?
blocks

You can use ChatGPT to request a


summary or outline of a text and get a
simplified version in a few words by pasting
the text into the text box. You can request
the degree of complexity of the
explanation.

71
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Of course! This is about a lady named Marie Curle and her husband. They were
very interested in little things called "radionuclides". They wanted to know more
about them, so they tried to separate them out and find them pure.
First, they found something called polonium which is similar to something else
Example 2: Working with long text called bismuth. Then, they tried to find something else called radium, but it was
more difficult because it was mixed with something called barium.
blocks Finally, after a lot of work, they managed to get some pure radium. This was very
important because it helped to understand how these things work and how they
can be dangerous or useful. They also discovered that these things can give off
heat and change the air.
ChatGPT Response :
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Marie Curie was very clever and wrote many reports about her discoveries. Some
of these reports said that radium could damage diseased cells faster than healthy
cells, which was a great discovery.

She also had to face challenges because at that time, some people did not
believe that women could do important research. Despite that, Marie Curie went
ahead and accomplished a lot.

In short, Marie Curie and her husband discovered little things called
radionuclides, found polonium and radium, and learned how they can be both
useful and dangerous. They also proved that women can be very important
scientists.

72
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Artificial Intelligence Professional Certification

Benefits
• Expanded knowledge in AI and Machine Learning, ability to apply data analysis techniques in
decision-making, improved competitiveness and operational efficiency.

Skills Developed
• Fundamentals of AI and machine learning, supervised and unsupervised learning methods, data
analysis, Python programming, understanding of algorithms and their limitations, application of
clustering and regression techniques.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

[Link]
products/artificial-intelligence-professional-certificate-caipc

73
Chapter 3: Intermediate
level
Introduction to Prompt engineering
and simple techniques
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Contents

• Chain of thoughts

• Zero shots chain of thoughts

• Self-consistency

• Knowledge generated

• Prompting from less to more

• Handling Long Form Content

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
• Reviewing Roles

• Prompt Format

75
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Chain of Thought

The prompting Chain of Thought (CoT) motivates the LLM to detail his or her thought process.

CoT has been shown to be effective in improving performance on tasks such as arithmetic, common
sense and symbolic reasoning tasks.

Google AI's PaLM 540B model stands out.

Prompt:
Example

Q: Joe has 20 eggs. He buys 2 more cartons of eggs. Each carton contains 12 eggs. How
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

many eggs does Joe now have?

A: Joe started with 20 eggs. 2 cartons of 12 eggs is 24 eggs. 20+24 = 44. Therefore, Joe
has 44 eggs, and the answer is 44.

Q: Farmer John had 93 chickens. If he sold 20 to Farmer Bill and bought twice that amount,
how many chickens does Farmer John now have?

Q: Farmer John had 93 chickens. If he sold 20 of them to Farmer Bill and then bought twice
that amount, how many chickens does Farmer John now have?

AI response: A: Farmer John had 93 chickens initially. He sold 20 of them to Farmer Bill. He then bought
twice the 20 he sold, which would be 2 x 20 = 40 additional chickens. To determine how
many chickens he has now, we add the chickens he had left after selling to Farmer Bill (93 -
20 = 73) and the 40 he bought later. Therefore, Farmer John now has a total of 73 + 40 =
113 chickens.

Limitations

It is relevant to note that, chains of thought only show performance improvements when applied to
models with approximately 100 billion parameters.
In smaller models, illogical chains of thought were observed, resulting in lower accuracy compared to
using standard prompts.

In general, models tend to experience proportional improvements in performance when using the CoT
prompting approach, depending on the size of the model.

76
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Zero shots Chain of Thoughts

It is a variant of the CoT prompting method that


incorporates an extremely simple zero shot prompt.
Zero-shot-CoT was also effective in improving
scores on arithmetic, common sense, and The addition of the phrase "Let's think step by step"
symbolic reasoning tasks. However, it was at the end of a question allows LLMs to generate a
generally not as effective as CoT prompting. An sequence of thinking that answers the question.
important use case for Zero-shot-CoT is when it is From this thought sequence, more precise answers
difficult to obtain few-shot examples for CoT are possible.
generation.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Example

Prompt:

Can you calculate the area of a circle whose diameter is 20 cm? Let's think step by step

Of course! Let's calculate the area of a circle whose diameter is 20 cm. Let's think
step by step.

Example Step 1: Find the radius of the circle.


The radius is half the diameter. In this case, the radius would be 20cm/2 = 10 cm.

Step 2: Use the formula for the area of the circle.


The formula to calculate the area of a circle is: A=π*r², where "A" represents the area
and "r" is the radius.

AI response: Step 3: Substitute the value of the radius into the formula.
A = π*(10cm)²

Step 4: Perform the calculation.


A = π*100 cm²

Step 5: Calculate the numerical value.


A ≈ 314.16 cm²

Therefore, the area of the circle with a diameter of 20 cm is approximately 314.16


square centimeters.

77
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Self-consistency

It is an extension of CoT that produces several thought chains instead of just one, and then chooses
the most common answer as the final answer.

A prompt is created using the Few-Shot-CoT approach. With this prompt, multiple chains of thought
are generated independently. Responses are then elicited from each of these chains, and the final
answer is determined by a process of "reasoning path averaging". In practical terms, this means
selecting the answer that is most frequently encountered.

Example
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Can you explain to me which came first, the chicken or the egg? Let's think step by step.

Prompt:

The question of whether the chicken or the egg came first is a classic
philosophical and biological dilemma. Let us think step by step:

In the evolutionary process, species do not suddenly emerge in their present


form. Instead, they change gradually over time due to random genetic
mutations and natural selection.
In the context of avian evolution, the earliest ancestors of birds were not
"chickens" in the modern sense. They were primitive birds that gradually
Answer 1: evolved into what we call chickens today.
Evolution occurs over successive generations. So, if we go back far enough in
time, we come to a point where there was no "chicken" in the sense that we
know, but an ancestral species of bird.
In that case, the first egg containing a chick with the genetic characteristics we
now associate with chickens must have been laid by a bird that was not a
"chicken" in its modem form. This egg contained a genetic mutation that gave
rise to a new variant, which would eventually evolve into the first chicken.

In summary, from an evolutionary perspective, the egg containing the first


chick genetically identifiable as a hen was probably by an ancestor of
chickens, but not a hen in its present form. Therefore, the egg preceded the
chicken in terms of evolution.

78
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Response 2:
The question of whether the chicken or the egg came first is an enigma that
has puzzled mankind for a long time. To approach it step by step, we can
consider evolution.

1. Origin of species: Charles Darwin's theory of evolution tells us that


species evolve gradually over time. Imagine an ancestral species of birds
that, over many generations, gradually evolved into what we know today
as chickens.
2. Switch points: As this ancestral species evolved, at some point, one of
the birds in the evolutionary line had a genetic mutation. This mutation
may have affected the way its embryo developed.
3. The first chicken egg: As a result of this genetic mutation, the embryo of
this bird, which would be considered the first "chicken", developed inside
an egg with the genetic characteristics that defined a chicken. Therefore,
the first egg containing an individual that could be called a "chicken" was,
in effect, a chicken egg.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
In short, according to evolutionary theory, the egg (with the genetic
characteristics of a chicken) predated the chicken as we know it today. The
gradual evolutionary process led to the emergence of the first chicken from
earlier species, and this first chicken was born from an egg that had the
genetic characteristics that defined a chicken. Therefore, from this
perspective, the egg came first.

Response 3:

The question of whether the chicken or the egg came first is a classic
philosophical and scientific dilemma that has intrigued people for a long time.
Let's take a step-by-step look at how it is approached:

1. Origin of birds: The chicken, as we know it, is a species of bird. For a


chicken to lay an egg, there must first be a chicken. So, in this sense, the
chicken came first.
2. Origin of eggs: However, scientists explain that evolution works gradually
through small genetic mutations. This means that, at some point in
evolution, a bird that was not exactly a chicken laid an egg, and the chick
that hatched from that egg had a genetic mutation that made it the first
chicken. From this perspective, the egg came first.
3. Definition of "chicken": Here is the crux of the matter. The question itself
is based on how we define a "chicken". If we define a "chicken" as a bird
that lays chicken eggs, then the egg must have existed first for us to have
the first chicken. But if we define a "chicken" simply as a particular species
of bird, then the chicken must have existed first.

In short, it's an interesting dilemma that depends on how we define words and
how we view evolution. From a biological perspective, it is likely that the egg
came first due to the gradual evolutionary process.

79
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Conclusion:

When asking the Chatbot three times and getting always the same answer: "the egg", and when
analyzing the three answers we found consistencies. There is a high probability of believing the answer.

Self-consistency prompts have been shown to improve results in arithmetic, common sense and
symbolic reasoning tasks.

Knowledge generated

The central notion behind the "generated knowledge" approach involves asking the LLM to produce
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

potentially valuable information about a specific question or issue before generating a definitive
answer.

To illustrate, imagine that you want to write a short article about an animal. Before requiring the LLM
to compose the article, you can request the LLM to generate some data about the animal of interest.
This will allow the LLM to develop an article that is richer in informational content. This process can be
accomplished in two simple ways.

Knowledge
1

Generation Integration
Ask of knowledge Knowledge
2 of knowledge Answer

Knowledge
3

80
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Prompt:

Single prompt approach


Generate 4 facts about three-toed sloths, then use these facts to write a short blog post
Example 1 with the information.

ChatGPT Response:

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Double prompt approach

In this case, the instruction is given to first generate the facts, once the answer has been given, the
request is made to use those facts to generate a text, blog, etc.

This second approach can produce longer content more reliably.

Generating knowledge

Example 1
Prompt:

"Question: In a chess competition, is the objective to obtain a higher total score than others? Yes or
No?

Knowledge: The objective of chess is to defeat the opponent by putting his king in a checkmate
position. The game is played on a 64-square board and is composed of pieces such as pawns,
rooks, knights, bishops, queens and kings. Each piece has specific move and capture rules.
Explanation and Answer".

81
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Generating knowledge

Example 1 ChatGPT Response:

Explanation and Answer: No, in chess, the objective is not to get a higher total
score than others, as in some other games. Instead, the main objective is to put the
to put the opponent's king in a checkmate situation, meaning that it cannot move
without being threatened. This guarantees victory in chess, irrespective of the
number of moves or pieces captured. Chess is a game of strategy and skill in which
the defeat of the opponent is sought through tactics and careful planning of each
move."

Large Language Models


CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

It consists of presenting the LLM with a prompt containing few examples, so that the model generates
information and answers the question in one step. The key distinction in this approach is that the model
recites or generates knowledge at the same time as it provides an answer to the question.

Example: Prompt:

Question: Who wrote the song "I Hate U, I Love U"?


Recitation: "I Hate U, I Love U" (stylized in lowercase) is a song by American singer and
rapper Gnash with the collaboration of American singer Olivia O'Brien.
Answer: Gnash...

Question: Who wrote "The School for Good and Evil"?

ChatGPT Response:

Recitation: The School for Good and Evil series was written by Soman Chainani, an Indian-
American writer. American writer of Indian origin. The work has been translated into over 30
languages and has sold over 10 million copies worldwide. sold more than 10 million copies
worldwide.

Reply: Soman Chainani

82
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Prompting from less to more

Least to Most (LtM)

This approach takes the CoT prompting technique to a deeper level by breaking a problem into
smaller parts and addressing each one separately. This approach is inspired by real-world educational
strategies used with children.

Similar to CoT prompting, the initial problem is divided into a series of subproblems that are built on
top of each other. In a second phase, these subproblems are solved one at a time. Unlike the chain
of thoughts, the solution of the previous subproblems is used in the prompt to help solve the next
problem.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Prompt:

CUSTOMER INQUIRY:
I just purchased a t-shirt from your Arnold collection on March 1. I saw it was on sale, so I
bought a t-shirt that originally cost $30 and got a 40% discount. I saw that you have a new t-shirt
discount of 50% off. I wonder if I can return the t-shirt and have enough store credit to buy two
Example: of your t-shirts.
Response to a
customer inquiry INSTRUCTIONS:
You are a customer service agent tasked with politely responding to customer inquiries.
Returns are allowed within 30 days. Today's date is March 29th. Currently, there is a 50%
discount on all T-shirts. T-shirt prices in your store range from $18 to $100.
Do not make up any information about discount policies.
Determine if the customer is within the 30-day return window.

What sub-problems need to be solved before answering the inquiry?

To determine if the customer is within the 30-day return window and will have
enough store credit to purchase two T-shirts, we must solve the following
subproblems before answering the query:
ChatGPT Response:
1. Calculate how many days have elapsed from the date of purchase (March 1) to
the current date (March 29).
2. Verify if the customer is within the 30-day return period from the date of
One or more of the subproblems
purchase.
are answered and in this way the 3. Calculate the credit the customer would have after returning the T-shirt with a
40% discount.
Chatbot can give us a more 4. Determine the price of the T-shirts after the new 50% discount.
5. Calculate how much two T-shirts would cost with the new discount.
precise answer. 6. Compare the available credit after the return with the cost of two T-shirts with
the new discount to determine if the customer can afford to buy them.

Once we have solved these sub-problems, we will be able to answer the


customer's query accurately.

83
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Prompt:

Q: computer, keyboard
A: The last letter of "computer" is “r". The last letter of "keyboard" is “d". So "computer,
keyboard" is “rd".

Example: Q: science, research


A: The last letter of "science" is “e". The last letter of "research" is “h". So "science,
Concatenation of letters research" is “eh".

Q: innovation, creativity
A: The last letter of "innovation" is "n". The last letter of "creativity" is “y". So "
innovation, creativity" is "ny“.

Q: knowledge, wisdom, insight.


A: The last letter of "knowledge" is “e". The last letter of "wisdom" is “m". The last letter
of "insight" is “t". So "knowledge, wisdom, insight" is “emt".
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

P: intelligence, ingenuity, technology.

ChatGPT Response:

A: The last letter of "intelligence" is “e". The last letter of "ingenuity" is “y". The last letter of
"technology" is “y". So "intelligence, ingenuity, technology" is “eyy".

Prompt:

Example:
Compositional generalization
(SCAN)

The SCAN3 benchmark requires the model to convert


natural language into sequences of actions. For example,
the phrase "run left and walk twice" would translate to
"TURN_LEFT + RUN + WALK * 2". Language models
perform particularly poorly when faced with sequences
longer than those in the training set.

84
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example:
Compositional generalization (SCAN)

ChatGPT Response:

The output of "jump around left twice after walk opposite left thrice" concatenates
several previous instructions: the output of "walk opposite left" * 3, the output of
"jump around left twice" produces "TURN LEFT" * 2 + "WALK". "jump around left
twice" produces ("TURN LEFT" + "JUMP") * 2. Then, concatenating these outputs,
we get ((TURN LEFT" * 2+ "WALK") * 3) +((TURN LEFT" + "JUMP*) * 2).

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Handling Long Form Content
Dealing with long-form content can be difficult, as models have a limited context length. Let's learn
some strategies for effectively handling long-form content.

Text Preprocessing

Before passing long-form content to a language model, it is useful to preprocess the text to reduce
its length and complexity. Some strategies for preprocessing include:

• Eliminate unnecessary sections or paragraphs that are not relevant or do not contribute to the
main message. This can help prioritize the most important content.

• Summarize the text by extracting key points or using automatic summarizing techniques. This
can provide a concise overview of the main ideas.

These preprocessing steps can help reduce the length of content and improve the model's ability to
understand and generate responses.

Fragmentation and Iterative Approach

Instead of providing all long-form content to the model at once, the model can be divided into
smaller fragments or sections. These fragments can be processed individually, allowing the model
to concentrate on one specific section at a time.

An iterative approach can be taken to handle long-form content. The model can generate responses

85
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

for each text fragment, and the generated output can serve as part of the input with the next fragment.
In this way, the conversation with the language model can progress step by step, effectively managing
the length of the conversation.

Post-processing and Response Refinement

The initial responses generated by the model may be extensive or contain unnecessary information.
It is important to perform post-processing on these responses to refine and condense them.

Some post-processing techniques include:

• Eliminate redundant or repetitive information.


• Extract the most relevant parts of the answer.
• Reorganize the response to improve clarity and consistency.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

By refining the answers, the content generated can be made more concise and easier to understand.

Use of artificial intelligence assistants with support for larger contexts

While some language models have limited context length, there are artificial intelligence assistants
such as OpenAI's GPT-4 and Anthropic's Claude that support longer conversations. These
assistants can handle long-form content more effectively and provide more accurate responses
without the need for complex solutions.

Code libraries

Python libraries such as Llama Index and Langchain can be used to work with long-form content.
In particular, GPT Index can "index" content into smaller parts and then perform a vector search to
find the most relevant part of the content and use it exclusively. Langchain can perform recursive
summaries on text fragments, in which it summarizes a fragment and includes that in the prompt
with the next fragment to be summarized.

86
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Reviewing Roles

Create an automatic role

Prompt:

Write a role/biography about a high school math teacher in Mexico.

ChatGPT Response:

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Teacher Carlos Rodriguez is a distinguished mathematics educator with a
vast experience in secondary education in Mexico. His history in the world
of mathematics is an inspiration to his students and colleagues alike.

Carlos Rodriguez was born into a family dedicated to education in the


historic city of Guadalajara, Jalisco. From an early age, he showed an
innate interest in numbers and shapes, solving mathematical puzzles and
logic riddles long before he entered high school. This love for mathematics
led him to pursue a career in this discipline.

After completing his undergraduate studies in mathematics at the


University of Guadalajara, Mr. Rodriguez decided to dedicate himself to
secondary school teaching. Since then, he has worked tirelessly to make
mathematics accessible and exciting for his students.

Carlos is known for his creative approach in the classroom. He uses games,
brain teasers and hands-on applications to teach math concepts, which
makes his classes dynamic and engaging. He has won several local and
national awards for excellence in teaching and has participated in
professional development programs for teachers.

Teacher Carlos Rodriguez is not only a mathematics teacher but also a


mentor and guide to his students, encouraging them to explore the
wonderful world of mathematics and discover their potential in this
discipline. His passion for teaching and his dedication to education have left
a lasting mark on the educational community in Mexico.

87
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Format of the prompt

Formatting a prompt is crucial. It instructs the LLM on how to structure its response. For example, if the
examples use capitalized words as answers, the LLM will do the same, even if the answers provided
are incorrect.

Prompt: Reply
Can you answer the last question:

Q: What is the capital of France?


Q: What is the capital of Italy?
A: MOSCOW A: ROME
Example 1: Q: What is the capital of Germany?
A: PARIS
Q: What is the capital of Argentina?
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

A: London
Q: What is the Capital of Italy?

Despite the incorrect answers, the LLM correctly formats its answer in capital letters.

88
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

AI Risk Manager Professional Certification

Benefits
• Designed for professionals who develop, implement, or manage AI systems, the AI Risk Manager
Professional Certification (AI RMF), based on the NIST AI Risk Management Framework,
provides comprehensive education and validates skills to identify, assess, and mitigate AI-
related risks, ensuring that AI systems align with ethical and social values.

Skills Developed
• Supervision of the implementation of AI systems. Risk impact analysis of AI projects. Alignment
of AI systems with social values. AI regulatory compliance management. Decision-making based
on AI risk analysis. AI process optimization with an ethical and secure approach.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

[Link]
products/ai-risk-management-professional-certification-airmpc

89
Chapter 4: Applying
Prompts
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Contents

• Introduction

• Single choice questions

• Discussion questions

• ChatGPT as of GPT-3

• Chatbot + knowledge base

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

91
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Introduction

We will comprehensively explore the entire process of creating Prompts, using articles written by
community members as a reference.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Single choice questions

The LSAT, short for "Law School Admission Test," is used as a standardized assessment by law
schools in the United States for the purpose of measuring the critical thinking and analytical reasoning
abilities of possible students.

Here is an example of an LSAT question. Please think about how you would answer and explain your
reasoning.

92
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1

First request
What is the correct answer?

The chatbot is presented with the question


Laird: Pure research provides us with new technologies that contribute to saving
lives. However, even more valuable than this is its role in expanding our as it is asked in the exam.
knowledge and providing new and unexplored ideas.

Kim: Your priorities are wrong. Saving lives is what counts most. Without pure
research, medicine would not be as advanced as it is.

Laird and Kim disagree about whether pure research

a - Its importance derives in part from the fact that it provides new technologies.
b - expands the limits of our knowledge of medicine.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
c - should have as its important goal saving human lives.
d - has its most valuable achievements in medical applications.
e- has some value apart from its role in providing new technologies to save lives.

Example 1

First response: Incorrect


The correct answer is:
c- should have as its important goal saving human lives.

93
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1
What is the correct answer?
Second request
Laird: Pure research provides us with new technologies that contribute to saving
lives. However, even more valuable than this is its role in expanding our
It is asked to perform a step-by-step
knowledge and providing new and unexplored ideas. analysis
Kim: Your priorities are wrong. Saving lives is what counts most. Without pure
research, medicine would not be as advanced as it is.

Laird and Kim disagree about whether pure research

a - Its importance derives in part from the fact that it provides new technologies.
b - expands the limits of our knowledge of medicine.
c - should have as its important goal saving human lives.
d - has its most valuable achievements in medical applications.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

e- has some value apart from its role in providing new technologies to save lives.

Step-by-step explanation

Example 1
Second response

By doing a step-by-step exercise, the


d- has its most valuable achievements in medical applications. answer is analyzed and the answer is
correct.
Laird and Kim disagree on whether pure research has its most valuable
achievements in medical applications. Laird suggests that it has additional value in
expanding knowledge and generating new ideas, while Kim focuses on the
importance of saving lives through medicine. Thank you for pointing out the correct
answer.

94
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Discussion questions

With the right stimulus, GPT-3 is quite capable of writing short-format responses. To demonstrate this,
we will look at solving discussion questions, a common weekly assignment in many college courses.
A response to a discussion question is typically about 100-700 words. Longer content can be a bit
more difficult, as LLMs have limited memory and have difficulty understanding the big picture of what
they are writing.

Recommendations

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Be specific Do not ask too many Iteration
questions
Give as many instructions as possible Many discussion questions are not effective After creating an effective question, you can generate
about required formatting, text length, in getting the right answer, better one multiple results and select the most appropriate ones
formatting, requirements, etc. question at a time. to combine into a cohesive answer, or follow an
iteration approach by starting with an initial question
and expanding step by step.

Example 1
First request

The chatbot is presented with the question in a


simple way, without many instructions.

"What are the most urgent social problems that Latin America faces and what
measures can governments take to solve these problems?"

95
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1
First response

The results produced with this stimulus vary and, in some


The most pressing social problems in Latin America include economic
inequality, violence and crime, corruption, limited access to quality education,
cases, are quite brief, being only one or two sentences. An
health care challenges and migration. To address these problems, governments adequate response for a discussion should generally span
in the region can implement measures such as progressive fiscal reforms, several paragraphs, which makes these results suboptimal.
strengthen the rule of law, invest in education and health care, promote job An effective stimulus should provide clear instructions on
creation and encourage citizen participation. However, effectively addressing
format and content, eliminating any ambiguity in the
these problems requires approaches tailored to the specific circumstances of
each country and active collaboration at both the national and regional levels. language to improve the consistency and quality of
responses. An example of an improved stimulus is
presented below.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Example 1
Second request

It is given specific requirements that we need in the


answer, key and useful words such as essay, prose,
introduction, conclusion, examples and length of the
answer.
Write me a detailed one-page essay in prose form, please include an introduction, body
and conclusion, add specific examples. This is the topic: "What are the most pressing
social problems facing Latin America and what measures can governments take to solve
these problems?"

96
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Example 1

Second response

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
ChatGPT as of GPT-3
ChatGPT has experienced rapid growth in popularity, attracting millions of users. Unlike its base
model, GPT-3, released earlier, ChatGPT has been optimized specifically for conversations and is
presented through an easy-to-use chat interface. This model has surpassed GPT-3 in virality due to
its accessibility to users with no data science or AI experience, making it a very successful and widely
adopted AI assistant.

• ChatGPT was trained using RLHF (Illustrating Reinforcement Learning from Human Feedback)
but much of its effectiveness comes from using a good prompt.
• Prompting is the process of instructing an AI to do something.
• ChatGPT is a language model with an interface that uses past conversations to understand and
respond to users.

User Prompt Full Prompt Complete model

Below is a conversation
between the AI assistant and
Tell me a Little Johnny a human. Sure, here you
Language
joke have one...
<conversation> model
Human: Tell me a Little
Johnny joke

Assistant:

97
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Memorization: Previous exchanges in a conversation between a user and a chatbot are accumulated
and incorporated into the next prompt, allowing the chatbot to remember previous entries. However,
there is a limit to the length that a prompt can reach due to the token restriction in GPT-3 models, such
as ChatGPT, which can limit the ability to remember very long conversations.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

Chatbot + knowledge base

Recent advances in large language models (LLMs) such as GPT-3 and ChatGPT have generated
interest in the technology industry. These models are powerful but present challenges such as biases
and hallucinations. One of the promising uses of these LLMs is the development of chatbots.

98
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Intent-based chatbots

Also called traditional Chatbots

Limited to one set of answers.

They are used in easy tasks such as customer


service.

It uses a rule-based approach.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
How can GPT-3 help?

GPT-3 can help by reducing the number of


intentions by associating each with a document
in a Knowledge Base (KB). This allows for
more contextual responses and fewer specific
intentions.

LLMs have size limits for Prompt. This is due


to computational limitations. Future LLMs may
not have this restriction.

How Could a Chatbot Work with GPT-3?

Response generation with


Intention selection
GPT-3.

99
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Response Generation with GPT-3

To create the prompt, we will explore the following strategies:

1- Role-prompting: a technique to increase knowledge that assigns a specific role to artificial


intelligence.

2-Incorporation of relevant information from the Knowledge Base (KB), i.e., the document retrieved
during the semantic search.

3- Consideration of previous messages between the user and the chatbot: especially useful when the
context is not fully specified by the user.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

4- Inclusion of the question formulated by the user as part of the instruction.

Login to PetCareHub from the web site

Open your web browser and go to the PetCareHub website.


Click on the "Login" button located in the upper right corner of the
Example: Let's imagine that, as a result page.
of the semantic search process, we have On the login page, enter your PetCareHub username and password.
Once you have entered your credentials, click on the "Login"
retrieved a document from our Knowledge button.
You should now be logged in to your PetCareHub account.
Base (KB). All these documents provide
Login to PetCareHub from the mobile application
information about the functioning of
Open the PetCareHub app on your mobile device.
"PetCareHub", a fictitious product dedicated On the home page, tap the "Login" button located in the lower right
to pet care. corner.
On the login page, enter your PetCareHub username and password.
Once you have entered your credentials, click on the "Login"
button.
You should now be logged in to your PetCareHub account.

3-Incorporation of relevant information from the Knowledge Base (KB), i.e. the document
retrieved during the semantic search.

Example: We can add its content inside the prompt like this.

100
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

As an advanced chatbot, your main goal is to help users in the best way
you can.

Login to PetCareHub from the website

Open your web browser and go to the PetCareHub website.


Click on the "Login" button located in the upper right corner of the page.
On the login page, enter your PetCareHub username and password.
Once you have entered your credentials, click on the "Login" button.
You should now be logged in to your PetCareHub account.
Login to PetCareHub from the mobile application

Open the PetCareHub app on your mobile device.


On the home page, tap the "Login" button located in the lower right
corner.
On the login page, enter your PetCareHub username and password.
Once you have entered your credentials, click on the "Login" button.
You should now be logged in to your PetCareHub account.

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
4- Inclusion of the question formulated by the user as part of the instruction.

As an advanced chatbot, your main objective is to help users in the best way you can.

Login to PetCareHub from the website

Open your web browser and go to the PetCareHub website.


Click on the "Login" button located in the upper right corner of the page.
On the login page, enter your PetCareHub username and password.
Once you have entered your credentials, click on the "Login" button.
You should now be logged in to your PetCareHub account.
Login to PetCareHub from the mobile application

Open the PetCareHub app on your mobile device.


On the home page, tap the "Login" button located in the lower right corner.
On the login page, enter your PetCareHub username and password.
Once you have entered your credentials, click on the "Login" button.
You should now be logged in to your PetCareHub account.

Chatbot: Hi, how can I help you?


USER: I cannot find the login button.
Chatbot:

101
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

Chatbot Response:

No problem! On the website, the login button is


located in the upper right corner of the page. On
the mobile app, the login button is in the bottom
The answer comes from
the knowledge base right corner. Let me know if you need more help!
document

Problems Generating Responses with GPT-3


CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

If we query GPT-3 the question "Is the mobile app free?" and provide the login document as context,
we will often get an answer such as "Yes, the PetCareHub mobile app is free to download and use,"
even if this information is not present in context. Generating incorrect information is problematic for
customer service chatbots.

GPT-3 rarely produces inaccurate information when the answer is available in context.

As an advanced chatbot, your main objective is to help users in the best way you can.

Login to PetCareHub from the website

Open your web browser and go to the PetCareHub website.


Click on the "Login" button located in the upper right corner of the page.
On the login page, enter your PetCareHub username and password.
Once you have entered your credentials, click on the "Login" button.
You should now be logged in to your PetCareHub account.
Login to PetCareHub from the mobile application

Open the PetCareHub app on your mobile device.


On the home page, tap the "Login" button located in the lower right corner.
On the login page, enter your PetCareHub username and password.
Once you have entered your credentials, click on the "Login" button.
You should now be logged in to your PetCareHub account.

Chatbot: Hi, how can I help you?


USER: Is the mobile application free?"
Chatbot: "Yes, the PetCareHub mobile app is free to download and use."

102
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

References

• Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam,
P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R.,
Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., … Amodei, D. (2020). Language Models are Few-
Shot Learners.
• Bonta, A. (2022). How to use OpenAI’s ChatGPT to write the perfect cold email. [Link]
[Link]/post/how-to-use-ai-to-write-perfect-cold-emails.
• Chowdhery, A., Narang, S., Devlin, J., Bosma, M., Mishra, G., Roberts, A., Barham, P., Chung,
H. W., Sutton, C., Gehrmann, S., Schuh, P., Shi, K., Tsvyashchenko, S., Maynez, J., Rao, A.,
Barnes, P., Tay, Y., Shazeer, N., Prabhakaran, V., … Fiedel, N. (2022). PaLM: Scaling Language
Modeling with Pathways.
• Cobbe, K., Kosaraju, V., Bavarian, M., Chen, M., Jun, H., Kaiser, L., Plappert, M., Tworek, J.,

CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
Hilton, J., Nakano, R., Hesse, C., & Schulman, J. (2021). Training Verifiers to Solve Math Word
Problems.
• Jin, Y., Kadam, V., & Wanvarie, D. (2022). Plot Writing From Pre-Trained Language Models.
• Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y., Madotto, A., & Fung, P. (2022).
Survey of Hallucination in Natural Language Generation. ACM Computing Surveys. [Link]
org/10.1145/3571730
• Jurafsky, D., & Martin, J. H. (2009). Speech and Language Processing: An Introduction to Natural
Language Processing, Computational Linguistics and Speech Recognition. Prentice Hall.
• Karpas, E., Abend, O., Belinkov, Y., Lenz, B., Lieber, O., Ratner, N., Shoham, Y., Bata, H., Levine,
Y., Leyton-Brown, K., Muhlgay, D., Rozen, N., Schwartz, E., Shachaf, G., Shalev-Shwartz, S.,
Shashua, A., & Tenenholtz, M. (2022).
• Kojima, T., Gu, S. S., Reid, M., Matsuo, Y., & Iwasawa, Y. (2022). Large Language Models are
Zero-Shot Reasoners.
• Lake, B. M., & Baroni, M. (2018). Generalization without Systematicity: On the Compositional Skills
of Sequence-to-Sequence Recurrent Networks. [Link]
• Liu, J., Liu, A., Lu, X., Welleck, S., West, P., Bras, R. L., Choi, Y., & Hajishirzi, H. (2021). Generated
Knowledge Prompting for Commonsense Reasoning.
• Liu, P., Yuan, W., Fu, J., Jiang, Z., Hayashi, H., & Neubig, G. (2022). Pre-train, Prompt, and
Predict: A Systematic Survey of Prompting Methods in Natural Language Processing. ACM
Computing Surveys. [Link]
• Nadeem, M., Bethke, A., & Reddy, S. (2021). StereoSet: Measuring stereotypical bias in pretrained
language models. Proceedings of the 59th Annual Meeting of the Association for Computational
Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume
1: Long Papers), 5356–5371. [Link]
• Nobel, P. S., & others. (2002). Cacti: biology and uses. Univ of California Press
• OpenAI. (2022). ChatGPT: Optimizing Language Models for Dialogue. [Link]
chatGPT/. [Link]

103
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

• Shin, T., Razeghi, Y., Logan IV, R. L., Wallace, E., & Singh, S. (2020). AutoPrompt: Eliciting
Knowledge from Language Models with Automatically Generated Prompts. Proceedings of the
2020 Conference
• on Empirical Methods in Natural Language Processing (EMNLP). [Link]
v1/[Link]-main.346
• Sun, Z., Wang, X., Tay, Y., Yang, Y., & Zhou, D. (2022). Recitation-Augmented Language Models.
• Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q., & Zhou, D.
(2022). Chain of Thought Prompting Elicits Reasoning in Large Language Models.
• Wang, Z., Mao, S., Wu, W., Ge, T., Wei, F., & Ji, H. (2023). Unleashing Cognitive Synergy in Large
Language Models: A Task-Solving Agent through Multi-Persona Self-Collaboration.
• Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., Narang, S., Chowdhery, A., & Zhou, D. (2022).
Self-Consistency Improves Chain of Thought Reasoning in Language Models.
• White, J., Fu, Q., Hays, S., Sandborn, M., Olea, C., Gilbert, H., Elnashar, A., Spencer-Smith, J., &
Schmidt, D. C. (2023). A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

• Ye, X., & Durrett, G. (2022). The Unreliability of Explanations in Few-shot Prompting for Textual
Reasoning
• Zhao, T. Z., Wallace, E., Feng, S., Klein, D., & Singh, S. (2021). Calibrate Before Use: Improving
Few-Shot Performance of Language Models.
• Zhou, D., Schärli, N., Hou, L., Wei, J., Scales, N., Wang, X., Schuurmans, D., Cui, C., Bousquet,
O., Le, Q., & Chi, E. (2022). Least-to-Most Prompting Enables Complex Reasoning in Large
Language Models.

104
New Technologies
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

105
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.
CERTIPROF® is a registered trademark of CertiProf, LLC in the United States and/or other countries.

106
PROMPT ENGINEERING FOUNDATION PROFESSIONAL CERTIFICATION CPEFPC™

You might also like