AgentSkillsCN

fewshot-example-hygiene

在提示中引入少量示例时,务必防范“锚定效应”及外来约束的干扰。当提示中包含了来自其他领域的示例输出(如格式参考、博客摘录等),而您又希望模型在复制结构的同时,不照搬无关规则时,可安全地运用此技巧。

SKILL.md
--- frontmatter
name: fewshot-example-hygiene
description: Use few-shot examples safely by preventing anchoring and imported constraints. Use when prompts include example outputs from other domains (format references, blog snippets, etc.) and you need the model to copy structure without copying irrelevant rules.

Fewshot Example Hygiene

Rules

  1. Label all examples as FORMAT-ONLY unless they are truly from the same domain.
  2. Add an explicit anti-import rule:
    • “Do NOT import constraints from examples unless they appear in the problem statement.”
  3. Prefer adding a counterexample of what not to copy:
    • “Do not add government-ID checks, refunds, or time windows unless specified.”
  4. Require an imported-constraint scan after drafting:
    • List any constraints you added that are not supported by the problem statement.
    • Remove them or mark them as explicit assumptions.

Prompt snippet (copy/paste)

text
Examples below are FORMAT-ONLY. Copy structure, not domain constraints.
Anti-import rule: do NOT introduce any constraint not present in the system description.
After drafting, run an Imported Constraint Check and remove foreign assumptions.