LLM Learning Path
Home Path Medium

Hard constraints on long context

Edit only part of a long text; keep facts and citations.

Scenario

You have a long document and need help revising without breaking other parts or losing numbers/citations.

Requirements

Write a prompt that includes:

  1. Scope: exactly what may change vs must stay (by section id, markers, or quoted spans).
  2. Fact rules: how to treat numbers, names, citation tags.
  3. Output shape: e.g., “return only section 3” or “return a bullet diff list.”
  4. If ambiguous: ask clarifying questions instead of guessing.

Check

Could someone follow your prompt without collateral edits?

Further reading