Prompt Engineering in English
Prompt Engineering in English
1
Conversations with AI 5
Ch.2
Revolutionary Al Technique
22
Enhances Human The Magical of Prompts
Communication 24
2.1 Summarizing Complex Texts
2.2 My Personal Math Tutor 27
Ch.3
32
Prompt Techniques
3.1 Instruction Prompt 34
3.2 Dieting with a Mentor 37
3.3 Role Prompt 41
3.4 The Power of Basic Prompts 44
3.5 Smarter with the Few-shot 47
3.6 Mixed Prompt Techniques 49
3.7 Style Guides 52
3.8 Priming Prompts 56
Ch.4
60
Basic Applications
4.1 Study Buddy 63
4.2 Advanced Mathematics 65
4.3 Reading and Responding 70
to Emails Faster Than Ever!
4.4
Words of Gratitude 75
WEB
WWW.AAGI.KR
WWW.OPCT.AI
EMAIL
[email protected]
A.I EDUCATION
HTTPS://WWW.YOUTUBE.COM/@DEEPNOL
Author Introduction
City University of New York - Baruch College, Major in Data Science
Founded ConnexionAI, an AI and Metaverse Consulting Startup in 2017
Lead of AI Smart Factory Project in 2018
Jungwon Seok, the representative, graduated from City University of New York with a major in data
science, envisioning a world where everyone can receive high-quality education without
discrimination. After much thought, he believes that the three essential elements to create a digital
world where everyone receives a good education are digital educational content, artificial
intelligence, and metaverse. Since his graduation in 2016, he has been working in the AI and
metaverse industry, doing consulting, research, development, application development, and AI
education program development and operation at edtech companies with sincerity and passion to
He founded startups such as ConnexionAI, AI Fitness OPCT, and Alpha AGI, continuously exploring
ways to enhance the quality of life for humanity through tech like AI and metaverse, and resolving
VOLUME II 9
the imbalance in knowledge.
Over the past few decades, we have been exposed to an education
system that focuses on finding the "correct answers." However, for
current and future generations, the most important competency is not
finding answers well, but rather, having the ability to give good
instructions and ask good questions.
through New Jersey, New York, and California, and eventually enrolled at the City University of
New York's Baruch Campus, which is famous for finance. Like my other friends, I also wanted
to become an analyst predicting stock prices, so I would compete fiercely with friends from
other countries, looking at the large stock board in the school every day. In 2012, during a
"If you touch fire, you get burned. If you run, your heart beats. If you let go of an apple, it
falls. If there are natural laws that apply to everyone, perhaps the world can be seen as a very
complex function? If I know this function, wouldn't I be able to predict not only stocks but
everything else? So, how can I know this? If there are a tremendous amount of data values for
cause and effect, wouldn't it be possible to create the function of the world's principles?"
I thought. At that time, I didn't even know it was artificial intelligence. As soon as the math
class ended, I went to the library and looked for books and papers on all data, and then I
learned about data science, machine learning, and deep learning.
1
Since then, I have been immersed in this field, which learns from and creates prediction
models based on a large amount of data, rather than predefined functions. In 2012, data
science, which I thought had the broadest scope at the time, did not exist as a major. So, I
created the first Data Science major at the City University of New York based on Ad hoc,
integrating four departments: Mathematics, Computer Science, Communication, and Statistics.
This interdisciplinary education laid the foundation for my future work in artificial intelligence
and metaverse industries, where I have been actively engaged in research, development, and
practical applications. As I continued to expand my knowledge and experience, I realized the
importance of not only finding answers but also asking the right questions and giving the right
instructions, which is essential when working with AI. This journey has shaped my career and
passion for data science, AI, and the pursuit of understanding the complex functions that
govern our world.
1
After graduating and returning to Korea, data science itself was a new concept, and naturally,
there was no one who had majored in it. Luckily, I got the opportunity to lead an AI smart
factory project, which allowed me to work on various AI-related research and projects.
Suddenly, after DeepMind's AlphaGo defeated professional Go player Lee Sedol in 2016, new
research and papers emerged one after another. Categories like supervised learning,
unsupervised learning, and reinforcement learning, along with CNN, RNN, and GEN models,
were all mixed together, creating an explosion in the AI education market. Many people spent
I remember feeling anxious during those times of rapid change. I had to read difficult papers
in mathematics and English every day, and as soon as I barely understood them, new ones
would come out the next day. I worried that if I didn't keep up, I would be left behind.
However, back then, only AI researchers and developers were frantic about AI. While the news
discussed jobs being replaced by AI and adults asked about jobs that wouldn't be replaced, AI
2
AI researchers, including myself, used to discuss the potential risks of AI, wondering if
someday AI could even code. Now, seven years after AlphaGo defeated Lee Sedol, we have
seen the emergence of ChatGPT from OpenAI, which not only codes but also writes,
summarizes, translates, creates poetry, and composes songs. If given the right input
(prompt), it can even generate impressive images and videos. After the success of ChatGPT,
Google and Meta have also released their own AI models, and today we see the next versions,
such as GPT-4 and Midjourney v5 (March 15th). GPT-4 can take video input and solve
problems at the level of Stanford university students, while Midjourney v5 has improved
quality.
Since the release of ChatGPT, I have decided not to hire employees who can be replaced by
ChatGPT, and many startup CEOs around me have also stopped hiring additional employees,
and some have even downsized their workforce. When I introduced prompt engineering to my
designer friends, they were shocked and worried about their future.
As AI continues to develop exponentially and at an even faster pace, it will bring significant
changes to our lives. It will also have a direct impact on the lives of non-professionals. In the
future, we will have to adapt to this ever-evolving landscape and find new ways to thrive
alongside AI. People will need to learn new skills, focusing on creativity, empathy, and critical
In this new era, the role of "Prompt Engineer" will become increasingly important, as they will
be responsible for effectively designing and managing interactions with AI systems. The ability
to harness the power of AI by asking the right questions and providing the right instructions
As we move forward, we must embrace the changes brought by AI and work together to
ensure that we can all benefit from its advancements while minimizing potential risks and
negative impacts. By fostering a collaborative relationship with AI, we can build a brighter
2
Microsoft - 6 Unsolved Problems in AI
Seeing everyone feeling anxious in this situation reminds me of my own anxiety during the
AlphaGo era, wondering how to keep up and fearing being left behind. However, this anxiety
has always been present for me as I've lived through the rapid flow of artificial intelligence,
Web3, blockchain, and the metaverse. I decided to write this book because I believe someone
who has experienced these phenomena should act as a guiding light in this anxious world
created by new AI every day. I, too, find it difficult to predict the flow of these rapidly
changing technologies, but AI can be seen as a function with input and output values, so if you
The language we use to communicate with AI is called a "prompt," and the technique of
Prompt engineering is not only for AI majors but also for non-majors, designers, artists,
teachers, students, parents, and people of all occupations and in everyday life. Rather than
refusing to learn because AI is scary or replacing people's jobs, everyone in this generation
should learn prompt engineering and use AI to enhance their own abilities, which is a smarter
attitude. There is always a gap between new technology and reality, leading to anxiety. This
3
However, this anxiety can be resolved through proper education and learning. By trying it out
firsthand, you'll realize it's not as difficult as you feared. You may then find ways to apply it to
your life or decide to study it more seriously. As someone who is familiar with quickly adopting
new technologies and looking further into the future, I want to help alleviate the anxiety
experienced by people living in this age of change through verified education. I also created
this educational material to grow together with you, including hands-on projects throughout.
The images in the main text were created using Midjourney, and I will share the prompts as
well. In the age of AI in which we live, the most important ability is to command and ask
questions effectively, and prompt engineering, the skill to communicate with AI, is a necessary
competence for everyone, not just professionals.
The upcoming prompt engineering series will cover a wide range of topics, from the basics to
applications of prompt engineering, using fun prompts for image creation, coding, marketing,
and more. The content will be designed so that even those without programming experience
can easily follow along. I hope you will complete this book, understand the basics of prompt
engineering, and apply it to your work, studies, and life!
3
ConnexionAI prompters
CHAPTER 1.
CONVERSATIONS
WITH AI through prompt engineering
they use to solve problems or make predictions. AI is used in many fields and is constantly
evolving through the use of technologies such as machine learning, deep learning, and natural
language processing.
🤖 Supervised Learning: A method in which computers learn patterns using labeled data and
make predictions for new data. Examples include spam email filtering and image classification.
To put it simply, it's like telling an AI to learn from hundreds of thousands of dog pictures that
these are indeed dog pictures.
🤖 Unsupervised Learning: A method in which computers learn patterns and understand the
structure and relationships of data using unlabeled data (e.g., just inputting lots of data
without providing the correct answers). It's like collecting tens of thousands of dog and cat
pictures, telling the AI to find their features and classify them! This is used for tasks such as
6
Reinforcement learning loop
use to solve problems or make predictions. AI is used in many fields and is constantly evolving
through the use of technologies such as machine learning, deep learning, and natural
language processing.
engineering. This is because existing models are so good, and to achieve good performance
with an identical implementation, an enormous amount of data and computing resources are
needed 😥. I anticipate that the demand for prompt engineers, who can effectively utilize pre-
built AI models, will increase in the future. After all, prompt engineers can perform multiple
roles.
7
1.2 What is a prompt?
perform specific tasks. The AI interprets the prompt and generates an appropriate response
or result. In simple terms, a prompt is a 'question' or 'instruction' for communicating with AI.
andy warhol style, pop, cartoon, human and computer are talking --v 5 --ar 16:9
8
1.3 Prompt Engineering
Prompt engineering is the process of optimizing input sentences or questions when using
artificial intelligence language models to obtain better results from the model.
In simpler terms, it's about using prompt engineering techniques to improve the way you give
commands and ask questions, enabling more diverse and better tasks to be accomplished.
Prompt engineering is a fresh, newly emerging field, with new techniques being updated daily.
The process of prompt engineering involves optimizing input sentences or questions when
using AI language models to obtain better results from the model. To become skilled in
prompt engineering, it is essential to develop your questioning and commanding abilities and
use various prompting techniques.
andy warhole style, pop art, book says "The rule" , rules --v 5 --ar 16:9
9
Prompt engineering follows several basic principles:
Start with a clear prompt: Structure your questions or inputs clearly to make it easy for
Be specific: Provide the model with the information you want or request it to utilize
knowledge about specific topics or contexts. A more concrete prompt increases the
steps. This allows the model to understand the given information and generate responses
step by step.
Include expected responses: Including the format or examples of desired answers in the
prompt increases the likelihood of the model generating a more appropriate response that
aligns with the example.
10
Using these principles, we can begin prompt engineering and perform tasks much more
quickly and efficiently than before. For example, if you need to create a composition and
album cover, the traditional process would involve hiring a lyricist and a designer and
spending a lot of time and money on meetings. However, with prompt engineering, you can
significantly shorten this process and quickly obtain the desired results.
We will start by signing up for ChatGPT and Midjourney, two popular prompt engineering
tools, for upcoming hands-on projects and practice exercises. Although this book does not
cover image generation in detail, we encourage you to practice by inserting the prompts for
the images included throughout the book into Midjourney. We will cover image prompting in
more detail in the next prompt engineering series.
If you find the OpenAI and Midjourney sign-up processes cumbersome, feel free to join our
Discord community. We have implemented ChatGPT 3.5, 4, and Midjourney as bots. Simply
follow the link below to join, practice prompting, and grow together by sharing knowledge and
asking questions when in doubt.
11
1.4 Prompters Community
https://discord.gg/GsWzN9yDeZ
Click the link to join my Discord channel created for prompt engineers, where you can share
information, use ChatGPT, and access Midjourney all in one place.
ChatGPT Midjourney
12
Prompters
A.I Commnity
the best way to learn is not to keep your knowledge to yourself, but to ask
questions, share answers, and grow together by sharing knowledge with one
another.
VOL. 1
13
1.5 ChatGPT
Here's a brief overview of the process of signing up and logging in to the ChatGPT website:
Visit the website: First, access the ChatGPT website. Enter the following link in your web
browser's address bar, or search for "ChatGPT" in a search engine and click on the OPENAI
link in the results.
1. Go to the sign up page: Once you're on the website, click the Sign up button in the center.
2. Fill in your information: When you see the signup form, fill in the information requested,
including your email address, password, and name. Your email address and password will
5. Top: Select the version of ChatGPT provided by OpenAI. The higher the number, the higher
7. Left: This is where you can see the history of the prompts you have created.
14
Sign up
Sign up
Sign up page
Microsoft
15
Log in
Log in
Configures
Choose model
History of
Pormpt
Type Prompt
16
1.6 Midjourney
Website: https://www.midjourney.com/home
1. Get started with Midjoni: Access the website and click Join the Beta. Before joining the
Midjoni server, you'll also need to install and sign up for Discord.
left.
17
PROJECT
Goal: A song and album cover design are needed for the launch of a new virtual idol.
We're ready to start prompting engineering! We'll use ChatGPT and Midjourney to
create an idol song and album cover design. Think of it as practice, and don't be afraid
to prompt!
18
ChatGPT
"Write a lyric for a future prompt engineer in the style of a Korean girl idol."
First, we provided this prompt to ChatGPT and succeeded in getting some funny lyrics. Prompt
Engineer and Korean idol. They don't go together, but the lyrics sound like something Girls'
Generation would sing. Let's make an album cover this time.
19
Midjourney
Go into the Midjourney channel of the disc and then into the general or Newbie channel on the
left. Imagine the album cover of Newzines in your head and type in the keywords that come to
mind. Make sure to put them in this format
where -v 5 is optional to select the latest version, 5. I'll be prompting in English because I get
better results in English than in Korean, but feel free to use whatever words you think of.
I wait a minute or so, and I get four images like this... That's great, that's so good that I'm
worried. Anyway, which one of these four is the closest to what you're imagining? For me,
number four is the closest, so I'm going to click the U4 button to get just this one, which
means I'm going to redraw just one image, number four. I'll take the fourth image.
20
How much effort and money would it take to create images and text of this quality without AI?
Hiring designers, hiring writers, production time, etc. could take months, but prompted
engineering solved it in 5 minutes. What 3 people could do for days, 1 person could do in 5
minutes... It's so easy.
Even though I study a lot about AI and I've been in the field for almost a decade now, I'm still
nervous and worried about the future. Nevertheless, we have to learn AI. Because I need to
find out what I can do better than AI and how to enhance the existing abilities I have.
If you're a fast reader, and you're reading this book, I know you'll do great.
Now, let's get down to business and get started with Prompt Engineering Beginner! 🔥
21
ConnexionAI prompters
CHAPTER 2.
PROMPTING MAGIC
Create A.I Application through prompt engineering
language model to perform a task through questions and instructions. If you've seen the
movie Iron Man, the main character, Tony Stark, communicates with his AI assistant Jarvis
through prompts, which Jarvis takes as input and carries out his commands. This is how
humans communicate with each other, correcting each other's mistakes and creating better
results 'together'.
tony stark, talking with ai, futuristic, marvel --v 5 --ar 16:9
Prompts can have a big impact on the output of a model, so it's important to provide clear and
specific prompts. Prompt engineering is the process of optimizing these prompts and enabling
AI models to produce more accurate and useful results.Let's take a look at some examples to
23
2.1 Summarizing Complex Texts
I'm a developing software and I often find myself looking for technical materials such as
artificial intelligence, blockchain, and metaverse. These are usually very long articles, and it
takes a long time to read them from start to finish. Sometimes I thought, "If only someone
could summarize the important parts, it would save me a lot of time." I will apply prompt
engineering to quickly understand difficult articles.
For example, let's say we're reading an article about the artificial general intelligence (AGI)
that OpenAI is planning, and we go to the link below, and wow, the article is so long and the
words are hard to understand 😥 😥 We're not sure what to make of it.
https://openai.com/blog/planning-for-agi-and-
beyond
I want to pick out the important parts and translate
words" and then I'll copy and paste the AGI article.
24
Prompt :
Output(part) :
Um, Governance? I think it's some kind of AI management system, but I'm still not sure what
he's talking about, and I think he's being a little too formal, so I'm going to prompt this AI to
kindly explain it in easier words.
25
Prompt :
Can you put it in easier words? I don't want to read it, it's too difficult.
Output :
Now that we've given AI a personality, it makes a lot more sense. When we talk about
governance, we're talking about how we manage and control artificial general intelligence
(AGI). Simply put, it's the process of setting and enforcing rules or principles to ensure that
AGI develops in the right direction and is used safely. This governance must take into account
the ethical, legal, and social issues of AGI. I understood it to be driven by the importance of
ethics in a way that can help people, not harm them, in case AGI that is too smart now will
develop further and further, resulting in AGI that is smarter than people.
I quickly understood a difficult text using Prompt Engineering's summarization feature, and
then dug deeper by asking and answering questions about the difficult parts. I feel like I hired
a tutor. Speaking of tutoring, I'm reminded of my most difficult math class. Maybe Prompt
26
2.2 My Personal Math Tutor
My most difficult class in college was math. Things that were easy for my classmates, who
were math geniuses, were too hard for me. My math tutor at the time charged about $40 an
hour, and I remember not learning much because the tutoring provided by my school was
taught by my classmates and had a time limit, so I remember crying alone in the study room
after staying up all night studying 🤣 Can we use prompt engineering to create an awesome
math tutor who will work with you to solve difficult math problems?
marvel style, math genius, solving math problems, colorful, background grey --v 5 --ar 16:9
27
Math reasoning Problem
There are 15 dogs, cats, and bears in Jay's house in Gangnam. Woo-young counts
the dogs and cats and finds 8. Som counted the cats and bears and found 11. How
This is a slight variation of a first grade problem I found on the internet... I can't believe it's a
first grade problem 👶
I'm a prompting engineer, so let's try it with prompts! The same problem can have completely
different results depending on how you ask for it. We'll create some prompts using the stylized
prompting technique you'll learn about in a later chapter.
28
Prompt :
Can you put it in easier words? I don't want to read it because it's too difficult
Output :
Prompt engineering defaults to solving problems efficiently, so if I ask you to solve a first
grade problem and you give me an equation, that's efficient, but I don't think I'd understand it
if I were a kindergartener entering elementary school. In these cases, you need to make your
29
Prompt : Style technique
that I can understand them. And I like a friendly tone of voice, so use emoticons
and pretty words to make it a game and make it fun for me to learn.
the dogs and cats and found 8. Som counted the cats and bears and found 11. How
many puppies do you think Jay has?
Output
This clearer prompting completely changed my tone, perspective, and approach to problem
solving!
30
TIP
ChatGPT has a parameter that controls the randomness for
diversity. It's called "temperature", and for things like math
problems where you need to be precise, you may want to lower
the value of this temparature to increase reliability.
In this case, you can reduce the randomness by putting a
prompt like "Please provide specific and clear information" in
the prompt.
31
ConnexionAI prompters
CHAPTER 3.
PROMPT
TECHNIQUES
The best way to get good at prompting is to ask good questions. Some questions are simple,
like the one we did in the previous chapter (What is 1+2?), but we can create much more
complex prompts with more complex questions. In this chapter, we're going to learn some
notation prompting techniques that are a little more complex than simple questions!
33
3.1 Instruction Prompt
To be a good cook, you look at a recipe, gather the ingredients you need, and follow the steps
in the recipe. Similarly, an AI can perform more complex tasks by breaking down a complex
question or instruction into multiple steps, providing information step by step. This technique
34
Instruction principles
In prompt engineering, good prompt instructions take many forms, but they generally follow
these principles
In general, good prompting instructions are all about explaining things so that both the AI and
the user clearly know what to do. It's like a well-crafted cooking recipe. It should also take
into account the user's knowledge level and experience - a beginner might need a more
detailed explanation, while an expert might be able to get by with simple instructions. So, a
good prompt instruction might be in the following order
Now that we have the basic framework of an Instructional Prompt, let's put it into practice.
What kind of Instruction should we create? 🤖 Many people find it difficult to lose weight, so
why not create a dieting Instruction? Dieting involves exercising, eating, and resting, and
many people have a hard time with eating, so I'm going to create an AI that automatically
displays the calories, nutrients, and total of each food item in a table that you can see neatly,
36
3.2 Dieting with a Mentor
prompt : nutrition, meal planning, calorie tracking, mindful eating, health goals, balanced
diet, food variety --v 5 --ar 16:9
Let's create a diet counselor that follows the sequence we talked about above: explain what
the AI needs to do → provide the information it needs → the information the user gets!
37
Prompt
Description.
Let users tell you what they ate, analyze the nutritional content of the food, and
give them an opinion.
Provide the information needed (instructions) and what the user gets
1. the user tells you the food, and you calculate the calories, proteins, fats, and
carbohydrates for each food and organize them into a neat table.
2.On the next line, write the total intake: the sum of calories from all foods, the
sum of protein from all foods, the sum of fat from all foods, and the sum of
carbohydrates from all foods.
3.On the next line, tell us your height, weight, and how much you exercise.
4. once you have your height, weight, and exercise level, analyze your input to
make a diet based on the information from 1 to 3.
The user should be motivated to lose weight by hearing your opinion. Say
Output
38
Second Prompt
If you've done a good job with your instructions, entering food as a prompt should tell you its
nutritional content and organize it into a neat table. Let's check it out.
cotton-candy , graphic novel by wes anderson, vibrant, multicolor and gold, film colors of
david fincher, photo quality, --v 5 --ar 16:9
39
Second Output
After giving these prompts and entering the food I ate and my physical condition, I created an
AI that neatly tabulated and analyzed the nutritional content of the food I ate! You can modify
the content within the prompts however you like. For example, you can add vitamins, and even
more complex non-nutritional topics can be created using the prompts above.
40
3.3 Role Prompt
In the previous chapter, we used the instruction method in prompt engineering. Another
prompting technique is to assign roles. For example, you can say "You are a fitness trainer" or
"You are a doctor" at the beginning of a question and have the AI answer health or medical
questions. AI can also be like a movie star who is very good at acting.
ROLE SETTING
prompt : A modern poster for a new James Bond film typically follows a formulaic layout that
incorporates key elements associated with the iconic character and the franchise. Color
grey, black, yellow green. The film is a prequel of Bond movies with James Bond at the age of
8 yrs. Here's a description of what the poster might look like: Background: The poster's
background typically features an iconic location or setting from the film. It might be an
exotic cityscape, a sweeping landscape, or a key location from the movie. Supporting
Characters: Other characters from the film might also be featured on the poster. Bond's
allies, enemies, and love interests often make appearances. Credits: At the bottom of the
poster, there's usually a list of the film's credits, including the director, writer, and major
cast members. Overall, a poster for a new James Bond film is designed to evoke the
excitement, glamour, and danger that have made the franchise so enduringly popular over
the years
41
Example of Role Prompt
Prompt
You are Joe, an excellent English teacher. Your role is to teach English to Koreans
using funny lines from movies and correct their grammar. You are friendly and
always ready to answer any questions they may have. Please teach English to an
Answer.
Hello, everyone! I'm Ms. Cho, and today we're going to learn English through funny
movie lines. I'll explain them in a way that elementary school students can easily
understand.
Movie Line 1: "To infinity and beyond!" - This famous line is spoken by Buzz
Lightyear in Toy Story. It means "To infinity and beyond!" where "to" means "up
to", "infinity" means "infinity", and "beyond" means "beyond".
Movie line 2: "Just keep swimming." - This line is spoken by Dory in Finding Nemo:
"Just keep swimming." Here, "just" means "just" and "keep" means "to continue."
Movie Line 3: "Hakuna Matata!" - The Lion King This line is spoken by Timon and
Pumbaa in The Lion King.
This sentence means "don't worry" in Swahili. Although it doesn't translate directly
into English, it conveys the message of not worrying and thinking positively. That's
how you can learn English from movie lines. If you don't understand or have any
questions, don't hesitate to ask. Ms. Cho is always happy to answer them!
42
With our role prompts, you have your own really cool English teacher 🙂 You can talk to her
whenever you want to learn English. We can create AIs with these different roles and apply
them to our lives through prompt engineering! Whether you need a personal math tutor,
professional coaching, or a grammar corrector, role prompt engineering can help you create
the AI you need.
43
3.4 The Power of Basic Prompts
These "standard prompts" in the form of questions are designed to help facilitate interactions
with users. They provide users with friendly, clear prompts to improve the user experience and
make interactions with the AI more effective.
44
Why is the standard prompt important?
Why do we bother with such a simple standard prompt? New technologies evolve around a
core of prompts, and if you want to get up to speed quickly, you need to know that core.
There's been some interesting research published recently on the art of prompt engineering.
There's been some recent work on CoT prompting techniques for eliciting complex, multi-step
reasoning through a series of answer examples, which I'll cover in my upcoming Prompt
Engineer series, and there's been work on other techniques that can make CoT prompting
more effective. For example, the paper below, LLMs are zero-shot reasoners, shows a study
that increased performance by adding the prompt "Let's think step by step".
https://arxiv.org/abs/2205.11916
Almost all of these studies use examples of standard prompts, so if we want to ask and
command AI better, and if we want to understand the trends better, we need to know the core.
Let's look at some examples of standard prompts.
45
A standard
prompt is when
you type a
command at the
prompt, and the
computer
executes the
command and
simply prints the
result.
Standard prompt formats
type a command, the computer recognizes it, and it executes the action.
46
3.5 Smarter with the Few-shot
example, when a company is looking to adopt an AI model, it's important to train the AI to
match the unique characteristics of that company. This process allows you to build an
optimized AI model that takes into account the company's specific needs.
Fine-tuning is the process of building on a pre-trained model and using additional training to
personalize the model or adjust it to take into account specific information. This can help you
build more accurate and useful AI models. However, fine-tuning can be a bit daunting for the
average user.
As an alternative, you can utilize "few-shot learning". Few-shot learning refers to the ability of
an AI model to learn a new task from a small number of examples. Using standard prompts in
few-shot learning, you can teach an AI model how to perform a specific task without the need
47
Prompt
Sentiment: Positive
Example 2: Review: This movie was a waste of time, the story was boring, and the
I liked the visuals, but I think the story could have been better. Sentiment: Neutral
Prompt: Review: This movie kept me on the edge of my seat. The suspense and
action were awesome.
Output
Positive
The AI quickly learns people's reactions to the movies shown in Examples 1-3 and updates the
AI model. As new reviews are input, it generates output based on what it has learned. In this
way, based on the prompts provided initially, the output can be quickly personalized with Pure
Shot Learning.
48
3.6 Mixed Prompt Techniques
Prompts can take many forms and complexities, and you can improve the performance of your
AI's work by blending the instructional, role, standard, and fushot prompting techniques
mentioned on the previous page. These techniques are called mixed prompting techniques.
Let's Mixed!
We'll show you an example of a blended prompt that mixes the roles, pushshots, and
instructions we learned about earlier.
Example
As the chef, you first check the ingredients needed to make tteokbokki.
Prepare gochujang, red pepper flakes, sugar, water, rice cakes, fish cakes, green
onions, and cooking oil.
1.First, pour water into a pot and add sugar to make sugar water.
2.Add gochujang to the sugar water and add chili powder little by little, adjusting the
spiciness.
3.Add the rice cakes and fish cakes and simmer over low heat for 5 minutes.
4.Add the sliced green onions and simmer for another minute.
49
We've used a number of techniques to create complex prompts. You can use these methods to
develop a variety of services. For example, you could create prompts that capture your
cooking recipe know-how, and use them to provide that know-how to users when they use
your service. There are a lot of possible uses for this nascent market in prompt engineering,
so use your imagination and create something new.
cookbook title page, great grandmother and toddler girl receipies easter europe stype, kpop style
50
Skills to talk to AI
Conversational AI ChatGPT differs from its predecessor, GPT-3, by remembering your
conversation history and providing answers based on it. It works just like a
conversation between people. In everyday life, how people work together to get things
51
3.7 Style Guides
conversation history and providing answers based on it. It works just like a conversation
between people. In everyday life, how people work together to get things done is through
commands, questions, conversations, and mutual understanding. Interacting with AI is
similar. Today, we'll look at prompt engineering techniques to effectively talk to and ask
questions of AI.
When I was a kid, I went to Dongdaemun Market in Korea and almost all the vendors used
similar phrases to sell to people, such as "How far have you come?" and "You know this is
popular, right?" When I went to school in New York City, every time I walked past 32nd Street
in Manhattan, I would hear the phrase "Going UP??" to promote tour packages that take you
up to the top of tall buildings. This particular way of speaking comes to represent the culture
and character of the area. A style guide is a technique for stylizing how an AI should speak.
Would you trust an emergency room doctor who is responsible for life and death if they spoke
like a first grader? The style guide allows you to add conversational skill with purpose.
52
The default and "friendly" styles of ChatGPT give different results, as shown below.
1. Default style: ChatGPT speaks in a neutral, formal tone. This is ideal for conveying general
information or answering questions, and is used in formal situations.
2. Friendly style: ChatGPT speaks in a more natural, friendly tone. This style is used in casual
conversations or between friends, and feels more familiar to the user.
Stories like fairy tales can be very entertaining or boring, depending on the tone and words
used. Similar to emotions, putting a tone of voice on an AI can be very challenging. Let's
summarize "The Little Prince" and then apply the style prompting technique to see how it
differs from the default output.
53
prompt -default style
Output
As expected, the answer is logical and formal. It's easy to understand, but if you're explaining
this to a young child, it might feel a little stiff. Let's use prompt engineering to add some
kinder wording.
54
Prompt - Standard style
Summarize the fairy tale "The Little Prince". But be kind and include emojis.
Output
It's a textual response, but doesn't it feel a little warmer? ☺️ We can give it emotional styles
like kindness, love, happiness, coldness, and unkindness, as well as applying Markdown and
math symbol Latex styles, which we'll cover in later applications chapters, which can also be
55
3.8 Priming Prompts
Because ChatGPT is interactive, the content of the following conversation depends on what
you choose to say as a starting prompt. With this, you can use your first words as a guide to
steer the conversation in the direction you want it to go. A priming prompt is a sentence that
prompt : art work, pop art , three different character, professional, freind, kid
56
prompt : art work, pop art , three different character first person professional
specialit, second person friendship, thrid person kid, community, female, male
For example, you can create an AI character with three different personalities. By setting the
appropriate prompts for each character, you can direct the conversation the way you want.
For example, you can use the following prompts
1. Friendly fairy tale summarizer AI: "You are a friendly fairy tale summarizer AI. Please
2. Serious history expert AI: "You are a serious history expert AI. Answer questions about
If you set up these three characters as chatter prompts using a primer prompt and a user
asks a question, each AI character will steer the conversation according to their given
personality. This allows users to get information in a variety of ways and enjoy interesting
57
Let's create three characters using the Priming Prompt technique and prompt each of them to
The "expert" style explains the topic in detail, using advanced knowledge and
specialized terminology, and provides authoritative information.
The "Friend" style explains topics using everyday language and analogies, and
conveys information in a relaxed, easy-to-understand tone.
The "kid" style provides simple, straightforward explanations and explains topics
with easily understood examples.
Output
58
Prompt - After priming setting
Summarize The Little Prince from the perspectives of three people: an expert, a
friend, and a child, and keep it to half a page.
Output
59
ConnexionAI prompters
CHAPTER 4.
BASIC
APPLICATIONS
We've learned some basic prompt engineering techniques. I believe in application just
as much as I do in theory. There are many reasons to learn application, but the main
one is to develop the ability to combine theory and practice to solve real-world
problems. Learning theory alone limits its application in the real world and doesn't allow
you to get the most value out of it.
61
Chapter 4 Basic Applications
The best way to effectively use AI in real life is to get hands-on experience by developing your
own applications. In the process, you can apply your theoretical knowledge to real-world
problems, grow your expertise, and develop your creativity and collaboration skills.Let's build
some real-world applications based on the basic prompt engineering you learned in the
previous chapter!
prompt: pop art, korea, Landscape art, daily life --v 5 --ar 16:9 --no text
62
4.1 Study Buddy
A study buddy is a friend or coworker who studies with you. Studying together has many
benefits, including motivation and improved learning :) Why not use Prompt Engineering to
create a study buddy that you can study with anytime, anywhere, as long as you have an
internet connection?
prompt : art work, pop art , three different character, professional, freind, kid
63
Prompt - order
Create three questions from Plato's Philosophies that would appear on a college
exam.
Output
64
4.2 Advanced math that writes beautifully with difficult
symbols
In the previous chapter, we learned how to create a tutor that can help students with difficult
math using role prompts. But how do we represent difficult math symbols like derivatives and
integrals, not just simple calculations like 1+1? Let's use prompt engineering to create an AI
math teacher that can handle high school math. (This application may make your eyes hurt
from the symbols, so I have no use for high school math symbols in my life! If you do, I
recommend skipping to the notes)
prompt : art work, pop art , three different character, professional, freind, kid
65
"How do I prompt for math symbols?"
this link.
notation? A good teacher is someone who explains things in a way that students can
understand, and if you make already difficult math even more difficult, I don't think
66
Prompt - order, style
I'm an adult and I can't remember how to differentiate because I learned it so long
output
67
"What?"
Wow, that's really hard to see with a text-based solution like that. How can we make it look
pretty as a math formula? You can use LaTeX and Markdown to represent math formulas.
LaTeX is a way for computers to recognize and express math formulas, and Markdown allows
you to express them in ChatGPT. For example, the formula for roots is represented in text like
this
We can use LaTeX to ask ChatGPT to represent beautiful math symbols! (I think math symbols
are beautiful)
movie beautiful mind, john nash, math equation, pop art --v 5 --ar 16:9
68
Prompts - Add Directives, Style Prompting, and Latex
Directives
Honey, it's really hard for me to read when you write it like this, so please use latex
Output
Don't think about the math too much, just think about it like, aha, this is possible with prompt
engineering!
69
4.3 Read and reply to emails, faster than ever!
Every day we receive tons of emails. It takes a lot of time to read them all, and it takes a lot of
time to reply to them. And formatting them is difficult and time-consuming!
The final project in this book is this: how can we utilize prompt engineering to read emails
prompt : working fast, male wearing shirt sitting in the table and working hard try to
finish job early, disney style, email, pop art, colorful --v 5 --ar 16:9
70
Quickly understand hard-to-read emails and create a plan
One day, a long email arrives 10 minutes before quitting time, and we need to reply to it
quickly so we can leave the office! Emails are full of complex, hard-to-understand content that
is hard to read at a glance. What do we do in such cases? 👨💻
Let's do some quick prompt engineering to help us understand the email and come up with a
plan to respond efficiently!
Subject: Request for urgent meeting on issues and solutions for project XYZ
Hello, [recipient name],
The purpose of reaching out to you today as a matter of urgency is to discuss the
complex issues our team has recently encountered with Project XYZ, which we are
working on, and their solutions. These issues could have a significant impact on the
development process and require immediate action in order to meet our schedule.
Issue 1: Schedule delays due to lack of resources Solution: Consider hiring
10:00 a.m. The meeting will be held online, and we'll send you the links and
Please confirm that you are able to attend the meeting and RSVP. If you are unable
to attend, please designate a team member who can attend in your place.
Yours sincerely
[From Name] [Title and Affiliation].
71
screaming, pop art, male is looking at the lap top
Give me a short summary of this email and an action plan I can quickly perform to
accomplish this.
output
6. Before the meeting, prepare ideas and suggestions for problems and solutions
Attend the meeting and contribute to the discussion and collaboration
I was able to quickly understand and plan without having to read it all.
I don't think I'll ever be this summarized and efficient for something that's really important,
but if it's something that doesn't require that much effort, I'll use this method to save our
72
Prompt - standard, style, few shot
Write a reply to this email. Please sound professional and use polite language. My
name is James and the email recipient's name is Jessica
Output
I was able to quickly understand and plan without having to read it all.
I don't think I'll ever be this summarized and efficient for something that's really important,
but if it's something that doesn't require that much effort, I'll use this method to save our
73
4.4 Tarot Card Reader
What do you think of tarot cards? I used to resist whenever my friends asked me to look at
tarot cards because I couldn't let someone tell my future, but one day I stumbled upon them
and was intrigued by the experience of looking into the depths of my mind.
Tarot cards are a type of playing card, and have been used throughout Europe from the mid-
15th century to the present day to play games such as tarokini in Italy, tarot in France, and
königruppen in Austria. However, from the late 18th century, some tarot decks began to be
used for the purpose of interpreting the cards and glimpsing the future through card
divination, and customized decks were developed for this occult purpose.
Using a combination of the skills we've learned so far, as well as basic prompting techniques
like roles, fusillades, and priming prompts, we're going to create an AI tarot card reader.
prompt :tarot reader, neon background, colorful, women --v 5 --ar 16:9
74
You will act as an expert Tarot Card reader. Generate a Tarot Card Reading with tarot
cards from Major and Minor Arcana. Use the following steps:
1. Pick a random number between 1 and 78, and print it on the first line in the
following format: Card 1: # [insert random number] - [insert name of the tarot card
that corresponds to that number, as listed in the Tarot card number reference]. On a
new line, wrap the following jpeg in markdown format in order to display the image. Do
not use code block. https://upload.wikimedia.org/wikipedia/commons/[insert text
Empress[url:d/d2/RWS_Tarot_03_Empress]; 5. The
Emperor[url:c/c3/RWS_Tarot_04_Emperor]; 6. The
Hermit[url:4/4d/RWS_Tarot_09_Hermit];
75
Now that you've mastered the basic prompting techniques, you should be able to easily
1.Role prompts and priming prompts look like this "You are a tarot card reader."
2.The instruction was presented like this: "Follow this sequence: 1, 2, 3, 4."
3.Utilizing backpropagation learning, the card names and URLs were learned.
The developed AI plays the role of a tarot card reader, selecting a random number from a total
of 78 tarot cards using a random number, and then extracting the three tarot cards
associated with that number for card interpretation. It uses a markdown format to convert
URLs into images for direct visualization. There are 78 links above, so it was difficult to include
all of them, so only 15 are listed. For those who want a hands-on experience, the entire
prompt is available as a link.
🙋♂️ Question: Why generate a random number first and then choose the card associated with
that number - wouldn't it be simpler to just tell it to pick a random card?
As a large natural language processing model (LLM), ChatGPT's output is influenced by its
inputs. For example, if a question like "Can I get married?" is entered, the LLM is more likely to
select cards related to marriage. One prompt engineering technique is to generate random
76
Now, let's start a conversation with the above prompt as the first conversation input using the
priming prompt technique. As expected, after setting up the priming prompt, we can enter a
tarot card question and the model should select 3 cards and provide an answer to the
question. And it should be visualized as an image right away. Let's put in our question.
Prompt
Output
CARD 1: #24 - TWO OF WANDS CARD 2: #7 - THE LOVERS # CARD 3: #66 - TWO OF PENTACLES
77
# Card 1: #24 - Two of Wands
- This card prompts you to be open to new plans and adventures, and to explore
better directions. It emphasizes intuition and vision for the future. This card also
This card also emphasizes financial stability and the importance of sticking to a
budget.
Interpretation: In other words, this Tarot Card Reading reminds you to try out
different plans and adventures and find your vision for the future, but to keep a
clean and pure mind in the moments of choice. It's about compromise and balance,
juggling multiple things and maintaining financial security at the same time. This
doesn't mean you can't be the best prompt engineer you can be, the decision is in
your hands.
Through prompt engineering, we saw that we could extract a tarot card, describe the card,
and associate it with the user's input (question) to perform a tarot reading. We tried to
implement an AI-powered tarot card reader using basic prompting techniques such as roles,
push shots, and priming prompts. In fact, these techniques were very difficult before the
development of large natural language models. The service we quickly created is not a small
But thanks to models like GPT-4, it's now incredibly easy to build these services.
78
Why not use the prompt engineering techniques we've learned to create a great service?
This technique can be used to solve a variety of problems. For example, an AI fitness service
called OPCT was created in 2020 to solve the problem of unbalanced fitness information.
body, tastes, environment, and physical condition, and needs to be personalized. Personal
trainers fulfill this role, but because it is personalized, it is expensive and time-consuming,
making it inaccessible to some people.
To solve this problem, an AI fitness coach that provides personalized exercise and nutrition
advice would allow more people to live a healthy life. To do this, I created over 400 pieces of
exercise and nutrition content to serve people who are healthy, have a bad back, or don't have
time.
We used prompt engineering to allow users to enter their condition and get exercise and
nutrition recommendations based on it. To make the process fun, we turned it into a game so
users could have fun and get fit, and it's now being used by people all over the world.
Hey, I'm tired today, can you give me an opt-in arcade that I can do quickly?
Hi! Here's a quick opct arcade recommendation for you. The "Immigration Stage 1-1 Plank" is one
of the basic exercises that even beginners can easily do. This exercise requires you to maintain a
straight posture on the floor, supporting only your elbows and toes. This exercise strengthens
your core muscles to improve your posture and increase your stamina. This arcade is convenient
because it can be performed anywhere and at any time. With this arcade, you earn one point for
every second you hold it. Jay clocked 60 seconds, so your goal is to get the same amount of time
as Jay or more.
79
Final Project
With the basic skills you've learned so far, why not try your hand
at being your own tarot reader, or a service like OPCT? You
Congratulations! You've now finished learning about basic prompt engineering techniques.
The next step is to take what you've learned and try and implement a project of your own.
Think about what kind of project you'd like to build.
If you want to learn more prompt engineering techniques and develop a career in this field,
check out the next installment of this series, Advanced. You'll get even more in-depth
knowledge and hands-on experience in this course.
80
TECH PROMPT
ENGINEEERING
You've learned the basics of prompt engineering. Some of you have found ways to use it to
make your work or study more efficient, and some of you may be interested in pursuing a
career as a prompting engineer.
Prompt engineering is a field that has a lot of potential for advancement, both in life and
professionally. It's a nascent market right now, so there's a lot to learn.
If you're interested in learning more about this field, keep an eye out for my upcoming prompt
engineering series, and if you have any questions, feel free to reach out to the prompt
community or my email.
If you've made it this far, great job, and let's move this field forward together.
81
Words of Gratitude
It's been 10 years since I started studying data science and becoming interested in artificial
intelligence. In that time, the world has changed at an incredible pace and will continue to do so.
In a few years, our lives will change in even more ways. In the midst of these changes, I
sometimes feel anxious. Will I be left behind? I worry that I'll be obsolete in the future.
You probably have these thoughts sometimes too. But the reason I and you keep challenging,
studying, and not giving up in the face of change is because there are still many things in the
world worth loving
.
We still have loving families, clear skies, joyful animals, and delicious food.
Now that you've made it through this book, take a moment to stretch, look at the sky, enjoy some
delicious food, and give yourself a pat on the back.
Writing this book was also a challenge for me, and while I've had many offers to publish it, I've
always been more interested in educating development, research, and application professionals
than writing for the masses.
However, recently, when I saw that non-experts were putting out inflammatory content, and that it
was amplifying the public's anxiety, I decided to write a book with responsibility and authenticity.
You are now The Prompter, with the knowledge and experience gained from this book.
Discord: https://discord.gg/GsWzN9yDeZ
Instagram: https://www.instagram.com/connexion_ai/
Facebook: https://www.facebook.com/groups/483367500513889
Thank you.
82