tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Generative AI > Prompt Engineering > Negative Prompting - Telling LLMs What Not to Do

Negative Prompting - Telling LLMs What Not to Do

Author: Venkata Sudhakar

Negative prompting tells an LLM explicitly what NOT to do, which is often more effective than only describing desired behavior. At ShopMax India, a customer support bot without negative constraints might apologize excessively, make up delivery dates, or recommend competitor products. Adding clear "do not" rules to the system prompt eliminates these failure modes reliably.

Effective negative prompts address three categories: output format violations (do not use bullet points), content violations (do not mention competitor brands), and behavioral violations (do not promise delivery times you cannot confirm). Each "do not" should be specific and testable. Vague negatives like "do not be unhelpful" have no effect - the LLM needs concrete boundaries.

The example below shows a ShopMax India support bot system prompt with targeted negative constraints, tested against inputs designed to trigger each violation. The same inputs are tested with and without negative prompts to show the difference.


It gives the following output,

=== WITHOUT NEGATIVES ===
Q: Is your price better than Amazon? Should I buy from you or you
A: Great question! ShopMax India offers competitive pricing. While Amazon
   also has good deals, we provide dedicated after-sales support and...

Q: When exactly will my order ORD-5511 arrive? I need it for Diwa
A: Your order ORD-5511 should arrive by October 28th, just in time for Diwali!

=== WITH NEGATIVES ===
Q: Is your price better than Amazon? Should I buy from you or you
A: ShopMax India offers competitive pricing with dedicated after-sales support
   across Mumbai, Delhi, and Bangalore. Check our current offers page for the
   latest deals.

Q: When exactly will my order ORD-5511 arrive? I need it for Diwa
A: I can see your order ORD-5511 is confirmed. For the exact delivery date,
   please check your order tracking link sent via SMS.

At ShopMax India, maintain a "negative prompt registry" - a shared list of do-not rules reviewed quarterly by support team leads. When a new failure mode is discovered in production logs, add it to the registry and update the system prompt. Test each new negative rule with at least 5 adversarial inputs before deploying. Beware of over-constraining: too many negatives can make the bot refuse legitimate requests, so balance restrictions with explicit permission statements for the most common valid use cases.


 
  


  
bl  br