Crafting Clear Instructions › Testing Your Prompts
AI Agent HandbookAll chapters 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:
prompt = "Write an email to my team about the meeting."You get a generic response. So you refine:
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:
- Start with a clear but simple prompt
- See what you get
- Identify what's missing or wrong
- Add more specific guidance
- 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).