Buried Rules Get Ignored: Put Your Constraints at the End of Long Prompts

Everyone fixes a disobedient prompt by rewording the rule. Louder wording, capital letters, three “IMPORTANT” tags in a row. A simpler fix is to move the rule somewhere else.

A Reddit post in r/PromptEngineering lays out an ordering pattern for long prompts. It’s cheap to try and it makes sense once you see the reason behind it. You don’t need new tooling or a new model. You only need to cut and paste a few blocks of text.

The key idea

Models tend to pay the most attention to what sits at the start and the end of their context. The middle gets less weight. Research on long-context retrieval calls this the “lost in the middle” effect.

So take a rule like “never use the word delve.” If it sits on line 5 of a 200-line prompt, the model will sometimes ignore it. The rule was fine. It was just in the wrong place.

Think of it like a long meeting. People remember the opening and the last five minutes. The stuff discussed in the middle blurs together. A prompt works the same way, and shouting the rule louder doesn’t fix a position problem.

The old way vs. the new way

The old way: You write the prompt in the order you thought of things. Role, a rule, some examples, another rule, the format, a few more rules you remembered later. The important constraints end up scattered through the middle, where they get the least attention. Then the model breaks one, you add a seventh “IMPORTANT,” and the prompt gets longer and more cluttered without getting more reliable.

The new way: You write the prompt in layers, ordered by how much attention each part needs.

  • Top: context and role. Who the model is, what the task is, who the audience is.
  • Middle: reference material. Documents, examples and data the model needs to look up but doesn’t need to internalize.
  • Near the end: hard rules and constraints, right before the output instruction.
  • Very last: output format and a short checklist.

The middle is where the long, skimmable stuff lives, so it’s fine if it gets less weight. The things you can’t afford to lose go where the model is paying the most attention.

Here’s a concrete case. Say you have a prompt that writes product descriptions. It includes a 2,000-word brand guide, ten sample descriptions, and a list of eight rules, including “no superlatives” and “never mention competitors.” In the old layout, those rules sit between the brand guide and the samples. In the new layout, the brand guide and samples stay in the middle, and the eight rules move into one tight block right before the instruction to write.

Why the checklist matters most

The original poster says the closing checklist is the most useful part. The model reads it right before it starts generating, so it works like a built-in self-review. A checklist buried mid-prompt gets skipped more often.

One commenter said the same thing from experience. They moved their format rules and forbidden phrases into a final bullet list, and the output stopped ignoring half of them. That’s one data point, not a benchmark, but it matches the theory.

It also helps to phrase the checklist as things the model can verify against its own draft. “Write in a friendly tone” is hard to check. “Contains no sentence over 25 words” is easy to check. The more concrete the item, the more the checklist acts like a real test instead of a reminder.

How to try it 🛠️

  1. Take a long prompt that misbehaves. Pick one where you already know which rule gets broken.
  2. Cut the hard rules out of the middle and paste them into one block just before your output instruction. Group related rules together so the block reads cleanly.
  3. Add a checklist of 4 to 6 short items at the very end. Make them yes/no checks, like “No banned words used” or “Under 150 words.”
  4. Keep the reference material in the middle, untouched.
  5. Run the same input 5 to 10 times before and after. Count how often the rule gets broken. One run tells you nothing, because model output varies from run to run.

Keep a simple tally in a notes file: old layout broke the rule 6 out of 10 times, new layout broke it 2 out of 10. That small record is what tells you whether the change is real or just luck.

When it won’t help ⚖️

The poster is upfront about the trade-off. If your prompt is short, under a few hundred tokens, order barely matters. The model can hold the whole thing in view. This pattern earns its keep when the prompt is long enough that the model can’t give every section equal attention.

It also won’t rescue a rule that is vague or contradicts another rule. If one line says “be brief” and another says “explain every step in detail,” moving them around only changes which one loses. Clean up the conflict first, then fix the order.

So don’t go reorganizing your five-line prompts. Save the effort for the sprawling system prompts and content templates.

Your move

Pick the longest prompt you own and find the one rule it keeps breaking. Move that rule to the end, add the checklist, and run it ten times. If the break rate drops, you’ve got a free upgrade. 🚀

And if you have your own ordering tricks for keeping outputs consistent, share them. The original thread ended with that exact question, and I’d like to see what works for you!

Frequently Asked Questions

Q: Where should forbidden phrases and format rules go in a long prompt?

Put them in a short bulleted list as the last section, right before the output instruction. One commenter moved their format rules and banned phrases to the bottom and said the model stopped ignoring about half of them. Keep each rule to a single line so it’s easy to scan.

Q: Why does a checklist at the end work better than one in the middle?

The model reads the checklist right before it starts generating, so it works like a self-review pass. Commenters said checklists buried in the middle of a prompt got skipped, while the ones at the bottom caught small details. If you use one, give it its own spot at the end and keep it short.

Q: Is a bulleted list really better than paragraphs for these rules?

The commenter used bullets and saw better compliance, but nobody in the thread compared bullets against prose. Run the same prompt both ways on a handful of outputs and count which banned phrases slip through. Keep whichever version you can verify.

Where you put your constraints in a prompt matters as much as what they say
by u/Firm-Builder-2001 in PromptEngineering

Scroll to Top