TL;DR
ERGO is a technique that tracks the model's internal uncertainty and automatically restarts the conversation when the model starts "getting lost." The system computes Shannon entropy (a measure of chaos in token predictions) on every turn. When entropy spikes — a sign the model is confused — ERGO consolidates the whole conversation into one clear prompt and starts a fresh chat.
The key finding: In multi-turn conversations, models lose up to 39% of their performance. The cause is accumulated noise: the model gets tangled in a long history, forgets early details, mixes up contexts. Entropy (the spread of probabilities for the next token) rises when the model isn't sure of its answer. A sharp entropy spike is the moment the model "got lost".
The essence of the method: Don't try to improve every answer — detect the moment of degradation and hit reset. Three steps: (1) the model rewrites the user's entire history into one optimized prompt, removing duplicates and outdated versions, (2) that prompt goes into a new chat with no memory of the past, (3) the conversation continues with a clean slate but full context.
Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.
Method Blueprint
Automatic mode (requires an API):
STEP 0: After each model response → compute the average entropy (ΔH)
STEP 1: If ΔH > threshold → RESET:
1.1: Take the user's entire history
1.2: Ask the model to rewrite it as a single prompt
1.3: Create a new chat with that prompt
1.4: Continue the conversationManual mode (works in a regular chat):
When you sense the model is "spacing out" → consolidate the context manuallyExample in Practice
Task: You're writing a long-form blog post about neural networks. You give the model tasks step by step:
- Draft an outline for the article
- Write a hooky intro about the AI hype
- Main section: how transformers work
- Add a section on AI ethics
- A sidebar with a real-world small-business example
- Conclusion: what's next for neural networks
- Pick an SEO title and meta description
By steps 5-6 the model may forget the tone of the intro (lively, provocative) and start writing in dry academic language. Or it may lose the "for business" focus and wander off into technical depths.
Manual reset — the prompt:
Here is our entire conversation:
[paste the full conversation history]
I can see you've started losing the thread. Let's restart:
Rewrite all the information as one clear prompt for a new chat. Keep all the key requirements:
- The article structure (6-section outline)
- Tone and style (lively, provocative, for business readers)
- Finished parts (intro, main section)
- Remaining tasks (ethics, example, conclusion, SEO)
Remove:
- Repetition and duplication
- Intermediate clarifications
- Outdated versions of the text
Give me a ready-to-use prompt I can paste into a new chat.Result:
The model analyzes the whole conversation and outputs a structured prompt — like a brief with context. It will include the final version of the outline, the finished parts of the text, clear tone requirements and the remaining tasks. You copy that prompt → open a new chat → paste it → the model carries on with a clear head but full context.
Why It Works
The LLM weakness: In long conversations, models lose focus. Not because they "forget" (the context is in the window), but because ambiguity piles up. Early requirements conflict with later ones, intermediate edits create contradictions, and the model's attention gets smeared across the entire history. Entropy rises — the model isn't sure what actually matters right now.
The LLM strength: Models are excellent at structuring and compressing information. They can take a chaotic conversation and pull out the essence — drop duplicates, resolve contradictions, keep only what's current. This isn't "forgetting," it's smart filtering.
How the method leverages the strength: Instead of trying to make the model remember everything → periodically consolidate the context. Entropy is a confusion barometer. When it spikes → time for a reset. The model rewrites the history as one clear prompt and the conversation starts over — but with an optimized context instead of a chaotic one.
Control levers (for automatic mode via API):
- Entropy threshold (τ): Higher → fewer resets (saves tokens), lower → more resets (more stability)
- What to consolidate: User turns only, or user + assistant (the original uses user turns only)
- Check frequency: Every turn or once every N turns
Prompt Template
For a manual reset when you sense the model has "gotten lost":
Here is our entire conversation:
{conversation_history}
Rewrite all the information as one clear prompt for a new chat. Keep all the important details and requirements, but remove:
- Repetition and duplication
- Outdated versions (if there were edits)
- Intermediate clarifications and questions
- Context that's no longer relevant
{optional_specific_requirements}
Give me a ready-to-use prompt I can paste into a new chat to continue the work.What to fill in:
{conversation_history}— copy the whole conversation (or the last 10-15 messages if it's very long){optional_specific_requirements}— anything critical that must not be lost: "Be sure to keep: the article's tone (provocative), the target audience (B2B managers), the format (2,000 words)"
🚀 Quick start — paste into the chat:
Here is a template for consolidating context when a conversation has gotten chaotic. Adapt it to my task: [your task]. Ask me questions to fill in the fields.
[paste the template above]The LLM will ask which part of the conversation to consolidate, what's critical to keep, and what format to use for the final prompt. It will take the pattern from the template and fit it to your situation.
Limitations
⚠️ Automation requires an API: Full automation (computing entropy, automatically detecting when to reset) requires access to logprobs via an API. In a regular chat you reset manually when you sense the model is "spacing out."
⚠️ Risk of losing details: Consolidation is compression. The model may throw out something it considers unimportant but that mattered to you. This is especially risky for tasks where every nuance counts (legal documents, technical specs).
⚠️ Not for short tasks: If the conversation is 2-3 turns long, a reset is overkill. The method pays off once confusion has built up (5+ turns with changes and clarifications).
⚠️ The recognition barrier: In manual mode you need to sense the right moment to reset. Too early and you lose the benefits of an iterative conversation; too late and critical confusion has already set in.
How It Was Tested
The team took 5 models (Phi-4, LLaMA 3.1-8B, GPT-4o, GPT-4.1, GPT-4o-mini) and 5 tasks: code writing, SQL queries, API calls, data-to-text and math problems. Each task was split into "shards" — chunks of the instruction. In single-turn mode all shards were given at once as a list; in multi-turn mode, one per turn.
Three modes were compared:
- FULL (single-turn, all instructions at once) — the upper bound
- SHARDED (multi-turn, standard) — the baseline multi-turn setup
- ERGO (multi-turn with automatic resets)
They measured:
- Average Performance — mean accuracy
- Aptitude (90th percentile) — peak ability in the best attempts
- Unreliability (the gap between the 90th and 10th percentiles) — stability
The key insight: Performance in SHARDED mode dropped by 39% vs FULL. But ERGO didn't just recover to single-turn level — it often beat it! That's because the model got to reason step by step (the multi-turn advantage) but without accumulating noise (thanks to the resets).
The entropy threshold was calibrated on a separate GSM8K sample for each model. For GPT-4.1 (90% aptitude on GSM8K) they used the 90th percentile of entropy growth as the threshold. The logic: only the most atypical spikes (statistically linked to failure) should trigger a reset.
The surprise: Different models made different numbers of resets at the same threshold percentile. GPT-4.1 averaged ~38 shards between resets (a confident model), Phi-4 only ~7 shards (a model that gets confused more often). The system is adaptive: more confusion → more resets, automatically.
Adaptations and Extrapolations
💡 Adaptation: A preventive reset instead of a reactive one
Instead of waiting for signs of confusion, do a scheduled reset. For example, every 10 messages in a complex project conversation. Less risk of missing the moment of degradation, but more unnecessary consolidations.
Example:
Every 10 turns of the conversation (or when you sense confusion building up):
Stop. Let's make a checkpoint.
Here are our last 10 messages:
[history]
Consolidate them into a brief summary of key decisions and current status. Format:
- What we decided
- What's done
- What's next
- Open questions
Give me the summary so I can start a new chat with a clean context.🔧 Technique: Partial reset → selective consolidation
Instead of a full rewrite, keep only the facts and throw out the reasoning.
The change:
In the template, replace:
Rewrite all the information as one clear promptWith:
Extract only the key FACTS and DECISIONS from the conversation.
Remove all reasoning, explanations and intermediate options.
Output a compressed list in this format:
- Fact 1
- Fact 2
- Decision 1
- Decision 2Effect: Even more aggressive compression → fewer tokens, but a higher risk of losing nuance. Use it for tasks where the result matters, not the process.
💡 Adaptation for project management
A long project conversation → periodic "status reports" instead of full consolidation.
Example:
We've been discussing the product launch for 20+ messages now.
Put together a brief project status report based on the whole discussion:
## Project: [name]
**Decided:**
- [key decisions]
**In progress:**
- [current tasks]
**Blockers:**
- [problems and risks]
**Next steps:**
- [what to do next]
Format: markdown, max 200 words. I'll paste this report into a new chat and we'll continue.Effect: A structured snapshot of the current state → an easy restart without losing context. Works well for long project discussions (launch planning, strategy, roadmap).
Resources
ERGO: Entropy-guided Resetting for Generation Optimization in Multi-turn Language Models — a study by Algoverse AI Research (2025)
Haziq Mohammad Khalid, Athikash Jeyaganthan, Timothy Do, Yicheng Fu, Sean O'Brien, Vasu Sharma, Kevin Zhu