Post

Most Agent failures aren’t about bad models. They’re about bad prompts. Here’s how to write prompts that actually work—based on thousands of real dev-Agent interactions 👇🧵

0 reposts3 likes

❌ “Fix bug in login handler” ✅ “Login fails with 500 on incorrect passwords. Repro: call /api/auth with wrong creds. Check auth_service.py. Add test if possible.” Agents need context like humans do.

Include why, not just what. ❌ “Use events instead of direct method calls” ✅ “Reviewers flagged tight coupling in SettingsWebviewPanel.statusUpdate(). Let’s refactor to events to improve modularity.” Reasoning aligns the Agent with your intent.

Give references to code, tests, or docs. ❌ “Write tests for ImageProcessor” ✅ “Write tests for ImageProcessor.Follow structure in test_text_processor.py” The Agent learns better by example.

Point the Agent to the right files. ❌ “Add JSON parser to chat backend” ✅ “Add JSON parser in LLMOutputParsing (services/ folder). It’ll be used to extract structured output from chat completions.” Precision = performance.