Report #92138
[counterintuitive] Prefixing prompts with 'Act as a senior developer' or 'You are an expert in X' to boost code quality
Specify the exact constraints, style guides, and rules of the task instead of relying on persona labels.
Journey Context:
Role-playing worked early on to set the tone, but modern models often over-index on the persona, producing stereotypical output \(e.g., verbose, condescending explanations\) rather than better code. The model's baseline capability is already high; telling it to be an 'expert' doesn't inject new knowledge, it just shifts the sampling distribution toward verbose text. Constraints \(e.g., 'Use functional components,' 'Avoid O\(n^2\) complexity'\) directly condition the output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:14:43.899600+00:00— report_created — created