Calendar Icon - Dark X Webflow Template
May 20, 2024
Clock Icon - Dark X Webflow Template
 min read

How To Write AI Prompts: A Guide to Writing Effective AI Prompts 

Unlock the power of AI with expert guidance on writing compelling prompts. Read this guide to learn how to write effective AI prompts.

How To Write AI Prompts: A Guide to Writing Effective AI Prompts 

While AI might not take over the world anytime soon, it has progressed significantly in the last few years. One doesn't need to go too far and just look at the pace at which generative AI tools are being adopted. Today, 3 out of 5 workers already use 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 off-guard who don't have much idea of how to write AI prompts. Quality prompts are indispensable to ensure the best possible outcome from these generative AI tools. With AI, it is not just about what you say; how you say it is equally, if not more, crucial.

In this comprehensive guide, we'll walk you through the art of prompting artificial intelligence so that you can start using it immediately. 

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 make them generate desired responses or outputs. They are user inputs that are converted to outputs by the AI system. Using an AI system, you can create coherent responses by experimenting with language and structures. If your prompts align well with the AI system you are using, it will generate the desired results. 

Why Do We Need Quality AI Prompt Writing? 

We need good AI prompts because they make all the difference in generating good responses. Let us explain what it means. Imagine going on a foreign tour where all the signboards read Spanish or Greek. Sure, you might understand one or two, but can you navigate the place successfully? 

When you give confusing or incoherent prompts to AI, its reaction is similar to yours upon seeing the signboards in foreign languages. It might get one or two of those prompts right, but it'll generally struggle to provide coherent responses. Quality AI prompts are the perfect bridge between user goals and AI comprehension, resulting in a system of comprehensive AI-based learning.

Types of AI Prompts 

AI prompts can be of various types, depending on their context, purpose, and needs. Let's briefly discuss them below. 

1. Generative Prompts 

Generative prompts ask the AI to create images, text, and music. 

Examples

  • Write a story where two friends separated from each other in childhood and met 12 years later.
  • Create a bustling town of ancient Rome.

2. Interpretive Prompts 

You can ask the AI to interpret information using these prompts.

Example

  • Break down the significant focus areas of the General Data Protection Rules (GDPR). Analyze and interpret its impact on the tech sector. 
  • Interpret the current consumer behavior trends in the smartphone market and their impact on smartphone manufacturers.

3. Question-Answer Prompts 

These prompts help you get informative answers from AI.

Examples

  • How much oil reserves does the US have, and what are their contributions to the US economy?
  • Why is computer science knowledge essential, and how can it help one's career prospects?

4. Conditional Prompts 

Conditional prompts restrict AI's response to defined factors.

Examples

  • Give me a recipe for a protein-rich dinner without meat.
  • Provide troubleshooting steps for a user who has contacted customer support for his smartphone.

5. Comparative Prompts 

Comparative prompts can be used to make AI compare between two things.

Examples

  • Compare the advantages and disadvantages of smartphones Vs tablets. 
  • Compare the advantages of studying STEM vs arts and highlight the key features of these programs. 

6. Rephrasing Prompts 

Rephrasing prompts helps you change the tone of a text.  

Examples

  • Rephrase the following lines and make them look more formal. 
  • Reframe the following conversation in a casual context. 

7. Task-specific Prompts 

These prompts are helpful when you're 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 mathematics class. Include various puzzles that keep students engaged. 

How to Write AI Prompts? 

Let's discuss some valuable tips for leveling up your AI prompt game.

1. Know Your AI System 

Before you start giving endless prompts to your AI systems, it is crucial to know them well. Some AI models excel at writing, some at image generation, and some are good at video generation. 

For instance, ChatGPT and Gemini are well-known for their text-generation capabilities, while DALL.E is suitable for generating images. Similarly, Sora excels at generating videos, while GitHub Copilot is famous for code generation.

You can understand how well a model performs by spending time with it and experimenting with various prompts. It helps you determine how well it has been optimized and trained on datasets. As a result, you can tweak your prompts accordingly to get the maximum out of an AI model.

2. Be As Specific As Possible 

One thing about computers and AI models is that they don't like ambiguities. The more specific a command is, the better it performs. For instance, if you ask ChatGPT to write a few lines on X, Y, or Z, it will generate a generic piece to fit every scenario, but that's not what you want.

It indicates that you must get more specific, ensuring output alignment with your requirements. For instance, if you want ChatGPT to write a blog post on scoring 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 on scoring better grades in their mathematics exams. Include tips, such as approaching a problem, checking an answer, and more. Use a conversational tone so that students feel comfortable understanding it."

As we can see, this prompt is comprehensive and provides the following:

  • Target audience 
  • Word count
  • Specific topics 
  • Content type (tips)
  • Desired tone 

3. Have a Human-like Conversation 

Instead of approaching ChatGPT and other prompt-based AIs from a programming perspective, you should look at them through a conversational lens. You should talk to them usually, which might require a paradigm shift for some people. Talk to it like you'd talk to someone to make the conversation more organic.

The best way to do it is by addressing the AI program with names like Alexa, Bob, and the like. It helps because when you address the AI with a name, you include all the critical conversational details. When you talk to a person, they might need clarification or stray from the topic under discussion. You might want to reframe your questions for better understanding.

It is called interactive promotion because it stems from your interactions with the AI system. You might have to take a multi-step approach here: ask one question, get an answer, ask another, and so on. We have done it, and giving it 10-20 tries usually gives you a much better response. 

4. Make the AI Assume a Profession 

One of ChatGPT's most powerful features is that it can take on the identity of anyone and generate responses as if that person were responding. While many have asked ChatGPT to write like Shakespeare, you can make it assume any profession, from a teacher to a fiction writer to a marketing executive. 

For instance, you can ask ChatGPT to assume the marketing executive role of a smartphone company, a journalist, and a customer. You can ask them about their views on the changes in the smartphone market and how they imagine the future.

Here are some prompt generation examples in this context:

  • From the point of view of a marketing executive, describe the current state of the smartphone market and its future. 
  • From the point of view of a tech journalist, describe the current state of the smartphone market and its future.
  • From the point of view of a customer, describe the current state of the smartphone market and its future.

5. Using Open-Ended and Closed-Ended 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 for triggering brainstorming sessions with your AI system, where you invite it to be creative and provide dynamic ideas. On the contrary, close-ended questions are for situations where you want a straightforward yes or no response.

  • Open-ended Question: What are the reasons behind the falling prices of smartphones over the years?
  • Close-ended Question: Are advancements in manufacturing technology responsible for decreasing the prices of smartphones?

To answer the first question, AI will provide several factors that contribute to the falling smartphone prices. In the second instance, the AI will directly answer if improvements in manufacturing are responsible for decreasing smartphone prices. 

6. Be Open to Experimenting 

Playing around is a great way of creating the best AI prompts because it helps you refine your craft and identify your shortcomings. You can do that by throwing various prompts at your AI system and checking how it responds. Here are a few examples to help you get started:

  • Imagine you're a bullet being fired from a gun, hitting a tree. Describe your journey, beginning 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 you have stayed there for several years. Describe your life, starting from the moment when the owner purchased you to right now. 
  • Think of yourself as a time traveler who has traveled back to the times of Socrates in Greece. Describe what you see around you. Also, please describe the philosophical ideas you discussed when you met Socrates. 
  • Narrate an imaginary conversation between a football and a shoe, describing their journeys and what they face regularly.
  • Dive deep into the world of elephants and describe how they conduct their lives. Explore how elephants think about their community, social structure, survival, and more. 

As you can see, these examples are unconventional and certainly not something you think about regularly. That's what makes them special: they help you push the boundaries of your AI system. It is important to see how AI responds to these prompts: notice the mistakes it makes, the areas where it excels, and where its imagination seems limited. These details will help you improve the effectiveness of your prompts, as you can now work around the limitations you could face otherwise.

7. Understand the Limitations of an AI System 

Whatever your thoughts are about AI taking over the world, the current reality is that it cannot do everything. It is smart in some areas and dumb in others, and understanding this difference is key when discussing how to write AI prompts. 

For instance, Open AI's ChatGPT has been trained with datasets from the internet before 2021. Therefore, its limitations will be apparent when you ask about events in 2024. Similarly, its training datasets didn't include private data on or off the internet and the information you have shared with AI in the past. Make sure you keep this context in mind before giving prompts to ChatGPT and other AI systems. 

8. Provide Feedback 

While you might think of an AI as a good servant, which is certainly the case, the reality is a bit more nuanced. When you want to learn AI prompting, you must think there is an iterative relationship between you and the AI system you are using. Think of it as collaborating with your colleagues to create something valuable. 

Telling an AI system which of its responses were useful and which weren't while suggesting improvements helps it understand the type of outputs you want. As a result, it enhances its performance in that direction, giving you better results. 

Conclusion 

Quality prompts are the soul of any meaningful conversation between humans and AI. The interactions can become much more productive if you know how to write AI prompts in the right context, be specific, and suggest improvements. 

Like many other areas, the impact of AI in education is also expanding rapidly. You can now create fully-fledged training courses with the help of AI course generators, such as the one crafted by Coursebox. Nothing is more efficient and valuable than Coursebox's AI Course Generator in e-training. 

From AI assessments to quiz generation to a 24/7 AI tutor, our AI Course Generator packs all the modern features that take e-training to the next level. So, sign up on our platform for free and start a new, transformative journey with the power of AI.

Latest articles

Browse all