Translate vague concepts into explicit attributes
Do not rely on concepts that you cannot define or recognize.
Instead of asking: “Generate code written by an inexperienced programmer.”
Define specific characteristics, such as:
- Poor variable names
- Repeated code
- Missing error handling
- Inefficient loops
- Hard-coded values
- Missing input validation
- Incorrect abstractions
- Excessive global variables
- Unclear control flow
- Inconsistent formatting
Then sample one or more mistakes and instruct the model to generate an example containing those specific mistakes.