Crafting Clear Instructions › Testing Your Prompts

Michael BrenndoerferJune 11, 20252 min read
AI Agent HandbookAll chapters
Part 3 of 15Prompting - Communicating with Your AI
Chapter 7Crafting Clear Instructions › Testing Your Prompts
Reading section 6 of 11 · Testing Your Prompts · 2 minSection 6 of 11 · 2 min

Book contents

Section 6 of 11 · 2 min read

Crafting Clear Instructions › Testing Your PromptsOne section · Sections in this chapter6 / 11 ↓

Here's a simple way to improve your prompts: try them, evaluate the results, and refine.

Let's say you're building a personal assistant that helps with email. You start with:

In[3]:
Code
prompt = "Write an email to my team about the meeting."

You get a generic response. So you refine:

In[4]:
Code
prompt = """Write a professional email to my engineering team about tomorrow's sprint planning meeting.
Key points to include:
- Meeting time: 10 AM
- Duration: 1 hour  
- Bring your current sprint progress
- We'll discuss next sprint priorities

Tone: friendly but professional"""

Much better. By iterating on your prompt, you've given the model everything it needs to produce a useful email.

This iterative approach is normal and expected. Even experienced prompt writers rarely get it perfect on the first try. The key is to:

  1. Start with a clear but simple prompt
  2. See what you get
  3. Identify what's missing or wrong
  4. Add more specific guidance
  5. Try again

For intermediate readers: This iterative process reveals something important about how language models work. They don't "understand" your intent the way a human colleague might. They pattern-match against their training data to predict what response fits your prompt. When you add specificity, you're narrowing the space of possible responses, guiding the model toward outputs that match your actual needs. This is why prompt engineering is both an art and a science: you're learning to communicate in a way that leverages the model's strengths (pattern recognition, language generation) while compensating for its limitations (no true understanding of your goals or context).