Stop Asking AI to "Explain This Like I'm 5"
You know that feeling when you ask an AI model something and get back a wall of corporate jargon instead of an actual answer? That's not the model's fault—it's your prompt.
I spent three months watching developers use AI tools, and 90% of them were doing it wrong. Not badly. Wrong. There's a difference. So here's what actually works, based on what I've seen in real codebases and real workflows.
The Problem: You're Treating AI Like Google
Here's how most people prompt:
write a function to sort an array
And then they're surprised when they get something mediocre. Of course they do. You just asked for the bare minimum.
AI models are pattern-matching machines. They don't know what you want. They're guessing based on what they've seen before. And "sort an array" has been answered a million times in a million mediocre ways.
Instead, give the model context about why you're asking.
What Actually Works
1. Show, Don't Tell
Bad:
write clean code for a payment processor
Good:
write a payment processor that:
- retries failed transactions up to 3 times with exponential backoff
- logs transaction attempts to help with debugging failed payments
- throws a specific error that my React UI can catch and show the user
- works with Stripe's webhook system (they fire async)
Here's our error handling pattern in other parts of the app:
typescript
class PaymentError extends Error {
constructor(public code: string, message: string) {
super(message);
}
}
plaintext
See the difference? You're not asking for "clean code." You're showing the model exactly what you need, in your own codebase's voice.
2. Be Specific About Trade-offs
Bad:
optimize this database query
plaintext
Good:
our user list query is slow when we have 100k+ users. right now it does:
- loads all users
- filters by status in memory
- orders by last_login
we're ok trading some CPU for less latency (we query this 50x/day, so response time matters more than processing power). what would you suggest?
plaintext
This tells the model what problem you're actually solving, not just what's technically "slow."
3. Provide Examples of What You DON'T Want
Bad:
generate test cases for this function
plaintext
Good:
generate test cases for this function. but don't:
- test obvious stuff like "returns 0 when input is 0" (we did that already)
- use mock data that doesn't match real-world scenarios
- give me more than 5 cases (we don't have time for 50 tests)
focus on edge cases where it actually breaks or behaves weirdly
plaintext
The model now knows what to filter out, which is half the battle.
4. Use Constraints, Not Descriptions
Bad:
write a simple logging system
plaintext
Good:
write a logging system that:
- outputs JSON (so we can parse it in Datadog)
- is under 50 lines
- supports log levels: debug, info, warn, error
- doesn't require external dependencies
this is for a Next.js API route, so it needs to work in an edge runtime
plaintext
Constraints force the model to make actual decisions instead of rambling.
The Secret Ingredient: Personality
Here's something most people miss. If you want code that fits your codebase, show the model your codebase's personality.
Your team probably has:
- Preferred naming conventions
- Error handling patterns
- Testing strategies
- Documentation style
Just paste an example. One small function. Then ask:
here's how we usually write functions in our codebase:
[paste a 15-line function]
using this style, write a function that extracts the domain from an email address
The model will now match your team's voice instead of defaulting to whatever it learned from Stack Overflow.
When NOT to Use AI
Real talk: AI is amazing at some things and useless at others.
Use it for:
- Boilerplate (forms, API handlers, database migrations)
- Explaining weird library behavior
- Refactoring (it's great at finding cleaner patterns)
- Writing tests
- Documentation
Don't use it for:
- Architectural decisions (that's your job)
- Security-critical code without review (obviously)
- Something you could Google in 30 seconds (your time is worth more than the novelty)
Your Daily AI Workflow
Here's what actually saves time:
- Paste context, not questions. Show the model your function, your error, your codebase pattern. Then ask.
- Be specific about constraints. Performance? Bundle size? Edge cases? Say it.
- Use examples from your team's code. Copy a 20-line function. The model will match it.
- Iterate with rejection. If it's not right, say "that's close, but..." and explain what's wrong. The model will learn from your feedback within the same conversation.
- Always review. This should be obvious, but it's not. Read the code. Run it. Test it.
The Real Skill
Prompt engineering isn't about magic words. It's about being clear about what you want and why. It's the same skill you need to write good documentation, explain bugs to teammates, or ask for help on Discord.
If you can explain your problem well to a human, you can explain it well to AI.
The models are getting smarter every month, but they'll never read your mind. Help them out.
Want more practical AI tools and workflows? Check out LearnAI Weekly newsletter for real techniques that developers are actually using, not buzzword bingo.
Now go forth and prompt better. Your codebase will thank you.
Top comments (0)