Prompt engineering is 20% writing and 80% debugging. Here's a systematic approach.
| Symptom | Likely Cause | Fix |
|---|---|---|
| Calls wrong tool | Vague tool descriptions | Add specific use-case guidance |
| Hallucinates arguments | Ambiguous parameter names | Use descriptive names + examples |
| Ignores constraints | Constraints buried in long prompt | Move constraints to TOP + bold/caps |
| Loops infinitely | No termination criteria | Add "stop when X" + iteration cap |
| Generic answers | No domain context | Add company/domain context section |
| Wrong output format | Format not enforced | Add format examples + "ONLY this format" |
// Systematic Prompt Iteration Log // v1: Base prompt → 4/10 pass // v2: Added constraints → 6/10 pass // v3: Added few-shot examples → 8/10 pass // v4: Added negative examples → 9/10 pass // v5: Added structured CoT → 10/10 pass