पाठ 13 / 25

Instruction Placement and Repetition

Put rules where they work and restate the critical ones.

Rules first, reminders last

Durable rules (role, policies, output format) belong in the system instructions at the top, where they are stable and cacheable. In long contexts, a short reminder of the key constraints right before or after the question (for example: answer only from the documents, reply in JSON) helps the model apply them after reading thousands of tokens. Avoid contradictory instructions spread across sections; when a rule changes, change it in one place. Keep instructions positive and specific: say what to do, with an example of the format.

A layout that works for long contexts

Stable on top, variable below, reminder at the end.

[system]    role, rules, output format (stable, cacheable)
[examples]  2-3 selected examples
[history]   summary + last few turns
[documents] <document id=...> ... </document>  (best first)
[question]  the user request
[reminder]  "Answer only from the documents; cite ids; reply in the JSON schema."

One source of truth for rules

Keep rules in one versioned file and render them into the prompt; duplicated rules drift apart.

त्वरित जाँच: Why add a short reminder near the question in long contexts?

  • It replaces the system prompt
  • It helps the model apply key constraints after reading a lot of content
  • It doubles the context window
  • It removes the need for evaluation
Answer

It helps the model apply key constraints after reading a lot of content — A brief restatement of the critical rules is cheap and often helps.