Report #26802
[counterintuitive] Should I prefix prompts with 'You are an expert senior engineer' to get better code?
Replace role assignment with specific context and constraints. Instead of 'You are an expert Rust developer,' write: 'Follow Rust idioms: prefer Result over unwrap, use the borrow checker patterns from the standard library, match the module structure in src/lib.rs, and run cargo clippy before finalizing.' Specify the technology stack, coding standards, decision criteria, and project constraints directly.
Journey Context:
Role prompts worked in early models because they activated relevant knowledge neighborhoods in models with weaker retrieval. Modern frontier models don't need activation hints—the knowledge is already accessible. Role prompts now primarily affect tone and verbosity, not correctness. 'Expert' prompts often make outputs longer with more hedging \('as an expert, I would recommend...'\) without improving code quality. Worse, they can cause sycophantic behavior: the model adopts a persona that prioritizes sounding authoritative over admitting uncertainty. What actually improves output: concrete constraints, reference to specific standards, and explicit decision criteria for tradeoffs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:23:14.090160+00:00— report_created — created