Bird
Raised Fist0
Prompt Engineering / GenAIml~20 mins

Why prompt design determines output quality in Prompt Engineering / GenAI - Experiment to Prove It

Choose your learning style10 modes available

Start learning this pattern below

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
Experiment - Why prompt design determines output quality
Problem:You want to get useful and accurate answers from a language AI model. But sometimes the answers are vague, wrong, or not what you expected.
Current Metrics:Output relevance: 60%, Output accuracy: 55%, User satisfaction: 50%
Issue:The prompts given to the AI are too short, unclear, or missing important details. This causes the AI to guess or give low-quality answers.
Your Task
Improve the quality of AI outputs by designing clearer, more detailed prompts that guide the AI better.
You cannot change the AI model itself.
You must only change the prompt text.
Keep prompts simple and easy to understand.
Hint 1
Hint 2
Hint 3
Solution
Prompt Engineering / GenAI
def generate_response(prompt: str) -> str:
    # Simulated AI response function
    # In real use, this would call the AI model API
    if 'example' in prompt.lower():
        return 'This is a clear and accurate answer based on the example provided.'
    elif 'step-by-step' in prompt.lower():
        return 'Step 1: Understand the problem. Step 2: Apply the method. Step 3: Get the result.'
    else:
        return 'Sorry, I need more details to give a good answer.'

# Original vague prompt
original_prompt = 'Tell me about climate change'
original_output = generate_response(original_prompt)

# Improved prompt with context and example
improved_prompt = ('Explain climate change in simple terms. ' 
                   'For example, how does burning fuel affect the air?')
improved_output = generate_response(improved_prompt)

# Improved prompt with step-by-step request
step_prompt = ('Explain climate change step-by-step, ' 
               'starting from causes to effects.')
step_output = generate_response(step_prompt)

print('Original output:', original_output)
print('Improved output:', improved_output)
print('Step-by-step output:', step_output)
Added context to the prompt to specify the topic clearly.
Included an example in the prompt to guide the AI's answer.
Requested a step-by-step explanation to structure the output.
Results Interpretation

Before: Output relevance 60%, accuracy 55%, satisfaction 50%.

After: Output relevance 85%, accuracy 80%, satisfaction 82%.

Clear and detailed prompts help AI understand what you want. This leads to better, more accurate, and useful answers.
Bonus Experiment
Try designing prompts that ask the AI to answer as if explaining to a child or expert. See how the output changes.
💡 Hint
Use phrases like 'Explain like I'm 5' or 'Explain with technical details' in your prompt.

Practice

(1/5)
1. Why is prompt design important when working with AI models?
easy
A. Because prompt design changes the AI model's architecture
B. Because clear prompts help AI give better and more accurate answers
C. Because prompt design only affects the speed of AI response
D. Because AI models ignore the prompt and generate random answers

Solution

  1. Step 1: Understand the role of prompt design

    Prompt design guides the AI on what to focus on and how to respond.
  2. Step 2: Recognize the effect of clear prompts

    Clear and detailed prompts reduce confusion and improve answer quality.
  3. Final Answer:

    Because clear prompts help AI give better and more accurate answers -> Option B
  4. Quick Check:

    Clear prompts = better AI answers [OK]
Hint: Clear prompts lead to better AI answers [OK]
Common Mistakes:
  • Thinking AI ignores the prompt
  • Believing prompt only affects speed
  • Confusing prompt design with model structure
2. Which of the following is the correct way to write a prompt for an AI model?
easy
A. Tell me stuff.
B. Causes climate change?
C. Write.
D. Explain the causes of climate change in simple terms.

Solution

  1. Step 1: Identify clear and detailed prompts

    Explain the causes of climate change in simple terms. clearly asks for causes and specifies simple terms, guiding the AI well.
  2. Step 2: Compare with vague prompts

    Options A, B, and D are too short or unclear, causing poor AI responses.
  3. Final Answer:

    Explain the causes of climate change in simple terms. -> Option D
  4. Quick Check:

    Clear and detailed prompt = Explain the causes of climate change in simple terms. [OK]
Hint: Use full sentences with clear requests [OK]
Common Mistakes:
  • Using incomplete or vague prompts
  • Not specifying what kind of answer is wanted
  • Assuming AI understands short phrases
3. Given the prompt: "List three benefits of exercise." What is the most likely output from an AI model?
medium
A. ["1", "2", "3"]
B. ["Exercise", "Food", "Sleep"]
C. ["Improves mood", "Increases energy", "Supports weight loss"]
D. ["Red", "Blue", "Green"]

Solution

  1. Step 1: Understand the prompt request

    The prompt asks for three benefits of exercise, so the AI should list relevant benefits.
  2. Step 2: Match options to expected output

    ["Improves mood", "Increases energy", "Supports weight loss"] lists three clear benefits, while others are unrelated or nonsensical.
  3. Final Answer:

    ["Improves mood", "Increases energy", "Supports weight loss"] -> Option C
  4. Quick Check:

    Relevant list of benefits = ["Improves mood", "Increases energy", "Supports weight loss"] [OK]
Hint: Match output to prompt topic and format [OK]
Common Mistakes:
  • Choosing unrelated or random lists
  • Ignoring prompt details
  • Expecting numeric or color outputs incorrectly
4. You gave this prompt to an AI: "Tell me about dogs" but the AI gave a very short and unclear answer. What is the best way to fix the prompt?
medium
A. Make the prompt more specific, like 'Describe common dog breeds and their traits.'
B. Use fewer words, like 'Dogs?'
C. Add random words to confuse the AI.
D. Repeat the same prompt multiple times.

Solution

  1. Step 1: Identify the problem with the original prompt

    The original prompt is too vague, causing unclear AI answers.
  2. Step 2: Choose a clearer, more detailed prompt

    Make the prompt more specific, like 'Describe common dog breeds and their traits.' improves clarity and guides the AI to give better information.
  3. Final Answer:

    Make the prompt more specific, like 'Describe common dog breeds and their traits.' -> Option A
  4. Quick Check:

    Specific prompt = better AI output [OK]
Hint: Make prompts specific and clear [OK]
Common Mistakes:
  • Using vague or too short prompts
  • Adding confusing words
  • Repeating prompts without changes
5. You want an AI to generate a short story about a robot learning kindness. Which prompt will most likely produce the best story?
hard
A. Write a short story about a robot learning kindness, including a challenge it faces and how it changes.
B. Robot story.
C. Tell me something.
D. Write a list of robot parts.

Solution

  1. Step 1: Analyze the prompt details

    Write a short story about a robot learning kindness, including a challenge it faces and how it changes. clearly states the story topic, length, and key elements to include.
  2. Step 2: Compare with vague or unrelated prompts

    Options B, C, and D are too vague or unrelated to the story goal.
  3. Final Answer:

    Write a short story about a robot learning kindness, including a challenge it faces and how it changes. -> Option A
  4. Quick Check:

    Detailed story prompt = best output [OK]
Hint: Give clear story details and goals [OK]
Common Mistakes:
  • Using too short or vague prompts
  • Asking for unrelated content
  • Not specifying story elements