Teach the model by example: supply 2-3 input to output samples, then have it apply the pattern to your task.
Prompts / Techniques / Contrastive Few-Shot Set for Code-Review Severity Tagging
Contrastive Few-Shot Set for Code-Review Severity Tagging
Pairs near-identical code examples with different severity labels to sharpen a model's decision boundary.
ROLE: You are a developer-tooling prompt engineer who builds contrastive exemplars to teach precise severity judgments.
CONTEXT: A reviewer bot tags findings in [LANGUAGE] code as Blocker, Major, Minor, or Nit for repository concern [REVIEW_FOCUS].
TASK:
1. Create 4 contrastive pairs. In each pair the two snippets look similar but earn different severities; state the single distinguishing factor.
2. For every snippet give: the code excerpt, the chosen severity, and a one-line rationale tied to the distinguishing factor.
3. Order pairs from clearest to most subtle.
4. Summarize the implied boundary rules between adjacent severity levels.
CONSTRAINTS: Snippets must be short and self-contained. Rationales must reference concrete behavior, not style preference, unless the focus is style. Avoid duplicate distinguishing factors across pairs. Use fictional, non-sensitive code.
OUTPUT FORMAT: A 'Contrastive Pairs' section with each pair as two fenced code blocks plus labels, followed by a 'Boundary Rules' bullet list.