Prompt Specificity & Precision
CoreDesign prompts with explicit criteria to improve precision and reduce false positives · Difficulty 2/5
0%
specificitycriteriaprompting
Vague prompts produce inconsistent results. Prompt specificity means replacing ambiguous instructions with precise criteria that the model can apply deterministically.
Example: Comment Analysis
Vague: "Check that comments are accurate and up-to-date"
Specific: "Flag comments only when their claimed behavior contradicts actual code behavior"
Principles
Key Takeaways
- ✓Replace vague goals with specific, actionable criteria
- ✓Define what should NOT be flagged, not just what should
- ✓Concrete severity criteria with examples improve consistency
Related Concepts
Test Yourself1 of 1
Your automated review analyzes comments and docstrings. The current prompt instructs Claude to "check that comments are accurate and up-to-date." Findings frequently flag acceptable patterns while missing comments that describe behavior the code no longer implements. What change addresses the root cause?