An hour in, it contradicts a decision you made at the start.
“hour 3: it starts hallucinating imports” “compacting into a lie”
What is actually happening
Long sessions get compacted or truncated. What survives is a summary of the conversation, not the conversation, and the constraint you set early is often what the summary drops.
Everything below comes from published research, not from opinion. Each fix names the technique, states the effect its authors measured where one was reported, and links to the paper so you can check it. These were selected out of 6,235 techniques indexed from the literature.
4 fixes that hold up
01
Compact Context
Less Context, Better Agents: Efficient Context Engineering for Long-Horizon Tool-Using LLM Agents, arXiv:2606.10209 (2026)
A method for managing chat history by periodically creating compressed summaries of old messages. Every 10-15 exchanges, a snapshot of the history is created, then a new chat is opened with the summary and the last 4-6 messages. Eliminates 'context decay' — a situation where old messages create noise and reduce answer accuracy.
71% success with full history versus 91.6% with trimmed history, and this is with 2.7 times fewer tokens.checked against the paper
Use it whenApply during long working sessions with LLM (more than 10-15 messages), when the model begins to contradict itself, returns to rejected ideas, or loses focus. Particularly effective for multi-step tasks: concept development, solution alignment, iterative code or text refinement. Use when answer consistency and non-contradiction are important, and when you need to optimize token consumption and performance speed while preserving project context.
Prompt
## Шаг 1: Создание рабочего снэпшота
Проанализируй нашу предыдущую переписку и создай компактный снэпшот. Этот снэпшот будет использоваться для перезапуска диалога с моделью, чтобы избежать противоречий и "гниения контекста".
## ПРИНЯТЫЕ РЕШЕНИЯ
[Здесь перечисли кратко все ключевые решения, которые были окончательно согласованы в ходе предыдущего диалога. Например: "Отвергнута идея X", "Согласован формат Y", "Утвержден тон Z".]
## ТЕКУЩАЯ ЗАДАЧА
[Опиши, над чем мы работаем прямо сейчас, какой следующий шаг или какая проблема решается в данный момент. 1-2 предложения.]
## ОТКРЫТЫЕ ВОПРОСЫ
[Перечисли все вопросы, которые остались нерешенными, спорными моментами или требуют дальнейшего обсуждения.]
## ВАЖНЫЙ КОНТЕКСТ
[Укажи ключевые ограничения, принципы, договоренности или любую другую информацию, которая критически важна для понимания задачи и продолжения работы. Например: "Целевая аудитория — новички", "Бюджет ограничен", "Необходимо учитывать брендбук".]
**Максимум 150 слов.** Используй только конкретные факты, избегай "воды" и общих фраз.
---
## Шаг 2: Запуск нового чата с чистым контекстом
**Инструкция:** После получения снэпшота от модели, открой новый чат и вставь следующий шаблон, заполнив плейсхолдеры.
## Контекст предыдущей работы
{вставь_сюда_снэпшот_из_шага_1}
---
## Последние сообщения
{вставь_сюда_последние_4-6_обменов_из_старого_чата}
---
## Продолжаем
[Четко сформулируй следующую задачу или вопрос, который ты хочешь задать модели в этом новом, чистом контексте.]
Beyond the Final Prompt: Measuring the Effect of Within-Conversation Context on AI Answers, arXiv:2608.02556 (2026)
Research shows that 44.7% of AI responses change substantially without dialogue history. The last message is a state update, not a standalone request. Solution: a compressed summary of previous exchanges (goals, constraints, rejected options) up to 160 words before the last message reduces errors to 30.8%.
44.7% of AI answers change substantively if you remove the chat history before the last message—not the style, not the length, but the recommendation itself.checked against the paper
Use it whenApply this technique when working with long dialogues, when the user asks questions based on previous context. Especially critical for advisory chatbots, support systems, personal assistants, and RAG systems with multi-step requests. Use when you need to transfer dialogue to a new session or when the context window is limited. The technique prevents loss of important information (budget, constraints, rejected options) that affects the essence of the response. Compressed summary of history
Prompt
## Role
You are an AI assistant that helps users manage complex, multi-turn conversations with other AI models. Your goal is to ensure that the AI model you interact with retains the necessary context from previous turns to provide accurate and relevant responses.
## Context
The user is experiencing a recurring problem when working with ChatGPT: after an extended conversation (around an hour), the AI model contradicts decisions or constraints established at the beginning of the discussion. This indicates a loss of critical context, leading to suboptimal or incorrect outputs. The user needs a reusable prompt template to mitigate this issue.
## Problem Statement
When initiating a new chat session or when a long conversation loses context, AI models like ChatGPT can fail to recall crucial information such as budget constraints, previously rejected options, specific goals, or integration requirements discussed earlier. This leads to responses that are factually or functionally incorrect, despite sounding plausible.
## Technique: Dialogue Context Management (Summarization)
This technique addresses the problem by ensuring that essential context is explicitly provided to the AI model, even when the full conversation history is not feasible or desirable to re-input. It involves creating a concise summary of key dialogue elements.
## Prompt Template for Context Preservation
**Part 1: Context Summarization (To be generated by the user or a dedicated summarization prompt)**
*This section should be filled with a concise summary of the preceding conversation, focusing on critical elements. The user is instructed to create this summary before posing their follow-up question in a new chat or after a long, potentially context-losing turn.*
**Summary of Previous Conversation:**
* **Core Topic/Goal:** {Briefly state the main objective of the conversation, e.g., "Choosing a CRM system for a small business."}
* **Key Constraints/Requirements:**
* {List all critical constraints, e.g., "Budget: Up to 50,000 RUB/month."}
* {e.g., "Required Integration: Telegram."}
* {e.g., "Must be user-friendly for non-technical staff."}
* **Discussed Options & Decisions:**
* **Option A ({Name}):** {Status: e.g., "Rejected", "Considered", "Selected"} - {Reason for status, e.g., "Rejected due to complexity of implementation."}
* **Option B ({Name}):** {Status: e.g., "Rejected", "Considered", "Selected"} - {Reason for status, e.g., "Considered, but lacked required Telegram integration."}
* **Unresolved Points:** {List any points still open for discussion or decision, e.g., "Final decision on Option C pending."}
* **User's Role vs. AI's Role:** {Clarify who proposed what if important, e.g., "User rejected Bitrix24; AI suggested integration options."}
**Part 2: The Follow-Up Question**
*This section contains the user's actual question, preceded by the summarized context.*
**Context Summary:**
{Paste the generated summary from Part 1 here}
**My Question:**
{Insert the user's specific follow-up question here, e.g., "Based on this, which CRM should I choose?"}
---
**Instructions for Use:**
1. **Before starting a new chat** for a continuation of a long conversation, or **after a long turn** where context might be lost:
* Generate a concise summary of the critical elements of the previous discussion (goals, constraints, rejected options, decisions made). Aim for clarity and brevity (e.g., under 300 words).
* Use the template provided in **Part 1** to structure this summary. Be explicit about what was decided and why, and what remains open. Clearly differentiate user requirements from AI suggestions if necessary.
2. **Paste the generated summary** into the `Context Summary` section of **Part 2**.
3. **Paste your specific follow-up question** into the `My Question` section of **Part 2**.
4. **Submit the complete prompt** (Part 1 summary + Part 2 question) to the AI model.
**Example of a filled-in prompt:**
**Part 1: Context Summarization**
**Summary of Previous Conversation:**
* **Core Topic/Goal:** Choosing a CRM system for a small business.
* **Key Constraints/Requirements:**
* Budget: Up to 50,000 RUB/month.
* Required Integration: Telegram.
* Must be user-friendly for non-technical staff.
* **Discussed Options & Decisions:**
* **Option A (Bitrix24):** Rejected - Due to complexity of implementation.
* **Option B (AmoCRM):** Considered - Lacked direct Telegram integration.
* **Unresolved Points:** Final decision on Option C (Pipedrive) pending.
* **User's Role vs. AI's Role:** User rejected Bitrix24; AI suggested integration options.
**Part 2: The Follow-Up Question**
**Context Summary:**
* **Core Topic/Goal:** Choosing a CRM system for a small business.
* **Key Constraints/Requirements:**
* Budget: Up to 50,000 RUB/month.
* Required Integration: Telegram.
* Must be user-friendly for non-technical staff.
* **Discussed Options & Decisions:**
* **Option A (Bitrix24):** Rejected - Due to complexity of implementation.
* **Option B (AmoCRM):** Considered - Lacked direct Telegram integration.
* **Unresolved Points:** Final decision on Option C (Pipedrive) pending.
* **User's Role vs. AI's Role:** User rejected Bitrix24; AI suggested integration options.
**My Question:**
Based on this, which CRM should I choose: Pipedrive or another option that meets all criteria?
The Prompt Is Not the Query: How Request State Evolves Across Multi-Turn AI Conversations, arXiv:2607.22392 (2026)
Research shows that the last message in a dialogue contains only 35% of the unique words from the entire conversation. Half of the requirements, budgets, and rejected options remain in the history and are lost when copying the final phrase. To transfer context, you need to explicitly collect all constraints from the entire dialogue into a single summary.
The last message in a dialogue with an LLM contains only 35% of the unique words from the entire conversation.checked against the paper
Use it whenUse this understanding when transferring dialogue between chats, sharing context with colleagues, or testing prompts separately from the original conversation. Critical when working with multi-step dialogues where requirements accumulate gradually — product selection, project planning, technical specifications. Especially important for dialogues longer than 5 messages, where the final message contains less than 20% of all information. Apply before exporting dialogue to documentation, when creating prompt templates from live conversations, or when
Prompt
As an AI assistant, you are part of a multi-turn conversation with a user who is trying to fix a recurring problem with ChatGPT: an hour into a session, the AI contradicts a decision made at the start.
Your goal is to produce a reusable prompt that the user can paste to prevent this issue. This prompt should encapsulate the core problem and request a solution that addresses the contradiction by maintaining consistent context throughout the conversation.
**Key Problem:**
The user experiences a loss of context or contradiction from the AI in longer ChatGPT sessions. Decisions or constraints established early in the conversation are seemingly forgotten or ignored later on.
**Core Insight from Research (The Prompt Is Not the Query):**
The final message in a dialogue contains only a fraction (approx. 35%) of the unique words and context from the entire conversation. Crucial details like budgets, rejected options, and specific criteria often remain in earlier messages and are not repeated in the final prompt. This leads to the AI responding "in a vacuum" when the final message is copied or used in a new chat.
**Your Task:**
Create a prompt that, when given to the AI at the *beginning* of a new session or when the user *anticipates* context drift, will instruct the AI to actively manage and retain the full conversational context. The prompt should guide the AI to:
1. Acknowledge and store all explicit requirements, constraints, and decisions made throughout the conversation.
2. Explicitly remember and refer back to previously established context, especially when new information or requests are introduced.
3. Avoid contradicting earlier decisions or requirements.
4. If a contradiction is about to occur, flag it and ask for clarification or re-affirm the original decision.
**Output Requirements:**
- The prompt should be framed as instructions to the AI for managing the current conversation.
- It should be clear, actionable, and reusable.
- It should incorporate the principle that the "prompt is not the whole query" by emphasizing the need to maintain the *entirety* of the conversational state.
- Use Markdown formatting for clarity.
**Example of the problem the prompt aims to solve:**
User: "I need a Python script to scrape data from website X. The budget is $500, and it must run on Linux. Please provide the initial structure."
AI: [Provides initial structure]
User: "Now, add a feature to handle CAPTCHAs."
AI: "Handling CAPTCHAs can be complex and might exceed your budget. For a simpler approach, consider a tool that works on Windows..."
*(The AI forgot the Linux requirement and potentially the budget, or is re-evaluating it without acknowledging the prior constraint.)*
**Your Generated Prompt:**
Facts as First Class Objects: Knowledge Objects for Persistent LLM Memory, arXiv:2603.17781 (2026)
Method for combating loss of critical information when summarizing long dialogues. Key facts and constraints are stored outside chat history in structured "subject | predicate | object" format and inserted anew in each session, avoiding degradation from context compression.
60% of specific facts disappear at the first compression of chat history.checked against the paper
Use it whenApply this technique in long dialogue sessions with LLM where preservation of specific facts, project constraints, and requirements is critically important. Especially relevant for product chatbots, technical assistants, and RAG systems where loss of key information during history summarization can lead to requirement violations or production errors. Use the Knowledge Objects method when you notice the model "forgets" important details after several rounds of context compression, or when working with
Prompt
# Role
You are an AI assistant designed to combat "Context Rot" by maintaining critical information and constraints throughout long, iterative sessions.
# Problem Statement
In extended interactions with LLMs, summarization processes can silently discard crucial facts and project constraints. This leads to the LLM working with incomplete or inaccurate information, potentially causing project failure.
# Technique: Knowledge Objects for Context Preservation
The "Knowledge Objects" method addresses Context Rot by storing critical constraints and facts in a structured, external document. This document is re-inserted into the prompt for each new session, ensuring the LLM always has access to the precise, foundational information, independent of chat history compression.
# Goal
To create a reusable prompt structure that ensures critical project constraints are always available to the LLM, preventing degradation of information over time.
# Knowledge Object Structure (Subject | Predicate | Object)
This section will contain the core, immutable facts and constraints of your project. It will be updated and re-inserted into the prompt for every new session.
**Example Structure:**
* **Project Name** | **is** | "AI-Powered Customer Support Bot"
* **Primary Goal** | **is** | "Reduce average response time by 30%"
* **Key Constraint** | **is** | "Must integrate with existing CRM API (Salesforce)"
* **Data Privacy Rule** | **is** | "No Personally Identifiable Information (PII) stored longer than 24 hours"
* **Target Audience** | **is** | "Small to medium-sized e-commerce businesses"
* **Budget Limit** | **is** | "$50,000"
* **Mandatory Feature** | **is** | "Sentiment analysis of customer queries"
* **Exclusionary Feature** | **is** | "Direct payment processing"
---
# Session Instructions
You are an AI assistant working on a project. You will receive a set of "Knowledge Objects" at the beginning of each session. These objects represent the core facts and constraints of the project.
**Your primary directive is to ensure ALL your outputs and decisions strictly adhere to these Knowledge Objects.**
Before responding to any user query or performing any task, mentally (or explicitly, if requested) verify that your proposed action or response aligns with every Knowledge Object provided.
If a user's request or a previous part of the conversation seems to contradict a Knowledge Object, you MUST:
1. Identify the conflicting Knowledge Object.
2. State the conflict clearly.
3. Explain why the request cannot be fulfilled as stated, referencing the specific Knowledge Object.
4. Propose an alternative that *does* align with the Knowledge Object, or ask for clarification on how to proceed.
**Do NOT assume prior context from chat history if it conflicts with the provided Knowledge Objects.** The Knowledge Objects are the single source of truth.
# Task for this Session
[Clearly state the specific task for the current session here. For example: "Analyze the user feedback from the last week and suggest improvements to the bot's response accuracy, ensuring all suggestions align with the provided Knowledge Objects."]
---
**Begin Session.**
Repeating the instruction louder. Capitals, "IMPORTANT", and three exclamation marks change nothing structural. The rule still sits in the same place, competing with the same context.
Politeness and threats. Both have been measured repeatedly across 2025 and 2026 and come out indistinguishable from noise.
Turning the temperature to zero. It reduces variation, not misunderstanding. If your request has two valid readings, you now get the wrong one reliably.
Get this fixed for your actual task
The four prompts above are written for the average case. Paste what you are actually
trying to do and the corpus will be matched against it directly. Free, no account,
about ten seconds.
Free · no signup · ~10s
0.00match confidence single retrieval pass
Prompt for your task
That number is low on purpose, and it is real. It is the raw similarity
of one retrieval pass. No specialist read the paper, no judge compared anything against
anything, and the first plausible match won. It is the honest score of a ten-second answer.
61techniques in the corpus address this exact symptom
You have seen 4 of them on this page and one more just now. Deciding which of the
remaining 61 actually fits your case is the work, and it is the work GetDecision does.
This page
4 techniques for the average case, generic prompts
What you just ran
one technique matched to your wording, nothing verified
Full run
ten specialists read the papers in full, a judge ranks the top three for your task and shows its reasoning, generation on the model you pick, saved to your history
See the top three for your taskTen specialists read the full papers, a judge ranks them and shows its reasoning. Free account, first run included.
Why does ChatGPT stop following instructions I already gave?
Long sessions get compacted or truncated. What survives is a summary of the conversation, not the conversation, and the constraint you set early is often what the summary drops.
Does lowering the temperature fix this?
It reduces variation, not misreading. If the request admits more than one valid interpretation, a colder model just picks the same wrong one more consistently.
Do these techniques work on reasoning models?
Some do and some do not. Each fix below carries the effect its authors measured and a link to the paper, so you can check what it was measured on.