Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Iterating and Refining Prompts
📖 Scenario: You are working with an AI assistant to get the best answers. Sometimes the first prompt you give is not clear enough, so you need to improve it step by step.This project will help you understand how to start with a simple prompt, add details, and finally make it clear and specific to get better results.
🎯 Goal: Build a simple guide that shows how to create an initial prompt, add a refinement step, and then finalize the prompt for the AI assistant.
📋 What You'll Learn
Create a variable called initial_prompt with a simple question.
Create a variable called refinement_note that adds more detail to the prompt.
Combine initial_prompt and refinement_note into a new variable called refined_prompt.
Create a final variable called final_prompt that makes the prompt very clear and specific.
💡 Why This Matters
🌍 Real World
Improving prompts helps get better answers from AI assistants, chatbots, or search engines in everyday tasks.
💼 Career
Skills in writing clear and refined prompts are useful for roles in customer support, content creation, AI training, and digital marketing.
Progress0 / 4 steps
1
Create the initial prompt
Create a variable called initial_prompt and set it to the string "What is climate change?"
AI for Everyone
Hint
Use a simple string assignment like initial_prompt = "What is climate change?".
2
Add a refinement note
Create a variable called refinement_note and set it to the string "Explain the causes and effects in simple terms."
AI for Everyone
Hint
Assign the string to refinement_note exactly as shown.
3
Combine initial prompt and refinement
Create a variable called refined_prompt that joins initial_prompt and refinement_note with a space between them.
AI for Everyone
Hint
Use string concatenation with a space in between.
4
Create the final clear prompt
Create a variable called final_prompt and set it to the string "Please explain what climate change is, including its main causes and effects, using simple language suitable for beginners."
AI for Everyone
Hint
Write the full clear prompt exactly as shown.
Practice
(1/5)
1. What does iterating prompts mean when talking to an AI?
easy
A. Asking questions step-by-step to get better answers
B. Typing the same question many times without changes
C. Using very long sentences to confuse the AI
D. Ignoring the AI's answers and asking unrelated questions
Solution
Step 1: Understand the meaning of iterating prompts
Iterating prompts means asking questions in steps to improve the AI's response.
Step 2: Compare options with this meaning
Only asking questions step-by-step to get better answers matches this idea clearly; others describe ineffective or unrelated actions.
Final Answer:
Asking questions step-by-step to get better answers -> Option A
Quick Check:
Iterating prompts = step-by-step questions [OK]
Hint: Think of asking questions one after another to improve answers [OK]
Common Mistakes:
Thinking iterating means repeating the same question
Believing longer questions always improve answers
Ignoring the step-by-step process
2. Which of these is the correct way to refine a prompt for an AI?
easy
A. Make the question more general and vague
B. Use slang and abbreviations to shorten it
C. Add clear details and focus the question
D. Ask multiple unrelated questions at once
Solution
Step 1: Understand refining prompts
Refining means making the question clearer and more focused for better AI understanding.
Step 2: Evaluate each option
Add clear details and focus the question fits because adding details and focus helps AI respond well; others reduce clarity.
Final Answer:
Add clear details and focus the question -> Option C
Quick Check:
Refining = clearer, focused question [OK]
Hint: Clear and focused questions get better AI answers [OK]
Common Mistakes:
Making questions vague thinking AI will guess
Using slang that AI might not understand
Combining many questions confusing the AI
3. Consider this prompt sequence to an AI: 1. What is climate change? 2. How does climate change affect oceans? 3. What are the main causes of ocean warming? What is the main benefit of this approach?
medium
A. It confuses the AI by changing topics quickly
B. It wastes time by asking too many questions
C. It makes the AI ignore earlier questions
D. It helps the AI give detailed and focused answers step-by-step
Solution
Step 1: Analyze the prompt sequence
The questions go from general to specific, building understanding step-by-step.
Step 2: Identify the benefit
This stepwise approach helps AI focus and give detailed answers for each part.
Final Answer:
It helps the AI give detailed and focused answers step-by-step -> Option D
Quick Check:
Stepwise prompts = better focused answers [OK]
Hint: Stepwise questions improve AI detail and focus [OK]
Common Mistakes:
Thinking changing topics quickly confuses AI
Believing many questions waste time without benefit
Assuming AI ignores earlier questions automatically
4. You asked an AI: Tell me about dogs and cats and birds. The answer was unclear. What is the best way to fix this?
medium
A. Refine the prompt by asking about one animal at a time
B. Make the prompt longer by adding unrelated animals
C. Repeat the same prompt multiple times
D. Use only one word like 'animals' to simplify
Solution
Step 1: Identify the problem with the original prompt
Asking about many animals at once can confuse the AI and cause unclear answers.
Step 2: Choose the best fix
Asking about one animal at a time makes the question clearer and easier for AI to answer well.
Final Answer:
Refine the prompt by asking about one animal at a time -> Option A
Quick Check:
Clear, focused prompts = better AI answers [OK]
Hint: Ask about one topic at a time for clarity [OK]
5. You want to get a detailed recipe from an AI. Which prompt sequence best uses iterating and refining prompts?
hard
A. Give me a recipe for cake and cookies and bread all at once.
B. What is a recipe? Then, give me a cake recipe. Next, list ingredients for chocolate cake.
C. Tell me about cooking.
D. Recipe?
Solution
Step 1: Examine each prompt sequence
What is a recipe? Then, give me a cake recipe. Next, list ingredients for chocolate cake. breaks down the request step-by-step, refining focus from general to specific.
Step 2: Identify why this helps
This approach guides the AI clearly, improving the quality and detail of the recipe answers.
Final Answer:
What is a recipe? Then, give me a cake recipe. Next, list ingredients for chocolate cake. -> Option B
Quick Check:
Stepwise refining prompts = detailed, clear AI answers [OK]
Hint: Start general, then narrow down step-by-step [OK]