How to Write Effective AI Prompts

  • ai
  • prompt engineering

I’ve been using AI tools extensively in both my professional and personal life. Whether it’s writing code, solving problems, or learning something new, AI has become a valuable part of my daily routine.

One thing I’ve learned, thought both via training and personal experience, is that the way you communicate with AI can make a huge difference in the results you get. A vague question often leads to a generic answer, while a clear and well-structured prompt can turn AI into a much more useful assistant.

The good news is that you don’t need to be a developer or an AI expert to get better results. You just need to understand a few simple principles.

I’ve put together this guide to help beginners learn how to write effective AI prompts, with practical tips and real-world examples you can start using right away. Whether you’re using ChatGPT, Claude, Gemini or another AI tool, these techniques will help you get more relevant and accurate answers in your everyday life.

ℹ️

Working with AI does not require any technical expertise. You just need to learn how to communicate with it.

What is a prompt?

Let’s start with the basics. A prompt is the question, instruction or information you provide to an AI model to guide its response. It can be a simple question, a detailed set of instructions, or even a combination of text and other inputs, such as images or files.

a screen capture of ChatGPT's textfield where you enter your prompts
The familiar ChatGPT interface where you enter your prompts.

Think of an AI model as a colleague. The clearer you explain your expectations, the more likely you are to get a useful result.

⚠️

A prompt does not guarantee an exact result. Models may interpret the same instruction differently and produce incorrect responses (also like a colleague I guess).

The art of structuring instructions to obtain better results from AI models is called prompt engineering or prompting. This process includes defining the style, supplying context and directing the model’s behaviour to meet your aims.

7 principles for writing better prompts

Here are seven simple principles to keep in mind when creating prompts. You don’t need to apply all of them every time, but they’ll help you get more relevant results.

  1. 🎯 Be clear and specific: Avoid vague requests. State precisely what you expect.
  2. 📝 Provide relevant context: Supply the information necessary to understand your situation, your goals, and your constraints.
  3. 🖼️ Show what you expect: Provide an example of the desired outcome if you have a specific format, style, or structure in mind.
  4. 👨‍🎤 Assign a role: You can ask the AI to adopt a particular perspective, such as that of an experienced developer, a teacher or a technical writer. But it doesn’t guarantee that the response will be more accurate or reliable.
  5. 🧩 Break complex tasks into smaller steps: A complex task can be broken down into smaller steps or separate requests. This allows for better control over the final result.
  6. 🕵️ Review the output: Verify the information, calculations, sources, and overall relevance of the response. A convincing answer is not necessarily an accurate one!
  7. 🔄 Refine your prompt: Do not treat the initial result as final. Specify what needs to be corrected or improved.

Always verify AI-generated responses. A convincing answer is not necessarily an accurate one!

The anatomy of a good prompt

Now that we’ve covered the key principles, let’s put them into practice. When dealing with more detailed requests, having a simple structure can help you organise your thoughts and give the AI everything it needs to understand what you’re looking for.

Element Objective Example
Role Define the AI’s role Act as an experienced developer
Task Describe the task Review my JavaScript code
Context Provide useful informations This code is part of a React application
Requirements Specify expectations and constraints Focus on performance and reliability
Examples Illustrate the desired outcome Follow this coding style: …
Output format Define the form of the response Return a list of issues with suggested fixes

You don’t need to use all of these elements in every prompt. Think of them as a framework to help you structure more complex requests. Use only the ones that make sense for your request. The goals is to provide enough information to get the result you want, without adding unnecessary details. For simple questions, a single sentence might be all you need.

Practical examples: before and after

Nothing beats a good example. To help you get started, I’ve put together a few prompts covering different situations, from simple everyday tasks to slightly more advanced use cases. Feel free to copy them, adapt them to your needs and use them as inspiration for your own prompts.

For each example, the first prompt is too vague, and doesn’t have enough information to obtain a relevant result. You’ll probably need many exchanges to get a useful result. The second, more effective prompt is constructed from the elements we have just reviewed. It has a lot more information and context on what is needed in the response.

Everyday use

Example 1 - Writing an email Example 2 - Learning something new
❌ Write an email to my landlord about a problem. Explain how Wi-Fi works.
✅ Act as a professional communication assistant.

Write an email to my landlord explaining that the heating system has stopped working.

Context:
- The problem started three days ago.
- I have already contacted the maintenance team.
- No intervention has been scheduled yet.

Requirements:
- Use a polite but firm tone.
- Ask for an estimated repair date.
- Keep the email concise.
Act as a networking instructor.

Explain how Wi-Fi works to someone with basic computer knowledge but no networking experience.

Cover:
- The difference between 2.4 GHz and 5 GHz.
- What a Wi-Fi channel is.
- How walls and distance affect signal quality.

Use simple analogies and practical examples. Avoid unnecessary technical jargon.

Structure the answer with headings and bullet points.

More advanced use

Example 3 - Data analysis Example 4 - Travel planning
❌ Analyse this spreadsheet. Organise a weekend in Rome for two people.
✅ Act as a data analyst.

Analyse the attached sales spreadsheet.

Objectives:
- Identify monthly revenue trends.
- Compare sales across product categories.
- Identify the three best-performing products.
- Highlight unusual variations.

Requirements:
- Use only the data provided.
- Do not invent missing values.
- Clearly distinguish observations from assumptions.

Output:
- Executive summary
- Key findings
- Recommendations
- Charts where relevant
Act as an experienced travel planner.

Help me organise a weekend in Rome, Italy.

Context:
- Travel dates: Friday to Sunday.
- I will be travelling with one friend.
- It is our first time visiting Rome.
- We enjoy architecture, Italian food and local experiences.

Requirements:
- Include the main attractions, such as the Colosseum and the Vatican.
- Suggest authentic Italian restaurants and local cafés.
- Avoid overly touristy places whenever possible.
- Group activities by neighbourhood to minimise travel time.
- Leave some free time to explore the city spontaneously.
- Consider walking distances and public transportation.

Budget: Moderate, around 200 € per person (excluding accommodation and flights).

Output format:
1. A detailed itinerary for each day (morning, afternoon and evening).
2. Restaurant and café recommendations.
3. Estimated costs for activities and transportation.
4. Practical tips and recommendations.

Make this itinerary realistic, enjoyable and not too rushed.

Remember that you don’t need to include every element at once. Select only those that serve your request, so you do not add needless complexity to your prompts.

Following the initial query, you may refine the response through iteration. The first attempt does not always function perfectly.

Conclusion

And that’s it! These are the basics of AI prompting. You don’t need complicated techniques or perfectly crafted instructions to get useful results. For most everyday tasks, being clear, providing a little context and explaining what you’re looking for is more than enough.

Of course, there’s much more to explore. When it comes to coding, complex projects or professional workflows, you can go much further by using advanced prompting techniques, custom instructions, AI tools and features such as Skills. You can even use AI to write your own prompts! I mean at this point the possibilities are endless…

But there’s no need to learn everything at once. Start with the basics, experiment with different prompts and see what works for you. The more you use AI, the better you’ll become at communicating your expectations and getting the results you want.

I’ll probably cover some of these more advanced techniques in a future article. Until then, happy prompting!

Links

  • ai
  • prompt engineering