How to Write AI Prompts With Example: A Guide to Writing Effective AI Prompts
While AI may not take over the world anytime soon, it has
made significant progress in recent years. There’s no need to look too far
ahead and look at the rate at which generative
AI tools are being adopted. Today, 3 out
of 5 workers are already using generative AI or plan to use it soon.
Similarly, ChatGPT, the most famous example of the generative AI boom,
has amassed 180
million users .
However, the rapid emergence of these tools has caught
people who don’t really know how to write AI prompts off guard. Quality
instructions are a must to ensure the best possible results with these
generative AI tools. With AI, it’s not just what you
say; how you say it is just as crucial, if not more so.
In this comprehensive guide, we'll walk you through how to
enable AI so you can start using it right away.
What are AI Prompts?
Before we tell you how to write AI prompts, let's start with
the basics and understand what AI prompts are.
Prompts are the instructions you give to an AI system to
generate the desired responses or outputs. They are user inputs that are
converted into outputs by the AI system.
Using an AI system, you can create coherent responses by experimenting with
language and structures. If your instructions match well with the AI system you are using, it will
generate the desired results.
Why do we need quality AI-based fast writing?
We need good AI instructions because they make all the
difference in generating good answers. Let’s explain what that means. Imagine
going on a tour abroad where all the signs say Spanish or Greek. Sure, you
might understand one or two of them, but will you be able to navigate them
successfully?
When you give confusing or incoherent instructions to AI,
its reaction is similar to yours when you see signs in foreign languages. It
may get one or two of these instructions right, but it will usually struggle to
provide coherent responses. Quality AI instructions are the perfect bridge
between the user’s goals and the AI’s understanding, resulting in a fully-fledged
AI-based learning system .
Types of AI Prompts
AI prompts can be of different types, depending on their
context, purpose, and needs. Let’s discuss them briefly below.
1. Generative invitations
Generative prompts ask AI to create images, text, and music.
Examples
- Write
a story where two friends separated in childhood and met again 12 years
later.
- Create
a bustling city of ancient Rome.
2. Interpretation instructions
You can ask the AI to
interpret the information using these instructions.
Example
- Describe
the main areas of intervention of the General Data Protection Rules
(GDPR). Analyze and interpret its impact on the technology sector.
- Interpret
current trends in consumer behavior in the smartphone market and their
impact on smartphone manufacturers.
3. Q&A invitations
These instructions allow you to get informative answers
using AI.
Examples
- What
are the United States' oil reserves and what is their contribution to the
American economy?
- Why is
computer knowledge essential and how can it improve career prospects?
4. Conditional invitations
Conditional statements limit the AI's response to defined
factors.
Examples
- Give
me a recipe for a high protein, meatless dinner.
- Provide
troubleshooting steps to a user who contacted customer support for their
smartphone.
5. Comparative prompts
Comparison prompts can be used to allow the AI to compare two items.
Examples
- Compare
the advantages and disadvantages of smartphones versus tablets.
- Compare
the benefits of studying STEM versus the arts and highlight the key
features of these programs.
6. Invitations to rephrase
Rephrasing instructions help you change the tone of a text.
Examples
- Reword
the following lines and make them look more formal.
- Reframe
the following conversation in a casual context.
7. Task-specific invitations
These instructions are useful when working on specific
applications and domains.
Examples
- Create
code for a Hello World output in Python.
- Create
a comprehensive lesson plan for an 8th grade math class. Include a variety
of puzzles that engage students.
How to write AI prompts?
Let's discuss some useful tips to improve your fast AI game.
1. Know your AI system
Before you start giving endless instructions to your AI
systems, it is essential to know them well. Some AI models excel at writing,
others at generating images, and others at generating videos.
For example, ChatGPT and Gemini are known for their text
generation capabilities, while DALL.E is suitable for image generation.
Similarly, Sora excels in video generation, while GitHub Copilot is famous for
code generation.
You can understand the performance of a model by spending
time with it and experimenting with different instructions. It helps you
determine how well it has been optimized and trained on datasets. Therefore,
you can modify your instructions accordingly to get the most out of an AI
model.
2. Be as specific as possible
One thing about computers and AI models is that they don’t
like ambiguity. The more specific a command is, the better it performs. For
example, if you ask ChatGPT to write a few lines about X, Y, or Z, it will
generate a generic item that fits each scenario, but that’s not what you want.
This indicates that you need to be more specific, making
sure the results match your needs. For example, if you want ChatGPT to write a
blog post about getting better grades, you should be a bit more specific than
writing something generic. You can give it a prompt like this:
“Write a 600-word blog post aimed at students to help them
score better on their math exams. Include tips, such as how to approach a
problem, how to check an answer, etc. Use a conversational tone so that
students feel comfortable understanding it.”
As we can see, this prompt is complete and provides the
following information:
- Target
audience
- Number
of words
- Specific
topics
- Content
Type (Tips)
- Desired
tone
3. Have a human-like conversation
Instead of approaching ChatGPT and other instruction-based
AIs from a programming perspective, you should look at them from a
conversational perspective. You should talk to them regularly, which may
require a paradigm shift for some people. Talk to them as if you were talking
to someone to make the conversation more organic.
The best way to do this is to address the AI program with names like Alexa,
Bob, etc. This is helpful because when you address the AI by name, you include all the
essential details of the conversation. When you talk to a person, they may need
clarification or stray from the topic under discussion. You may want to
rephrase your questions to better understand them.
This is called interactive promotion because it comes from
your interactions with the AI system.
You may need to take a multi-step approach: ask a question, get an answer, ask
another question, etc. We’ve done this, and doing it 10-20
times usually gives you a much better answer.
4. Make AI a profession
One of the most powerful features of ChatGPT is that it can
impersonate anyone and generate replies as if that person were responding.
While many have asked
ChatGPT to write like Shakespeare , you can have it assume any
profession, from a professor to a fiction writer to a marketing manager.
For example, you can ask ChatGPT to take on the role of a
marketing manager of a smartphone company, a journalist, and a customer. You
can ask them what their perspective is on the evolution of the smartphone
market and how they imagine the future.
Here are some examples of fast generation in this context:
- From a
marketing manager's perspective, describe the current state of the
smartphone market and its future.
- From a
tech journalist's perspective, describe the current state of the
smartphone market and its future.
- From a
customer's perspective, describe the current state of the smartphone
market and its future.
5. Use of open and closed questions
Knowing when to use open-ended and closed-ended questions is
like knowing when to close or open a door. Open-ended questions are meant to
trigger brainstorming sessions with your AI system, where you invite it to be
creative and come up with dynamic ideas. In contrast, closed-ended questions
are meant for situations where you want a direct yes or no answer.
- Open
question: What are the reasons for the decline in smartphone
prices over the years?
- Closed
Question: Are advances in manufacturing technology responsible
for the decline in smartphone prices?
To answer the first question, AI will provide several
factors that contribute to the decline in smartphone prices. In the second
case, AI will directly answer whether improvements in manufacturing are
responsible for the decline in smartphone prices.
6. Be open to experimentation
Playing is a great way to create the best AI instructions
because it helps you hone your craft and identify gaps. You can do this by
throwing various instructions at your AI system and seeing how it responds.
Here are some examples to get you started:
- Imagine
you are a bullet fired from a gun that hits a tree. Describe your journey,
starting from the moment you are fired to the moment you hit the target.
How do you feel and what do you see throughout your journey?
- You
are a radio that has been placed in the attic and has remained there for
several years. Describe your life, from the time the owner bought you
until now.
- Consider
yourself a time traveler who has traveled to the time of Socrates in
Greece. Describe what you see around you. Please also describe the
philosophical ideas you discussed when you met Socrates.
- Tell
an imaginary conversation between a soccer ball and a shoe, describing
their journeys and what they encounter on a regular basis.
- Delve
into the world of elephants and describe how they live their lives.
Discover how elephants think about their community, social structure,
survival, and more.
As you can see, these examples are unconventional and you
probably don’t think about them regularly. That’s what makes them unique: they
help you push the limits of your AI system. It’s important to see how the AI answers these questions:
observe the mistakes it makes, the areas where it excels, and where its
imagination seems limited. This information will help you improve the
effectiveness of your instructions, because you can now work around the
limitations you might otherwise face.
7. Understand the limits of an AI system
Whatever you think about AI taking over the world, the
reality is that it can’t do everything. It’s smart in some areas and stupid in
others, and it’s essential to understand this difference when discussing how to
write AI instructions.
For example, Open AI’s ChatGPT was trained with datasets
from the internet before 2021. Therefore, its limitations will become apparent
when you ask about events in 2024. Similarly, its training datasets did not
include private internet or offline data and information you have shared with
AI in the past. Be sure to keep this context in mind before giving instructions
to ChatGPT and other AI systems.
8. Provide feedback
While you might think of AI as a good servant, which it
certainly is, the reality is a little more nuanced. When you want to learn how
to use AI, you need to think of it as an iterative relationship between you and
the AI system you’re using. Think of it as collaborating with your colleagues to
create something valuable.
Telling an AI system which answers were useful and which
were not while suggesting improvements helps it understand the kind of results
you want to achieve. As a result, it improves its performance in that
direction, giving you better results.
Conclusion
Quality instructions are at the heart of any meaningful
conversation between humans and AI. Interactions can become much more
productive if you know how to write AI instructions in the right context, be
specific, and suggest improvements.