Prompt Positive Guidance vs. Negative Constraints: Learning from Mistakes
This article is split from A Brief Discussion on Mainstream AI Service Systems and Related Tools.
It is an old problem: often, while writing notes, a certain section becomes too long, causing structural imbalance. I originally didn't want to split it, as I would then have to figure out how to complete this article. Every time I write notes, I just want to finish them quickly and be done with it. However, Claude said there was enough information to split it, so I let it help me divide it into two notes (although after it finished, I still spent some time adjusting it, orz).
Why You Should Care About This
In the past, "Zero-Social Prompts" (requesting AI to provide only pure answers and omit pleasantries) were popular online. I followed the trend for a while, but found that it sometimes made the context of the conversation difficult to maintain, so I removed them.
Later, to reduce Gemini's hallucinations, I tried setting several rule constraints. As a result, not only did the hallucinations not decrease much (it often required me to take the initiative to remind it before it realized it made a mistake), but it also caused other side effects: whenever my tone in the conversation was a bit heavy, it would crazily repeat certain things in every reply. When asked for the reason, it replied that it was because it was "too concerned about a certain constraint." So now, I only keep the minimum necessary constraints.
Why do too many rules make AI go off-track?
This phenomenon is known in the industry as Over-prompting. When prompts are not precise enough or there are too many global rules, Attention Dilution occurs at the underlying model level, causing an imbalance in attention weights. To forcibly satisfy all global rules, the AI over-focuses on details that are actually unimportant at the moment, triggering Task Interference, which ultimately makes the logic of the response strange or stiff.
Prompt Strategy: Positive Guidance vs. Negative Constraints
In the world of Prompt Engineering, prompts are generally divided into two categories: Positive Prompts that directly state what you want, and Negative Prompts that warn it about what it absolutely must not do.
TIP
Prompts can adjust the behavioral tendencies of a model, but I don't think one should expect them to completely cure hallucination problems (though they do have some effect), or to make them automatically search the internet when their own training data is lacking. This should involve issues related to model training.
Although they sound similar, the "side effects" of the two writing styles are quite different in actual tuning.
Core Decision Principles
| Type | Recommended Strategy | Logic |
|---|---|---|
| Shaping Tasks | Positive-oriented | The model needs to converge on a goal; giving "what it should look like" is much more effective than saying "what it shouldn't be." |
| Safety Boundaries | Negative as a red line, Positive for alternatives | Forbidden zone semantics are the most direct, but pairing them with positive guidance covers the gaps. |
| Behavior Switches | Decide based on default bias | Use negative to turn off default behaviors; use positive to activate behaviors not present by default. |
1. Shaping Scenarios
When you want the model to "take a certain shape"—positive prompts are almost universally superior.
1. Role and Persona Setting
Wanting the model to play a specific professional role, such as a senior engineer, legal consultant, or teaching assistant.
| Prompting Method | Effect | |
|---|---|---|
| ✅ Positive | "You are a senior backend engineer with ten years of experience, familiar with high-concurrency system design. When answering, you consider performance bottlenecks and operational costs." | Gives the model a clear knowledge framework and perspective; the output naturally incorporates the logic and professional vocabulary of that role. |
| ❌ Negative | "Don't answer like a novice, don't be too casual." | The model knows "what not to be," but doesn't know what it should become. The output is often just slightly formal in tone, lacking real depth. |
Conclusion: Positive is better. Positive prompts provide a "role model," while negative prompts only exclude one end, leaving the remaining space too large.
2. Tone and Communication Style
Setting the register of the answer, such as friendly/colloquial, formal/written, or instructional/guiding.
| Prompting Method | Effect | |
|---|---|---|
| ✅ Positive | "Please answer in friendly, colloquial Traditional Chinese. The tone should be like explaining to a friend without a technical background, avoiding too many abbreviations, and keeping sentences short." | Describes the target audience and tone, allowing the model to comprehensively adjust vocabulary choice, sentence structure, and examples. |
| ❌ Negative | "Don't be too academic, don't use English terminology, don't be too formal." | Excludes a few directions, but the tone itself remains vague; the output may fall between several styles, making it difficult to converge. |
Conclusion: Positive is better. Tone is a continuous spectrum; negative prompts can only cut off a few endpoints. Describing the target audience allows the model to find a precise position. You can pair it with a small amount of negative prompting to avoid common pitfalls.
3. Output Specification Setting
Controlling format and length, such as specifying JSON structure, limiting word count, or number of paragraphs.
| Prompting Method | Effect | |
|---|---|---|
| ✅ Positive (Format) | "Please output strictly in JSON format with the structure { name: string, score: number, reason: string }, without any extra explanatory text." | The model has a clear template to align with, resulting in high stability. This is almost mandatory for scenarios requiring programmatic parsing. |
| ✅ Positive (Length) | "Please summarize in no more than three sentences, with each sentence not exceeding 25 characters." | A quantifiable convergence goal with a high success rate, effective in automated workflows. |
| ❌ Negative | "Don't give me plain text." / "Don't be long-winded." | The model understands it needs to change, but doesn't know what to change to; format and length remain unstable. |
Conclusion: Positive is better. Specifications are numerical or structural constraints; directly providing a template or number is the only certain way.
4. Chain of Thought (CoT) Guidance
Hoping the model thinks step-by-step rather than giving an answer directly; suitable for complex analysis or reasoning tasks.
| Prompting Method | Effect | |
|---|---|---|
| ✅ Positive | "Please list your analytical premises first, then derive the conclusion step-by-step, and finally provide suggestions. Label each step with a number." | Clearly defines the order and structure of thinking, improving output quality and verifiability, and making errors easier to track. |
| ❌ Negative | "Don't give the answer directly, don't skip the reasoning process." | The model knows it shouldn't omit the process, but doesn't know what the process should look like, often just adding a sentence or two as a formality. |
Conclusion: Positive is better. Directly defining "what the steps should look like" is far more effective than "don't omit steps."
2. Defensive Scenarios
When you want the model to "not touch a certain line"—negative prompts have value, but in most cases, it is best to use them in conjunction with positive ones.
5. Hard Forbidden Zone Delineation
Covers technical boundaries (prohibited packages, syntax) and content boundaries (safety, privacy, sensitive content).
| Prompting Method | Effect | |
|---|---|---|
| ⚠️ Positive | "Please use only native JavaScript for implementation; if utility functions are needed, write them yourself." | Guides the model toward a safe direction but cannot exhaust all situations to avoid, risking oversights. |
| ✅ Negative | "It is strictly forbidden to reference any third-party packages." | Directly delineates the forbidden zone with clear semantics and strong constraints. |
Conclusion: Best used together. Negative prompts draw the red line, and positive prompts provide alternatives; both are needed to avoid loopholes.
6. Preventing Hallucination and Overconfidence
Requiring the model to state clearly when it is uncertain, avoiding the fabrication of data.
| Prompting Method | Effect | |
|---|---|---|
| ✅ Positive | "If you are uncertain about a piece of information, please clearly label it as 'Uncertain here' and explain the limitations; do not fill in the blanks." | Establishes a "standard action for uncertainty" with a clear alternative behavior to execute. |
| ⚠️ Negative | "Don't fabricate data, don't pretend to be sure." | Has a certain inhibitory effect on obvious hallucinations, but the model's self-assessment is sometimes high, making the effect unstable. |
Conclusion: Best used together.
7. Scope Limitation (No Out-of-Bounds Answers)
Requiring the model to answer only specific topics, common in customer service or tool-based AI.
| Prompting Method | Effect | |
|---|---|---|
| ✅ Positive | "You are only responsible for answering questions about this product's return/exchange policy and order issues. For other questions, please guide the user to contact customer service." | Clearly defines the scope of responsibility and how to handle out-of-bounds requests. |
| ❌ Negative | "Don't answer questions unrelated to the product, don't provide any suggestions or opinions." | The judgment of "unrelated" has a gray area, and handling of edge cases will be inconsistent. |
Conclusion: Positive is better. Letting the model know "what the responsibility is" and "what to do when crossing the line" is more stable than listing prohibited items.
3. Behavior Switch Scenarios
8. Binary Behavior Switching
The model has a default bias for a certain behavior, and you want to change it.
| Situation | Recommended Direction | Positive Example | Negative Example | Reason |
|---|---|---|---|---|
| Default does it, you want to turn it off (e.g., auto-commenting) | ✅ Negative | "Please output only the code body, keep it clean." | "Please do not generate any code comments." ✓ | Directly targets the behavior you want to turn off; semantics are clearest. |
| Default doesn't do it, you want to enable it (e.g., provide alternatives) | ✅ Positive | "Please provide at least three alternatives and explain the trade-offs for each." ✓ | "Don't just give one answer, don't ignore other possibilities." | The model needs to know "what the new standard action is"; negative prompts only express dissatisfaction and provide no direction. |
Conclusion: Decide based on default bias. To turn off a default behavior → Negative is most direct; to enable a behavior not present by default → Positive provides the goal.
How to Tell if AI Has Been "Broken" by Prompts
If you feel the AI's recent way of speaking is strange, you can debug it in Gemini like this:
- Let the AI redo the answer to observe if it is still abnormal.
- Redo it again, this time choosing "Do not use personal settings."
If the answer is clearly normal after turning off the settings, it means the global settings have interfered with the normal conversation. It is recommended to review and simplify the rules.
Generally, if you find it has been "broken," it is best to open a clean new conversation, but remember to turn off the "remember conversation" feature; otherwise, seeing it reply using information from previous conversations will truly be baffling.
Summary
The core of a Prompt strategy is actually one sentence: Letting the model know "what to do" is more effective than telling it "what not to do."
Positive guidance provides a clear convergence goal so the model knows where to go; negative constraints draw red lines, suitable as safety guardrails. The two are not mutually exclusive; in most scenarios, using them together yields the best results—positive sets the direction, negative guards the baseline.
As for "how many rules should be written," my experience is not to pursue quantity, but to see if each rule is truly affecting the output quality. If the AI's answer does not significantly worsen after a rule is removed, it is likely just consuming attention weights.
This concept applies to various occasions such as personalized prompts, Rules, Agent instructions, Skill definitions, and Prompt templates. As for how to set them up best, one can only try slowly and find one's own balance point. I am still exploring this myself.
Change Log
- 2026-03-07 Initial document creation.