When an LLM Context Window Dropped Instructions: Why Your App Trimmed Its Own Rules

The answer looked like a model failure. The request builder caused it.

A user pastes a long document into an AI product and asks for an analysis. The reply engages with the document, but ignores the product's required output format and crosses a boundary the product is meant to enforce.

When an LLM context window dropped instructions in this manner, the team first checks the instructions in the codebase. They are still there. Short requests return the expected format. At first, it looks as though the prompt was too long and the model ignored rules that were clearly delivered.

In this composite case, that was not what happened.

The application built a request that was too large for its configured limit, then silently trimmed content before sending it to the provider. The model received plenty of the user's document, but not the product rules that governed the answer. This is a common context length failure in an LLM application, where the system prompt is cut off in production before the model even runs.

The important question was not, "Are the rules in the prompt file?" It was, "Did the final request sent to the provider still contain them?"

How to diagnose if an LLM context window dropped instructions

To diagnose whether your LLM context window dropped instructions or the model failed to follow them:

  1. Capture the exact payload leaving your request builder before it hits the API.
  2. Measure the token count of system instructions, conversation history, and user input separately.
  3. Verify whether automated string truncation removed the earliest tokens in the prompt.
  4. Check if the response matches an unconstrained model default rather than your structured template.

The team reproduces the failure

The team sends two inputs through the same product path:

  • A short document
  • A document long enough to put pressure on the request limit

The prompt text and model settings remain unchanged.

The short document produces the required format. The long document produces an answer that addresses the content but misses the expected format and boundaries. The difference points to request size. No prompt change explains it, and the user supplied the document directly, so a failed document lookup is not the cause.

That narrows the investigation, but it does not prove that instructions disappeared. When a prompt is too long and a model appears to have ignored rules, an oversized request can actually fail in three distinct ways: