How to write AI prompts: a step-by-step guide
Learn to write clear AI prompts by defining the task, adding context, setting constraints, and specifying the output format. Build a prompt with an interactive tool, fix a poor response, and test your own prompt in the free Mia chat.
- 1Learn the structureBuild a prompt from six components
- 2Compare promptsIdentify the difference between weak and strong prompts
- 3Fix a responseRefine your prompt and evaluate the result
- 4Try the prompt builderCombine your selected conditions into a prompt
- 5Your own taskWrite and test a prompt independently
To write an effective AI prompt, start by deciding what you want to get.
For example, instead of “Write an email,” try:
Write a short email to my teacher. I missed class because I was sick and want to ask about the homework. Use a polite, natural tone without overly formal language. Keep it under 100 words.
The second prompt tells AI who the email is for, why you're writing it, and what the finished result should look like.
In the previous lesson, “AI for beginners: how to use AI from scratch”, we covered five stages of working with AI: defining the task, writing the prompt, getting a result, checking it, and making revisions.
Now we'll focus on the second stage: writing the prompt. You'll learn how to give the model enough information and revise your instructions when the first response isn't what you need.
No programming skills are required for the exercises.
What is an AI prompt, and why does it affect the response?
A prompt is an instruction, question, or task description that you give to an AI model.
In an AI chat, it might ask the model to explain a topic. In an image generator, it describes a scene. In a music model, it specifies a genre, instruments, and mood.
The same short prompt can produce very different results.
Suppose you write:
Create a workout plan.
The model doesn't know whether you want to exercise at home or at a gym, how much time you have, or your current fitness level.
It might suggest a plan that doesn't suit you, even though it technically followed your instructions.
Let's add some details:
Create a seven-day home workout plan for a beginner. I have 15 minutes a day. Don't include exercises that require special equipment. For each day, list the exercises and their approximate duration.
Now the task is more specific.
But a detailed prompt doesn't guarantee an error-free response. Quality also depends on the model, its capabilities, and the context available to it.
Prompt and prompting: what's the difference?
A prompt is the instruction, question, or description you give to an AI model.
Prompting is the process of writing and refining those instructions to get a useful result.
The term “prompt engineering” refers to a more systematic approach to designing and testing prompts.
In this lesson, we'll use “prompt” for the instruction itself and “prompting” for the process.
What makes a good AI prompt?
For most text-based tasks, four elements are enough: task, context, constraints, and output format.
You can also add a role and an example. These are useful when you need a particular approach or writing style.
Let's examine all six components using one prompt.
Imagine you want to learn Excel. You need AI to create a study plan that fits your situation.
Create a seven-day Excel learning plan.I'm a beginner and can only enter data into cells.Explain the material as a teacher would to a beginner.I have 20 minutes a day. No macros or programming.Present the plan in a table: day, topic, exercise.Sample exercise: enter five numbers and calculate their sum.
- TaskWhat result you want
- ContextWhat the model knows about you
- RoleWhat approach to use
- ConstraintsWhat conditions to follow
- FormatHow to organize the result
- ExampleHow difficult the exercises should be
Combine these components into a single prompt:
Create a seven-day Excel learning plan. I'm a beginner and can only enter data into cells. Explain the material as a teacher would to a beginner. I have 20 minutes a day. Don't include macros or programming. Present the plan in a table with these columns: day, topic, exercise. An example of a suitable exercise is entering five numbers and calculating their sum.
Each component serves a different purpose.
Task: what needs to be done
Start with an action: explain, compare, create, correct, translate, or suggest.
“Tell me about nutrition” is too broad if what you actually need is a grocery list.
A better prompt:
Create a grocery list for five home-cooked dinners for two people.
You don't have to include every detail immediately. Start by stating the result you expect.
Context: who it's for and under what conditions
Context helps the model adapt its response to your situation.
For example:
Create a grocery list for five home-cooked dinners for two people. We make simple meals and buy our groceries at a regular supermarket.
For work-related prompts, context might include the target audience, the document's purpose, and relevant project details.
Share only the information needed for the task. Don't include confidential information just to make the prompt more detailed.
Role: when it helps
A role can guide the model's teaching style or professional perspective.
Explain how an electric motor works as a physics teacher would to a seventh-grade student.
Here, the role establishes how the topic should be explained.
You usually don't need a role for a short factual question. Saying “You're the world's best expert” doesn't give the model additional knowledge.
Asking AI to respond as a doctor or lawyer doesn't replace professional advice.
Constraints: what to account for
Constraints define the conditions the result must follow.
For example:
Don't use mushrooms. Each dinner must take no more than 30 minutes to prepare. Don't suggest dishes that require special equipment.
Your constraints shouldn't contradict each other.
You can't reasonably request a detailed 20-page guide and limit it to 100 words at the same time.
If you have many constraints, prioritize the most important ones and check that they're compatible.
Output format: how the response should look
If you need the result in a specific format, say so upfront.
A table works well for comparisons. Numbered steps work for instructions. An email should be ready to send.
For example:
Present the meal plan in a table with these columns: day, dish, ingredients, and cooking time. After the table, create a combined grocery list.
This way, the model doesn't have to choose the format itself.
Example: show what you want
When you need a specific style or structure, you can provide one or two examples.
This technique is called few-shot prompting: the model uses the supplied examples as a guide.
Write product descriptions in this format: “Product name — one sentence describing its purpose.”
Example: “Desk lamp — illuminates a workspace and lets you adjust the direction of the light.”
Now write descriptions for a wireless mouse and a laptop stand.
Examples aren't necessary for simple questions.
Use them when the model repeatedly produces the wrong structure or style.
Weak vs. strong AI prompts: a comparison
Imagine an online store needs to notify a customer about a delayed order.
Write a nice email to a customer about a delay.
Write an email to an online store customer. Their order is delayed by two business days due to a shipping issue. Apologize for the delay and provide the new estimated delivery date. Don't promise compensation or invent an order number. Use a calm, polite tone. Keep it under 120 words.
The second prompt explains why the email is needed and sets clear boundaries for the response.
The model doesn't have to invent an order number, compensation terms, or other details.
However, you still need to check the finished email before sending it. Is the reason for the delay confirmed? Has the new delivery date been verified?
If the reason is unknown, don't ask the model to make one up. Instead, state that the details are still being confirmed.
Build your own prompt
Now try creating a prompt without writing every component from scratch.
In the prompt builder, select a task, audience, role, format, and constraint.
You can leave the role unspecified.
Once you've built your prompt, read it carefully. Check that the selected conditions work together.
For example, a detailed educational explanation might not fit within 150 words. If that happens, change the format or narrow the task.
The prompt builder creates a starting point. Add specific details about your situation when needed.
You can copy the finished prompt and test it in the free Mia chat.
How to refine a prompt: from draft to finished result
Your first prompt doesn't have to be the final version.
What matters more is recognizing what's wrong with a response and telling the model exactly what needs to change.
- 1DraftDescribe the task and get the first response
- 2ReviewIdentify a specific requirement the response fails to meet
- 3RefineAsk AI to fix the problem
- 4ResultCheck the revised version
Mini case study: an Excel learning plan
Imagine a beginner who wants to learn how to use spreadsheets.
They submit this prompt:
Create a one-week Excel learning plan.
The model suggests seven days of lessons. But advanced formulas appear on day two, and macros on day four.
The response technically follows the request, but it doesn't account for the learner's experience.
Here's a shortened example.
| Day | Topic |
|---|---|
| 1 | Basic Excel functions |
| 2 | Nested formulas |
| 3 | Pivot tables |
| 4 | Automation with macros |
| Day | Topic |
|---|---|
| 1 | Cells, rows, and columns |
| 2 | Entering and formatting data |
| 3 | Simple addition |
| 4 | Sorting and filtering |
What changed?
Instead of starting a new conversation with the same question, the beginner clarified their requirements:
I'm a beginner and can only enter data into cells. I have 20 minutes a day to study. Remove macros and advanced formulas. Start with simple tasks. Keep all other requirements unchanged.
The model suggested a more suitable sequence.
These are illustrative excerpts showing the first four days, not guaranteed responses from a particular model. The complete plan should still cover seven days.
After refining the prompt, check the exercises themselves, not just the topic names. Can a beginner actually complete each exercise in 20 minutes?
Fix the specific problem
If the model breaks one requirement, you don't necessarily need to rewrite the entire prompt.
For example:
On day three, you suggested an exercise using an advanced formula. Replace it with a simple addition exercise. Don't change the other days.
This is more efficient than generating an entirely new plan every time.
However, the model may change other parts of the response as well. Compare the revised version with the previous one.
For larger tasks
Complex tasks are often easier to handle in stages.
Suppose you're preparing a presentation about a new product.
First, ask for a slide outline. Review the order and coverage of the topics. Then ask the model to write the content based on the approved outline. Finally, check the facts and formatting.
This helps prevent a mistake in the outline from carrying over unnoticed into the finished presentation.
Ask AI to pose clarifying questions
Sometimes you don't know what information a good prompt needs.
For example, you want to organize a party at home but haven't decided on the guest count or budget.
Write:
I want to organize a party at home. Ask me up to five clarifying questions needed to create a plan. Wait for my answers. Don't invent a budget, date, or guest count.
After you've answered, the model can produce a more specific plan.
Ask AI to improve the prompt itself
AI can help you write better instructions before you start the main task.
Improve my prompt. Keep the original goal, remove ambiguities and contradictions, and don't add facts I haven't provided. If important information is missing, ask questions first. Show the improved version and briefly explain what you changed.
My prompt: “Suggest an interesting travel itinerary.”
Review the improved prompt before using it for the main task.
Don't assume a longer prompt is automatically better. A good prompt should be clear and contain enough information, not as much detail as possible.
Exercise 1. Write a structured prompt
Let's practice using the six prompt components with a task you can evaluate.
You need to create a spreadsheet learning plan for someone who has never worked with formulas.
You already know the context, time constraint, and required output format.
Write a structured prompt
Create a seven-day learning plan for someone who has never used spreadsheet formulas. I can enter text and numbers into cells. I have 20 minutes a day to study. Include simple exercises that don't require programming. Present the plan as a table with these columns: day, topic, what to learn, hands-on exercise. Each exercise must take no more than 20 minutes. Don't include topics that require macros or advanced formulas.
After running the prompt, check that:
- The plan covers seven days.
- Each lesson takes no more than 20 minutes.
- The exercises are suitable for someone with no experience using formulas.
- Every day includes a topic and a hands-on exercise.
- There are no macros or advanced programming tasks.
If the second day's exercise is too difficult, refine your prompt:
The exercise on day two is too difficult for a beginner. Replace it with an exercise that doesn't use nested formulas. Don't change the other days.
The goal of this exercise is to see how clearly defined requirements help AI produce a more suitable plan.
Exercise 2. Improve a vague prompt
Now try a different task.
Here's the original prompt:
Help me organize a party at home.
It doesn't specify the date, budget, guest count, or type of event.
Ask AI to improve your prompt
Help me improve this AI prompt: “Help me organize a party at home.” First, ask up to five clarifying questions needed to create a specific plan. Don't create the plan until I've answered your questions. Once I've answered, write an improved prompt using this structure: task, context, constraints, output format. Don't invent a budget, guest count, date, or any other details I haven't provided. Show me the finished prompt and briefly explain which conditions you added.
The model should ask clarifying questions first.
Answer those questions, then ask it to show the improved prompt. Don't move straight into planning the party.
How to compare two prompts
Evaluate the original and improved versions using three criteria.
| Criterion | What to check |
|---|---|
| Specificity | Is it clear what result is needed and who it's for? |
| Completeness | Are important details included without invented information? |
| Relevance of the response | Did the new prompt produce a more suitable plan? |
First, submit the original prompt in a separate conversation and save the response.
Then use the improved prompt and compare the results.
For example, suppose your answers establish that the party will have six guests and a moderate budget. A good response should account for both details.
If the model invents a date, address, or amount, that's an error.
The improved prompt doesn't need to be several times longer than the original. It needs to resolve the uncertainty that prevented the task from being completed properly.
Independent exercise
Now write a prompt without using a ready-made example or the prompt builder.
You've completed the exercise when you have your original prompt, the first response, and a revised version, along with a clear reason for the change.
Save them. In the next lesson, you'll use this skill to write and edit text with AI.
How prompts differ across AI tools
Different AI generators produce different types of results, so their prompts need slightly different approaches.
The basic principle stays the same: describe what you want and specify the conditions that matter.
| AI tool type | What to focus on in the prompt |
|---|---|
| AI chat assistant | Task, context, constraints, output format |
| Image generator | Subject, surroundings, composition, lighting |
| Video generator | Scene, action, camera movement |
| Music generator | Genre, mood, instruments, vocals |
| Presentation assistant | Goal, audience, structure, source data |
For AI chat
Explain the difference between revenue and profit to a small store owner. Use a hypothetical example of selling a product for $1,000. Show the expenses and calculations. Avoid complex accounting terminology.
You can use this prompt in Mia, ChatGPT, DeepSeek, Gemini, or another AI chat assistant.
For images
A single red ceramic mug sits on a wooden table next to a window. A softly blurred kitchen is visible in the background, with gentle morning light coming from the left. Realistic product photography, vertical 3:4 aspect ratio. No text.
Here, you need to describe both what appears in the image and how it should look.
You'll learn more about image generators in “How to generate AI photos from text or your own pictures”, and about lighting and composition in “AI photo prompts: ready-to-use examples and tips”.
For videos
A small boat moves slowly across a calm lake. The camera smoothly tracks alongside it. Early morning, light fog, realistic video. No scene changes.
For video generation, describe movement, not just the appearance of objects.
We'll cover this in more detail in the lessons on video generation and photo animation.
For music
A calm acoustic pop song about a summer road trip. Female vocals, acoustic guitar, moderate tempo, uplifting mood.
For music models, the genre, mood, instruments, and vocal requirements matter.
You'll learn how to work with lyrics and music settings in the lessons on creating AI music.
Prompt for a presentation
Create an outline for a six-slide presentation about launching an office lunch delivery service. The audience is potential business partners. For each slide, provide a title and key talking points. Don't invent sales figures or market size estimates. If information is missing, list what needs to be clarified.
An AI chat assistant can prepare slide content. Whether it can create a finished presentation file depends on the tool's capabilities.
The full process is covered in the lesson “How to make a presentation with AI: step-by-step.”
What language should you use, and how long should prompts be?
Start with English or whichever language you're most comfortable writing in.
Many modern AI models understand instructions in multiple languages. For some image and video generators, Neuromia automatically translates prompts written in Russian into English before sending them to the model.
Prompt length limits vary by tool. The counter in the editor shows how much text you can enter.
If your prompt gets too long, remove repetition and minor details. Keep the requirements that would change the meaning of the task if omitted.
Ready-made AI prompt templates
Here are four templates for common text-based tasks.
Replace the text in square brackets with your own details.
Write an email
Write an email to [recipient] about [situation]. My goal is to [desired outcome]. Use a [formal/neutral/friendly] tone. Keep it under [number] words. Don't add facts that aren't included in the description. Output only the finished email.
Explain a complex topic
Explain [topic] to someone with [experience level] knowledge. Start with a simple definition, then give an example from everyday life. Don't use technical terms without explaining them. At the end, ask two questions to check understanding.
Create a plan
Create a plan to achieve [goal] within [time frame]. Starting conditions: [context]. Constraints: [time, budget, resources]. Break the work into sequential steps. For each step, specify the expected result. If important information is missing, ask questions first.
Rewrite existing text
Edit the text below. Preserve the meaning and all factual information. Remove repetition and complicated wording. Use a [desired style] writing style. Don't add new information. Show the finished version.
Text: [paste your text]
More prompt templates
Generate ideas
Suggest [number] ideas for [task]. Target audience: [audience]. Requirements: [constraints]. Avoid repetitive suggestions. For each idea, provide a brief description and one potential drawback. Present the results in a table.
Summarize text
Write a short summary of the text. Identify the main idea, three key points, and the conclusion. Don't add information that isn't in the original text. Text: [paste your text].
Review existing content
Review the text for contradictions, repetition, and claims that need verification. List your findings first. Don't rewrite the text or invent missing facts. Text: [paste your text].
Compare options
Compare [option A] and [option B] based on [criteria]. For each option, identify advantages, disadvantages, and missing information. Don't declare a winner if there isn't enough evidence. Present the results in a table.
You don't need to copy an entire template if some of its requirements don't apply to your task.
For images, explore the separate Neuromia library of ready-made templates.
Exercise 3. Write an image prompt
Now let's apply the same approach to a visual task.
You'll create a realistic product photo of a red mug.
Describe the subject, its position, surroundings, lighting, and aspect ratio.
Product photo: red mug
A single red ceramic mug sits on a wooden table next to a large window. A cozy kitchen is visible in the background, slightly out of focus. Soft morning light comes from the left, casting natural shadows across the table. Realistic product photography, natural colors, vertical 3:4 aspect ratio. No people, text, or additional mugs.

This exercise uses Flux 3 Klein. One generation costs 1.76 credits with the specified basic settings.
After generating the image, check that:
- There's only one mug in the shot.
- The mug is red and made of ceramic.
- It's sitting on a wooden table.
- There's a window nearby.
- The light comes from the left.
- The image is vertical with a 3:4 aspect ratio.
If the model adds a second mug, clarify the number of objects.
If the background is too sharp, ask for a blurred background.
Each new generation produces another image and uses credits. Before generating again, identify exactly what needs to change.
Save your prompt alongside the result. Later, you can use it to compare outputs from different models.
Common mistakes when writing AI prompts
You can often fix a problem with a small clarification. You don't need to rewrite the entire prompt.
The response is too generic
The prompt may lack context.
Instead of “Give me sales tips,” try:
Suggest ways to improve a desk lamp's product description in an online store. The goal is to make its features easier for customers to understand. Don't add unverified benefits.
AI follows only some of your instructions
Check whether your requirements contradict each other.
For example, asking for a detailed guide in just two sentences gives the model conflicting instructions.
Remove less important constraints or break the task into stages.
The response is too long
Specify the length and format:
Keep your response under 150 words. Use a two-column table. Don't include an introduction.
But don't demand a short answer when the task requires a detailed explanation.
AI invents facts
When source information is missing, the model may fill in the gaps with assumptions.
Try:
Use only the information provided. If there isn't enough information, write “Information not available.” Don't invent numbers or sources.
This reduces the risk but doesn't guarantee an error-free response.
In “AI hallucinations: why AI makes mistakes and how to check”, we'll cover independent fact-checking.
The prompt tries to do too much
If a single prompt asks the model to write an article, check legal requirements, create a table, and build a presentation, it may overlook some instructions.
Complete one task, review the result, and then move on to the next.
Asking AI to “make it perfect” doesn't help
The model doesn't know what you consider perfect.
Instead of giving vague feedback, specify what to change:
Remove repetition from the second paragraph. Preserve the facts and a calm, professional tone. Don't change the rest of the text.
What to check before submitting a prompt
Use this checklist for work and study tasks.
Test your knowledge
For each of the four scenarios, choose the action most likely to produce a better response with fewer unnecessary attempts.
If you get a question about context wrong, review the prompt structure section.
If you struggle with revising a response, revisit the Excel learning plan case study.
Remember the main principle: a good prompt doesn't have to be long. It needs to explain the task and include the conditions required to complete it.
What to learn next
You've learned how to build a prompt from several components, improve vague instructions, and refine results within a conversation.
The next lesson is “How to write and edit text with AI”.
You'll apply these skills to real writing tasks: create a social media post using provided facts, develop a longer piece from an outline, and summarize and edit a draft.
All you need to practice is the free Mia chat.
If you're more interested in images, continue with “How to generate AI photos from text or your own pictures”. It covers image generation from scratch, uploading photos, and using the editor settings.
You'll explore lighting, camera angles, and composition in more detail in “AI photo prompts: ready-to-use examples and tips”.
You can find every topic in the Neuromia learning program.
Before starting the next lesson, save one prompt you've written yourself, its first response, and your revised version. These are your first practical results from writing and refining AI instructions.
Frequently asked questions
What language should I use to write AI prompts?
Start with English or whichever language you're most comfortable using.
Many modern AI models understand prompts in multiple languages. If a particular model misinterprets your description, try clarifying the wording or comparing it with an English version.
How long should a good AI prompt be?
One sentence may be enough for a simple question.
A work-related task might require several paragraphs covering requirements, source information, and constraints.
Length alone doesn't determine quality. Remove details that don't affect the result.
Do I need to say “please” in an AI prompt?
No. Polite wording doesn't replace clear instructions.
Write naturally. Explaining the task and the expected result matters more.
How do I write prompts for ChatGPT, Gemini, DeepSeek, or Claude?
Use the same structure: task, context, constraints, and output format.
Different models have different capabilities. If a tool doesn't support a particular feature, a prompt alone can't overcome that limitation.
Can AI write a prompt for me?
Yes. Describe your goal and ask the model to write the instructions.
If important details are missing, ask it to pose clarifying questions first.
Once you have the prompt, check whether the model has added any invented information.
Why does AI ignore some instructions?
Possible causes include conflicting requirements, too much context, model limitations, or unclear wording.
Remove less important requirements and try breaking the task into smaller steps.
If the model repeatedly ignores an important condition, check whether it's capable of completing the task.
Can I use the same prompt with different AI models?
Yes, if the models perform the same type of task.
For example, you can test a text prompt in several AI chat assistants.
The results may differ. For a fair comparison, provide the same initial context and evaluate the responses using the same criteria.