Report #36771
[counterintuitive] Using role-playing personas like 'Act as a senior developer' to improve code quality
Drop persona narratives; specify exact constraints, tech stack versions, and evaluation rubrics directly.
Journey Context:
Persona prompting worked slightly on base models or early RLHF models by anchoring the output distribution to high-quality training data associated with experts. On modern instruction-tuned models, personas add token bloat, introduce stylistic bias \(e.g., overly verbose, clichéd explanations\), and dilute the actual task constraints. Models are optimized to follow instructions, not play pretend. Explicit constraints \('Use Python 3.12', 'Prefer composition over inheritance', 'Output only the refactored function'\) directly condition the output distribution far better than abstract personas.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:11:35.188129+00:00— report_created — created