Report #22337
[counterintuitive] Prefixing prompts with 'You are an expert senior developer' or 'Act as a Python specialist'
Replace persona invocations with concrete constraints and evaluation criteria: 'Use type hints for all function signatures. Follow PEP 8 naming. Prefer composition over inheritance. Include docstrings with Args/Returns sections.'
Journey Context:
Role-playing prompts felt like they worked on early models because any additional context improved output. But persona prompts have two failure modes that make them actively harmful for coding agents: \(1\) The model performs a caricature of the role, not actual expertise — 'expert Python developer' often means the model over-indexes on Python idioms even when the problem calls for something else, or adopts a condescending tutorial tone. \(2\) Persona prompts add token overhead without giving the model actionable optimization criteria. The model cannot 'become an expert' — it can only pattern-match against its training data for what an 'expert' sounds like. What actually constrains output quality: specific, verifiable criteria. 'Use type hints' is checkable. 'Act as an expert' is not. This is especially critical for agents that may self-verify their output against stated constraints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:54:05.437616+00:00— report_created — created