WRAITHERIX
Home / Blog
Test · 2026-12-04

Does a long prompt make an LLM answer worse? A test with 85k tokens

WRAITHERIX team
A glowing ribbon of text lines on a circuit board: the near lines are bright and sharp, the far ones dissolve into mist

People call it context rot: the longer the prompt, the worse the answer. Context windows are huge now, so it is tempting to paste everything in. We tested it with two small tasks on a live API and kept every result.

What we found:

The test

We generated a fake delivery log. Each line looks like this:

Order 1007: customer Anna, city Riga, amount 245 EUR, status returned, delivery code KB-0341.

Names, cities, amounts and statuses are random. We used logs of 60, 250, 1,000 and 3,000 lines, which is roughly 1.7k to 85k tokens. Requests went to https://ru.wraitherix.com with a test key, and costs come from the usage log.

Two questions:

  1. Find. One special record, order 7731, sits at the start, the middle or the end of the log. What is its delivery code?
  2. Count. How many orders have city Riga and status returned? We computed the true answer in plain code, so it is reliable.

Models: deepseek-v4-flash and gpt-5.4-mini. Each counting size got three different logs.

Finding one record: no misses

deepseek-v4-flash returned the right code in all 12 requests: four log sizes, three positions, up to 85k tokens. Position did not matter.

gpt-5.4-mini was right in every request on the 60 and 250 line logs. We drop its 1,000 and 3,000 line results: the usage field shows the same prompt size for both, so the model did not receive the whole log, and one reply said the order was not in the data. That run tells us nothing about context rot.

So for a single fact in a long text, a long prompt held up.

Counting: where it breaks

Same kind of log, different question. To answer, the model has to look at every line.

deepseek-v4-flash, three logs per size, two separate runs (the runs disagree):

Lines Tokens Correct, run 1 Correct, run 2
60 about 1.7k 3 of 3 not run
250 about 7k 3 of 3 2 of 3
1,000 about 28k 1 of 3 1 of 3
3,000 about 85k 0 of 3 0 of 3

The misses were not near misses. On a 3,000 line log whose true count was 69, the model said 299 in one run and 1 in the other. On another with a true count of 86 it said 1 and 491. On a 1,000 line log with a true count of 36 it once returned 1154.

Counting results at three log sizes: two of three correct at 250 lines, one of three at 1,000, none at 3,000

A 250 line log, about 7k tokens, already produced a wrong answer in one of three cases in run 2. A working agent session reaches that size quickly.

gpt-5.4-mini got 2 of 3 on the 250 line logs. We do not rate it on larger logs, for the reason above.

Does filtering the log first help?

We tried the obvious fix. From the 3,000 line log we kept only the lines with city Riga, about 270 lines and 7.7k tokens, and asked the same question.

It did not help. On three logs the answers were 190, 101 and 29, against true counts of 69, 75 and 86. So length is not the only cause. Counting across hundreds of lines is hard for the model even in a shorter prompt. Filtering cut the prompt about 11 times and left the task just as hard.

What to do

  1. Count with code. Anything you can count, filter, sort or sum with a script, do with a script. Every correct number in this test came from a few lines of Python, instantly and for free. Give the agent a tool rather than asking it to count in its head.
  2. Ask it to find, not to aggregate. Looking up a record, a quote or a paragraph worked in a long prompt. Questions like "how many", "which of these" or "cross-check everything" do not belong there.
  3. Split the job. If the model must do the aggregation, cut the data into small batches, get an answer per batch and add the results in code.
  4. Restart the conversation. A long agent session piles up history. When the task changes, open a clean chat and carry over a short summary.
  5. Spot-check. A wrong count looks as confident as a right one. Compare some answers with code.

What the test cost

One question on an 85k-token log with deepseek-v4-flash cost between $0.002 and $0.012 (some repeat requests were billed lower, and we did not look into why). A 1.7k-token log cost about $0.0003. The whole run, 57 requests, came to less than $0.32. Prices are in the catalog; we do not copy a table here because it changes.

A longer prompt costs more, and in our test counting got worse as it grew. Paying more for a worse answer is a bad deal.

How we tested

2026-12-04, macOS 27.2.1, Python 3.11. Requests to /v1/chat/completions on api.wraitherix.com. The log is generated by a script with random values, and the true counts are computed by the same script. We ran counting twice on deepseek-v4-flash and gpt-5.4-mini, and the find test once. Each counting size had three logs, so the sample is small: this shows the effect and is not a statistical study. Your numbers will differ. Costs come from the usage log in the account, tokens from the usage field of each response.

One key for 400+ models

Pay as you go, below list price.

Get a keyCatalog