EasyDeepLearn

Do 'negative prompts' ('do not X') work in LLMs?

easy

Answer

  • Sometimes, sometimes counterproductive.
  • Instruction-tuned LLMs generally follow 'do not' directives, but there's a well-documented 'ironic rebound' — mentioning the forbidden thing primes it.
  • Better patterns: (1) positive rephrase ('respond only in JSON') vs negative ('do not respond in prose'); (2) explicit output schema; (3) format constraints via examples.
  • Use negative prompts sparingly and pair with positive examples.
Check yourself — multiple choice
  • Negatives always work
  • Work sometimes; 'ironic rebound' primes forbidden content; prefer positive rephrase + examples + constraints
  • Impossible
  • Only for images

Negative prompts: modest effect, can prime forbidden content — prefer positive framing.

#prompting

Practise LLMs & GenAI

214 interview questions in this topic.

Related questions