Technical
Prompt Engineering Is Just Clear Communication
People overthink prompt engineering. They study templates, memorize techniques, and read research papers about chain-of-thought reasoning. The reality is simpler: prompt engineering is just clear communication with a machine that takes you literally.
The Core Insight
When you ask a colleague to build something, you include context, constraints, and expectations. When you ask an AI to build something, you should do exactly the same thing. The only difference is that the AI takes you more literally than a human would.
A human colleague would ask clarifying questions if your request is ambiguous. An AI will just pick an interpretation and run with it. So your job is to remove ambiguity upfront.
The Context-Constraints-Criteria Pattern
Every effective prompt has three parts:
Context: What does the AI need to know about the situation? Constraints: What rules must the output follow? Criteria: How will you judge if the output is good?
Context: I have a FastAPI app with Pydantic models and DynamoDB.
Constraints: Use existing patterns in src/models.py. No new dependencies.
Criteria: The endpoint returns 201 for valid input, 422 for invalid.
Task: Add a subscriber creation endpoint at POST /subscribers.Why Templates Do Not Work
Memorizing prompt templates ('Act as a senior developer...') does not help because every situation is different. What works is understanding why certain prompts produce better results:
- Specificity reduces ambiguity: 'Add validation' is vague. 'Reject emails without an @ sign' is specific.
- Examples ground expectations: 'Format the output like this: ...' removes guesswork.
- Constraints prevent hallucination: 'Only use functions from the standard library' prevents the AI from inventing packages.
Common Communication Failures
Failure 1: Assuming shared context. 'Fix the bug.' Which bug? In which file? What is the expected behavior? The AI does not know what you discussed with your teammate yesterday.
Failure 2: Conflicting instructions. 'Make it simple but handle every edge case.' Simple code does not handle every edge case. Pick a priority.
Failure 3: No success criteria. 'Make the API better.' Better how? Faster? More endpoints? Better error messages? Without criteria, the AI guesses.
The Feedback Loop
Good communication is iterative. The best prompt is not the first one. It is the third one, after you have seen the AI's interpretation and corrected course:
- Give initial prompt with context and constraints
- Review the output and identify what was misinterpreted
- Clarify the misinterpretation in your next prompt
- Repeat until the output matches your intent
This is not prompt engineering. It is communication. The same skill you use with human teammates, applied to a different kind of collaborator.
For more on clear communication with AI, see Anthropic's prompt engineering guide.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read