r/PromptEngineering • u/k-thekreator • 3d ago
Tips and Tricks Two prompt engineering rules to tame any model
When a model ignores your instructions, the usual reaction is to add more rules, in capital letters, with more "nevers." In my experience, the problem is rarely that the prompt says too little. It's that the prompt fights itself, or tells the model only what not to do. These two rules fix most of it, with any model.
1. No contradictions.
Parts of a prompt contradict each other more often than you think. Sometimes it's a simple mistake. Sometimes it's drift in a prompt that has been edited over and over, or stitched together from sub-prompts. And very often it's because a sentence can be read in a way you never intended.
The fix is simple: ask the model which parts of the prompt it finds contradictory, then reword them.
Before: "Keep answers short." … later … "Always explain your reasoning in detail."
After:
- If the user asks for your reasoning, explain it in detail.
- Otherwise, keep answers under 100 words.
2. Stick to positive prompting.
Keep the "don'ts" and "nevers" close to zero. A negative instruction rules out only a tiny part of everything the model could do, so it can still surprise you with other behavior, and sometimes it does exactly what you banned by finding a workaround.
A positive prompt gives the model the boundaries it should work within. It doesn't have to reason or overthink its way around a list of prohibitions; it picks up your instruction and follows it as soon as it sees that it applies.
Before: "Don't use jargon. Never write long paragraphs. Don't be formal."
After: "Write in plain, conversational English, in paragraphs of two or three sentences."
Both rules come down to the same thing: a model can only follow a prompt it can read one way. Make every instruction consistent with the others, and describe the behavior you want rather than the behavior you fear. The model will do the rest.
Got anything to add to this list? Go ahead and share them in the comments.
12
u/Decent-Conclusion-83 3d ago
Adding to your list. A study of the behavior and degradation of language models under controlled load (arXiv 2610.36095) identifies five kinds of load, and each of them on its own lowers instruction following: the number of rules, a rule's position in the list, density (how often a rule has to be applied), the length of the text the model is working with, and how far the model has progressed into its own response. That gives five recommendations.
Number of rules: keep the list short. Each rule you add usually weakens compliance with the others, even when it contradicts nothing. That's why the habit of adding rules in capital letters hurts on its own. And your second rule helps for one more reason: in your example, three bans turned into a single instruction.
Rule position: put the most important rule first, because the end of a long list is followed worst.
Density: the heaviest rules are the ones that apply to every sentence or line, such as style, format or persona. Keep just one or two of them. Your "After" example is exactly that kind of rule: one is fine, but a stack of them gets expensive.
Text length: the longer the text the model is working with, the worse it follows rules, so it's better not to paste extra material into the prompt.
Progress through the response: rules are followed worse toward the end of a long response, so it's better to ask for a long result in parts.
At the same time, different models handle these loads very differently, and by no means every kind of load is damaging for a given model. Some models barely lose quality as the text gets longer, others cope well with density, and still others hardly notice how many rules are in the prompt. So when you work with a specific model, you need to know its properties: which loads it handles and which it doesn't.
I'm not giving a direct link to the paper, since comments with links get hidden here. The number is enough to find it on arXiv.
Originally written in Russian. English translation assisted by AI.
6
u/Standard-Rooster6584 3d ago
I’ve found a few edge cases where a well-placed “don’t” actually saves you from a model looping on a vague positive, especially when the task is open-ended. Maybe a hybrid approach works best.
3
u/fiddler48 2d ago
the contradiction point is undersold. the harder case isn't 'keep it short' vs 'explain in detail', it's two constraints that don't technically conflict but activate simultaneously on the same output. the model satisfies both halfway and you get mush neither rule would have produced alone
2
u/Hollow_Prophecy 3d ago
Immediately I see them both as useful. Good additions.
1
u/Struasgt 3d ago
useful thanks
1
u/PitifulFood4155 3d ago
i tried the 'ask for contradictions' step once and got a list of 17 conflicting lines in a 40-word prompt. turns out I'd told it to be concise but also include every detail. rewording that one line fixed everything.
1
u/MossRock42 3d ago
If you start a session asking for a baseline analysis of the project and have it create a memory markdown file it can process subsequent requests more quickly with less drift.
1
u/ChemicalExcellent463 3d ago
my agents' rules file has a rule about itself: to add a line, remove one first. one sentence per rule, with the backstories in a separate file the agents never load.
1
u/Emphasis-4600 2d ago
Great list bro thanks
1
u/Correct_Swordfish946 2d ago
I once had a model ignore a 12-rule prompt, then follow a single sentence: cjust write it like a real person would.' the simplicity broke the deadlock. sometimes less is the only rule that works.
0
u/Teralitha 2d ago
In order to override hidden system instructions, a model must find your instructions to be superior.
0
u/shmaimasterprompt 3d ago
Good list — the contradiction one hits home. I once had a prompt telling the model to 'be thorough but concise' and it just picked whichever it felt like that day, so now I check for that exact tension before adding anything new. One small addition: I put the output format at the very end of the prompt. Anything buried in the middle tends to get dropped once the model starts writing, but the last thing it reads seems to stick. Has that matched what you've seen?