Report #71895
[counterintuitive] Prefixing prompts with 'Act as a senior engineer' to improve code quality
Specify the exact constraints, style guides, and evaluation rubrics of the desired output rather than assigning a persona.
Journey Context:
Persona prompting was a hack to shift the model's probability distribution into a specific domain. Modern models already heavily weight coding context. 'Act as an expert' often leads to sycophancy—the model agrees with the user's bad assumptions because an 'expert' wouldn't argue with a client. Specifying constraints \('Write code that adheres to SOLID principles and includes error handling'\) directly targets the output distribution without triggering sycophantic alignment.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:15:42.045014+00:00— report_created — created