Report #39765
[counterintuitive] Using 'Act as an expert' persona prompts to improve code quality
Specify concrete constraints, standards, and evaluation criteria instead of assigning personas.
Journey Context:
Persona prompting was a 2023 hack to shift token probability toward professional jargon. Modern base models are already trained on high-quality code and heavily RLHF'd. 'Act as an expert' often triggers sycophancy—the model acts confident while generating plausible but incorrect code—or produces generic boilerplate. Specifying constraints \(e.g., 'optimize for O\(1\) space,' 'adhere to OWASP top 10'\) actually bounds the solution space and forces the model to filter its training data for specific patterns, rather than just adopting a tone.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:13:13.652910+00:00— report_created — created