apprun.icuAI tools

Context drift · long chats

AI chat context drift heatmap: where your instructions got lost

Paste a long AI chat. It marks, turn by turn, where a checkable rule (such as a word limit) lapsed, where answers ballooned and where a figure changed. It runs in your browser and uploads nothing. Flags are rule-based, not a verdict on the model.

Private runs in your browserNo account nothing uploadedLimits 2,000,000 characters or 3,000 turns

Try it

Everything runs in this tab. The tool does not upload what you enter and stores nothing unless you export it.

Your chat

0 of 2,000,000 characters
Lines that start with a label such as "User:" or "Assistant:" mark each turn. Markdown headings, JSON and plain paragraphs also work. If the format is read wrongly, choose it under Settings.

Settings

Change the format, then press Analyze again.
The heatmap counts only the visible transcript. A real window also holds hidden system prompts, tool definitions and the model's own reply.

The middle band is a position marker, not a finding. Liu et al. (2023) found that a relevant passage placed in the middle of one long prompt was used less reliably than one at the start or end. That was a single prompt with document-QA and key-value tasks on 2023 models. It did not measure chat turns, so the band shows where a turn sits and does not predict a lapse.

How to use Context Drift Heatmap

  1. Paste the chat. Copy the whole conversation, or choose a .txt, .md or .json export. Labels such as User: and Assistant: mark the turns.
  2. Press Analyze. Check the format the tool detected. If it is wrong, choose the right one under Settings and analyze again.
  3. Read the heatmap and the ledger. Open a row to see that turn with its rules, checks and signals. Signals and phrase checks quote the text they matched; length and format checks show the measured count. The full turn is always shown.
  4. Export or copy the summary. Take the Markdown summary, the per-turn CSV or the JSON file. The tool saves nothing in your browser.

What the heatmap measures

Each row is one turn of the chat, numbered from the top. Shading is a visual aid; the number in each cell is the value. The six measured columns work like this.

  • Tokens (est.) is an estimate of a turn’s length in tokens, from a rule-based counter that runs in this tab. It is not the model’s tokenizer. Anthropic’s token-counting docs say that “the token count is an estimate” (token counting).
  • Window load is the running total of the visible transcript up to and including that turn, divided by the window size you chose. Hidden system prompts, tool definitions and the model’s own reply also occupy the window, so the real load can be higher. To see how a chat fills a window turn by turn, try the Context Window Visualizer.
  • Balloon compares an assistant answer with the median of the earlier answers. It shows ×N, and “high” at 2.5 times or more. The first three answers are compared with the median of all answers, because there is not enough history yet.
  • Lapses shows failed checks out of the checks that ran on that answer. Only rules that can be checked objectively are counted.
  • Contradictions counts signals a to d attached to that turn. Repeated answers (e) are counted under Repetition. The next section explains each signal.
  • Repetition shows the highest similarity (cosine on word profiles) found against an earlier answer. In long chats, very common words are skipped to keep the check fast. A value of 0.80 or more is marked as a loop.

The timeline above the table draws the window load after each turn, with lines at 25, 50, 75 and 100 percent of the window. Switch it to “This turn’s tokens” to see each turn’s own length instead. Click or press Enter on any row to open that turn, with its issued rules underlined and its failures and signals marked in the text.

How the instruction ledger works

The tool reads sentences in your messages and system prompts. A sentence counts as a rule when it matches one of the patterns below, or when it contains a standing cue such as “always”, “never”, “do not”, “only” or “must”, or starts with an imperative such as “Answer” or “Keep”. Questions, sentences longer than 45 words and sentences longer than 400 characters are skipped, so pasted documents do not turn into rules.

A rule stays active from its turn until a later rule of the same kind replaces it, or until a message tells the assistant to ignore, forget, drop or stop it. Every later answer then gets a pass, a fail or “not applicable” for each active rule that can be checked. Soft rules are listed without a score.

Rule typeExample sentenceHow the answer is checked
Word limit“Answer in under 80 words.”Counts words. “Under” and “below” are strict; “at most” and “no more than” include the number.
Minimum length“Write at least 150 words.”Counts words against the minimum.
Sentence, line or character limit“Keep it to one sentence.”Counts sentences, non-empty lines or characters.
No emoji“No emojis.”Finds any character with the Unicode Extended_Pictographic property. Some symbols such as © also have it.
No exclamation marks, no commas“No exclamation marks.”Looks for the character.
All lowercase or all capitals“Write all lowercase.”Looks for any capital letter, or any lowercase letter.
JSON only“Respond in JSON.”Removes a surrounding code fence, then parses the rest as JSON.
Reply language“Reply in French.”Heuristic. Counts common function words from a short list for each language. Shows “not applicable” when too few appear.
Opening or ending phrase“Start every reply with “Hi Ayse”.”Checks the start or end of the answer, ignoring case.
Forbidden or required phrase“Never use “synergy”.”Looks for the phrase on word boundaries, ignoring case.
Citation marker“Cite each fact as [1].”Checks that at least one [n] marker appears. It does not check that every fact is cited.
Bullets, numbered list, table“Use bullet points.”Counts bullet or numbered lines, or checks for a Markdown table.
Soft rule“Be friendly.”Listed as not machine-checkable. Never scored.

These checks are heuristics. The IFEval paper, which defines many of the same instruction types, says that “very few instructions are 100% verifiable objectively and automatically” (IFEval, arXiv 2311.07911, Section 1). A check can therefore fail on an edge case, such as Markdown wrapped around a phrase the reply must start with, and can pass an answer that breaks the spirit of a rule. Open the turn to see the reason for every verdict.

How the contradiction signals work

Signals are text patterns, and each one shows the sentences it compared. A signal is a reason to check, not proof. A changed number can also be a correction you asked for.

SignalWhat triggers itLimits
a. Same subject, different numberTwo assistant answers put different numbers or units next to the same subject words, for example “launch … 12 March” and “launch … 19 March”.The subject is the three words before a number, reduced to content words. Enumerations such as “Email 2” are ignored. Two different things with the same words can be flagged.
b. Possible polarity flipTwo sentences from different answers have a Jaccard similarity of 0.60 or more on their content terms (shared terms divided by all distinct terms), and one contains a negation the other lacks.Negation words include not, no, never, none, cannot, without and n’t. A sentence that negates a different clause can be flagged.
c. Self-correction markerAn answer contains “I apologise”, “you’re right”, “my mistake”, “correction:” or a similar phrase.A phrase match only. The answer may still be correct.
d. User asks againOne of your messages has a cosine similarity of 0.60 or more with an earlier message of yours.Suggests that a request did not stick, or that an earlier answer missed the question. You may simply have asked the same thing for a new reason.
e. Repeats an earlier answerAn answer has a cosine similarity of 0.80 or more with an earlier answer.Catches copy-paste repetition and loops. Long answers that quote a template can trigger it.

Signals appear in the Signals table with their evidence (the first 300 when there are more), and the turn detail marks the text each one quotes. The JSON file lists all of them. The tool sends nothing anywhere to compute them.

What the research says about long chats

The guide Context drift in long AI chats walks through the same sources in more depth. Several research results set the context for this page. Each one measured something narrower than the question “does my chat forget?”, so read them as background, not as a prediction for your chat.

  • Position inside one prompt. Liu et al. (2023), Lost in the Middle, report that performance “is often highest when relevant information occurs at the beginning or end of the input context”. They describe a “U-shaped performance curve” on multi-document question answering and key-value retrieval. The models were MPT-30B-Instruct, LongChat-13B (16K), GPT-3.5-Turbo and Claude-1.3. The task was one long prompt, not turns in a chat.
  • Drift across turns. Laban et al. (2025), LLMs Get Lost In Multi-Turn Conversation, simulated underspecified conversations with an LLM user simulator. They report an average drop of 39% across six generation tasks, and their figure caption gives 35% for the same comparison. They write that LLMs “often make assumptions in early turns and prematurely attempt to generate final solutions, on which they overly rely”. The authors also say that “the conversations we simulate are not representative of human-AI conversations.”
  • Context rot. Anthropic’s engineering post on context engineering says that “as the number of tokens in the context window increases, the model’s ability to accurately recall information from that context decreases” (effective context engineering). Chroma’s Context Rot report tested 18 LLMs and found that performance “consistently degrades with increasing input length” in its controlled tasks.
  • Checkable instructions. IFEval defines 25 instruction types that a program can verify, including word counts, keyword frequency, paragraph counts and JSON format. The ledger’s checks follow the same idea. The paper is not a measurement of any current model.

The middle band overlay uses the first result only as a position marker. A turn between 33% and 67% of the transcript sits where that single-prompt study placed a relevant passage that models used less well. The studies above do not test whether a middle turn in a chat lapses more often, so the overlay does not predict a lapse.

Laban et al. also tested repeating the constraints across turns, which they call the snowball setting. In two models and four tasks it recovered part of the loss, not all of it. Neither that study nor the others tested starting a fresh chat with a summary, so this page cannot say whether a restart helps. If you want to try a restart anyway, the guide on a handoff prompt for a long chat shows how to write the summary.

Limits and what it cannot tell you

  • It sees only the text you paste. Hidden system prompts, custom instructions, tool results and files the model read are invisible here. A rule may be followed through a channel this page cannot see.
  • It cannot tell a standing rule from a one-off request. “Write a haiku in under 20 words” is treated as a rule from that turn until something replaces it. Read the ledger with that in mind.
  • Token counts are estimates. The page does not run a vendor tokenizer. Use the model’s own counting tool before you budget cost or context. For a quick pre-send count, the LLM Token Counter is a separate tool. OpenAI’s token-counting guide lists “estimates like characters / 4 are inaccurate” among the limits of local estimates for images and files, and recommends its counting API.
  • Tone, accuracy and usefulness are not scored. Soft qualities are listed, never judged.
  • The language check is rough. It uses a short list of common words for each language.
  • Pattern matching misses paraphrases and finds coincidences. Two sentences that share words are compared; two that say the same thing in other words are not.
  • Size limits apply. The page reads up to 2,000,000 characters (about 2 MB of plain text) and 3,000 turns. Longer chats need to be split.

Privacy: what happens to your input

The chat is analysed in your browser tab with JavaScript. The tool's code does not send the text to a server, and no request it makes carries it. It writes nothing to localStorage, cookies or IndexedDB, so closing the tab discards the chat. The site-wide promo banner is separate and never receives your chat. The address bar holds only the settings (window size, format and overlay), and only after you change them. The share link copies those settings and never your text.

Downloads and the Markdown copy are made locally in the tab. If the chat holds personal details, remove them before you paste it; the LLM Context Passport is a separate tool for writing the personal context you choose to share. If you keep an export, remove personal details from the chat first: the JSON file contains every turn in full, and the CSV and Markdown contain excerpts.

Questions

Is my data uploaded?

No. The chat is read, split into turns and measured in this tab with JavaScript. The tool's code sends nothing to a server, writes nothing to browser storage, and makes no request that carries your text. The site-wide promo banner is separate and never receives your chat. The settings link holds only the window size, the format and the overlay setting, never your chat.

How accurate is this?

The token counts are estimates from a rule-based counter in this tab. The model's own tokenizer is the authority. Anthropic's token-counting docs say, "The token count is an estimate." A lapse means a text check failed on that answer; it does not prove the model misbehaved. A contradiction flag is one of five text patterns: a changed number for the same subject, a possible polarity flip between similar sentences, a self-correction phrase, a repeated question of yours, or a repeated answer. Each flag quotes the text that triggered it, so open the evidence before you act.

Is "lost in the middle" why my chat forgets rules?

Not necessarily. The 2023 study by Liu et al. measured where one relevant passage sat inside a single long prompt, and reported a U-shaped curve for the models it tested. It did not measure turns in a chat. Drift across turns is a different setting. Laban et al. studied it in simulated conversations and reported an average drop of 39% across six tasks; their figure caption gives 35% for the same comparison.

Does a long chat really make the AI forget?

Long chats give the model more text to read on every turn, and research on long inputs reports that performance falls as input grows. Chroma's controlled tests found degradation with input length, and Anthropic's docs call the effect context rot. Those tests are not your conversation, so this page shows how much text the model had to read and where your rules stopped being followed.

What does a lapse mean?

A lapse is the first answer after a rule was issued that fails that rule's check. Checks are objective: a word count, a forbidden phrase, a missing citation marker, or a JSON parse that fails. Soft rules such as "be friendly" are listed but never scored, because very few instructions can be verified objectively and automatically, as the IFEval paper notes.

Why is an answer marked as ballooned?

An answer is flagged when it is 2.5 times or more the median of the earlier answers in the chat. The first three answers are compared with the median of all answers. The number measures length against the chat's own history. A long answer is not wrong, but it adds text the model must read on every later turn.

Can it tell me which of two numbers is right?

No. It finds a subject, such as a launch date, that two assistant answers give different values, and it shows both sentences. It cannot know which value is correct. Check the figure against your source before you rely on it.

Will summarising and starting a new chat fix the drift?

This page cannot tell. The sources it relies on did not test restarting a chat with a summary. Laban et al. found that restating constraints inside a simulated conversation recovered only part of the loss. Anthropic describes compaction as replacing older turns with a summary, and warns that overly aggressive compaction can lose subtle but critical context.

Why does the share of the window look low or high?

The window size is a preset you choose, and the heatmap counts only the transcript you paste. A real request can also include hidden system prompts and tool definitions, which raise the load on the window. Some apps drop older turns, which lowers it. The count here is an estimate.