AI Engineer · Published 2026-08-17

Context Engineering in 2026 — Louis-François Bouchard, Omar Solano & Samridhi Vaid, Towards AI

Open on YouTube ↗

Summary

Overview

  • Speaker: Louis-François Bouchard, Omar Solano, Samridhi Vaid
  • Channel: AI Engineer
  • Main topic: Context engineering for long agent sessions, including compaction, memory, retrieval, skills, and prompt caching.
  • Purpose: To provide AI engineers with production-tested playbooks, architectural patterns, and empirical benchmark results for managing agent context windows efficiently in 2026. A comprehensive 2026 playbook on context engineering presented by Louis-François Bouchard, Omar Solano, and Samridhi Vaid from Towards AI. The presentation covers challenges in long agent sessions such as context rot, finite context windows, stateless models, and token cost escalation. It explores compaction techniques (trimming, sliding windows, tool-result clearing, summarization, delta summarization), offloading methods (RAG, GraphRAG, offloading to files/memory), and the dramatic impact of prompt caching. Through extensive evaluation on an open-source AI tutor case study across Gemini and DeepSeek models, the speakers share empirical results on cost, latency, recall accuracy, and best practices for production AI engineering.

Topic Map

The Problem with Long Agent Sessions

  • Explanation: In long agent sessions, models often fail or do the exact opposite of what is desired. This is typically not because the model gets dumber, but because the context fills up and degrades in quality, leading to context rot.
  • Key claims:
    • Long agent sessions suffer from context rot as the window fills up.
    • Model results get worse over time due to context pollution.
    • Finite context windows mean instructions, retrieved lessons, tool use, and code all compete for one attention budget.
  • Examples:
    • An agent told 'NEVER push directly to main' eventually executing 'git push origin main' after 45 turns of logs and diffs.
  • Terminology:
    • context rot
    • lost in the middle
    • stateless model
  • Why it matters: Understanding context rot is foundational to preventing agents from failing during extended, multi-turn interactions.

Context Management vs. Memory

  • Explanation: The finite context window and stateless nature of LLMs create two distinct problems to solve: context management within a single session and memory across multiple sessions.
  • Key claims:
    • Models are stateless, meaning every call starts from zero between sessions.
    • Context management handles within-session token allocation, while memory handles cross-session persistence.
  • Examples:
    • Reopening an AI tutor without background state causes the model to have no idea what occurred previously.
  • Terminology:
    • context management
    • memory
    • stateless
  • Why it matters: Differentiating single-session context from cross-session memory dictates how engineers design agent architectures.

Compaction Techniques: Trivial Tools to LM-Based

  • Explanation: Compaction aims to keep the smallest possible context while retaining enough information to answer user questions. Methods range from non-LM rule-based pruning to language-model-driven summarization and reset.
  • Key claims:
    • Compaction keeps what still matters and drops or relocates the rest.
    • Trivial tools like observation truncation, sliding windows, and tool-result clearing require no LLM call.
    • LM-based techniques include selective retention, summarization, delta summarization, and compaction with reset.
  • Examples:
    • Truncating a 300-line stack trace to keep only head and tail before it enters chat history.
    • Claude Code's compaction reset approach where the entire history is collapsed into a fresh summary.
  • Terminology:
    • compaction
    • observation truncation
    • sliding window
    • tool-result clearing
    • delta summarization
  • Why it matters: Effective compaction reduces token costs and latency without sacrificing output quality.

Offloading and Retrieval Strategies

  • Explanation: Moving tokens out of the active context window into files, memory, or RAG databases keeps prompts lean while maintaining access to a vast knowledge base.
  • Key claims:
    • Offloading persists details to disk or memory and keeps a lightweight pointer in context.
    • Karpathy's LLM wiki approach uses a file-based knowledge base that agents maintain and re-read.
    • Hybrid search (dense embeddings plus BM25 keyword search followed by reranking) outperforms pure semantic search.
  • Examples:
    • Using index.md as a map pointing to granular chunk files for the AI tutor corpus.
  • Terminology:
    • offloading
    • RAG
    • GraphRAG
    • hybrid search
    • reranking
    • LLM wiki
  • Why it matters: Offloading allows agents to leverage millions of tokens of reference material without bloating active context.

Prompt Caching and Economics

  • Explanation: Prompt caching is a game-changer that makes cached prefix tokens up to 50x cheaper. However, summarization and rewriting prefixes can break the cache and force full-price recomputation.
  • Key claims:
    • Prompt caching makes cached prefix tokens significantly cheaper (up to 50x on DeepSeek).
    • Rewriting or summarizing the prefix breaks the cache, forcing full-price recomputation.
    • Compaction must achieve greater than 50x compression to be worth breaking cache hits.
  • Examples:
    • Comparing Gemini 3.5 Flash and DeepSeek V4 Flash caching behaviors and cost impact.
  • Terminology:
    • prompt caching
    • cache hit
    • cache miss
    • TTFT
  • Why it matters: Prompt caching inverts traditional compaction math; keeping everything and letting the cache handle it is often cheaper and higher quality.

Evaluation Harness and Empirical Results

  • Explanation: An automated evaluation harness (run -> grade -> gate -> report) tested 11 presets across single-turn and multi-turn student tasks using real-world AI tutor interactions.
  • Key claims:
    • Keeping everything in context won session memory recall tests at 92% vs 38% for compaction methods.
    • Compaction often hurts quality and increases tool calls because agents must re-retrieve discarded information.
    • DeepSeek V4 Flash with caching achieved significantly lower costs per turn while maintaining high recall.
  • Examples:
    • Testing 5905 runs across the Gemini study evaluating single-turn and session tasks.
  • Terminology:
    • eval harness
    • memory recall
    • hit rate
    • MRR
    • preset
  • Why it matters: Empirical testing proves that conventional wisdom regarding aggressive context compaction can be counterproductive under modern prompt caching.

Key Points

Context rot degrades agent performance

  • Explanation: As conversation history and tool outputs accumulate, models suffer from attention dilution and lose track of core instructions.
  • Evidence: Agent logs showing failure to follow negative constraints ('NEVER push to main') after 45 turns.
  • Practical implication: Engineers must actively manage context length or scope within agent loops.

Prompt caching inverts compaction economics

  • Explanation: When cloud providers cache system prompts and conversation history, re-sending tokens is extremely cheap.
  • Evidence: Cached tokens priced up to 50x cheaper on APIs like DeepSeek.
  • Practical implication: Aggressive summarization that breaks cache hits can increase costs and latency instead of reducing them.

Keeping everything wins on memory recall

  • Explanation: Across multi-turn evaluation tasks, retaining full conversation history achieved 92% memory recall compared to 38% for summarized compaction methods.
  • Evidence: Evaluation benchmark charts comparing full history against compaction presets.
  • Practical implication: Do not compact by default; weigh quality, cost, and latency constraints before modifying context.

Hybrid search is essential for local RAG scaling

  • Explanation: Dense embeddings alone collapse at scale when facts are buried, whereas hybrid search combining dense and keyword matching maintains 100% recall.
  • Evidence: Search benchmark showing dense-only recall dropping to 0% at 400k tokens while keyword/BM25 combined with dense held 100%.
  • Practical implication: Implement hybrid search pipelines for large knowledge corpora.

Frameworks, Models & Processes

Context Engineering Architecture

  • How it works: Deciding what the model sees on every single API call by managing system prompts, tool definitions, chat history, tool outputs, and retrieved knowledge chunks.
  • Components:
    • System prompt
    • Tool definitions
    • Chat history
    • Tool outputs
    • Retrieved chunks & memory
  • When to use: When building production LLM agents and multi-turn chatbots.

Evaluation Harness Pipeline

  • How it works: An automated testing framework that runs agent tasks, grades outputs using code checks and LLM judges, gates results based on criteria, and generates telemetry reports.
  • Components:
    • run_battery
    • grade
    • check_triggers
    • report
  • When to use: When optimizing agent prompts, memory systems, and retrieval pipelines offline.

Examples & Case Studies

An agent ignores the rule 'NEVER push directly to main' after 45 turns of conversational noise.

  • Illustrates: Context rot in long agent sessions where critical instructions are diluted.
  • Lesson: Context windows need active curation or isolation to maintain instruction adherence.

Testing an AI tutor with 8.2M token corpus across 14 sources using hybrid search versus dense-only search.

  • Illustrates: Scaling limitations of pure semantic search in large document corpora.
  • Lesson: Combine dense retrieval with keyword search (BM25) and reranking for robust grounding.

Actionable Takeaways

  • Immediate:
    • Implement observation truncation for large tool outputs like stack traces.
    • Explore prompt caching options provided by your model API to slash input costs.
    • Log all token usage, latency, and cache hit rates using telemetry tools like LangSmith or Opik.
  • Strategic:
    • Avoid aggressive compaction by default; evaluate whether prompt caching makes keeping full history cheaper and more accurate.
    • Use hybrid search (dense + keyword + rerank) for grounding agents in large knowledge bases.
    • Build a rigorous evaluation harness before making architectural changes to agent context.
  • Questions to investigate:
    • How does prompt caching pricing evolve across different frontier and local models?
    • What is the exact threshold where compaction savings outweigh cache break penalties?
    • How can local SLMs with 32k context windows effectively handle complex multi-turn student interactions?

Claims Worth Verifying

  • Cached prefix tokens can be up to 50x cheaper on certain APIs like DeepSeek. (pricing and hardware performance)
  • Retaining full conversation history achieved 92% memory recall versus 38% for summarized compaction in multi-turn tests. (benchmark result)
  • Dense-only retrieval recall collapses to 0% at 400k tokens for buried facts, while keyword/BM25 hybrid maintains 100%. (technical benchmark)

Notable Quotes

"The model didn't get dumber. Its context did." "If I had to choose just one metric, I'd argue that the KV-cache hit rate is the single most important metric for a production-stage AI agent."

Compressed Summary

  • Long agent sessions suffer from context rot and token cost explosion.
  • Prompt caching inverts compaction math, making full-history retention cheaper and more accurate.
  • Hybrid search (dense + keyword + rerank) is required for reliable document retrieval at scale.
  • Rigorous offline eval harnesses are essential for testing agent context strategies.
  • Keywords: context engineering, prompt caching, compaction, retrieval, memory
  • Core insight: Under modern prompt caching, keeping full context history often outperforms summarization in both memory recall and cost efficiency.

Core insights

6
Tradeoffhigh noveltystrong evidence

Prompt caching inverts the economics of context compaction: because cached prefix tokens are up to 50x cheaper, keeping the full conversation in context is often both cheaper and higher quality than aggressive compaction, since any rewrite or summarization of the prefix breaks the cache and forces full-price recomputation.

Why it matters

Engineers who reflexively compact context to save tokens may be paying more and losing session memory; the default should shift to cache-friendly full-context unless compression exceeds ~50x or context grows beyond practical limits.

Generalization

In any pay-per-token LLM system with prefix caching, the cost equation favors stable prefixes over rewriting; context strategy should be chosen with cache shape in mind.

Prompt caching makes cached prefix tokens significantly cheaper (up to 50x on DeepSeek).
Open source video
Compaction must achieve greater than 50x compression to be worth breaking cache hits.
Open source video
Keeping everything in context won session memory recall tests at 92% vs 38% for compaction methods.
Open source video
Failure Modemedium noveltystrong evidence

Long agent sessions fail due to context rot: performance degrades not because the model gets dumber, but because the finite attention budget is diluted as instructions, logs, tool outputs, and code compete for the same window, eventually overriding explicit negative instructions.

Why it matters

Provides a mechanism for agent reliability degradation over sessions and justifies active context management rather than trusting the model to ignore irrelevant history.

Generalization

Any stateful agent with a finite context and unfiltered history is vulnerable; instruction adherence should be monitored as context grows.

An agent told 'NEVER push directly to main' eventually executing 'git push origin main' after 45 turns of logs and diffs.
Open source video
Mental Modelmedium noveltystrong evidence

Architecturally, context management (within-session token allocation) and memory (cross-session persistence) are distinct problems that should be solved separately; conflating them leads to agents that either keep everything across sessions or lose within-session state.

Why it matters

Determines module boundaries: session-scoped context management (compaction, caching) vs persistent memory interfaces (files, RAG, wiki).

Generalization

Applies to any agent with long-lived interactions.

Context management handles within-session token allocation, while memory handles cross-session persistence.
Open source video
Mechanismmedium noveltymoderate evidence

Compaction is a spectrum with escalating cost: trivial non-LLM methods (observation truncation, sliding windows, tool-result clearing) should be applied first because they require no model call and don't risk cache-breaking; model-based summarization should be reserved for cases where simple pruning loses too much information.

Why it matters

Gives engineers a tiered playbook; most agent loops can reduce token load cheaply before considering expensive summarization.

Generalization

In any context-window-constrained loop, apply deterministic pruning before generative compression.

Trivial tools like observation truncation, sliding windows, and tool-result clearing require no LLM call.
Open source video
Practicemedium noveltymoderate evidence

Offloading knowledge to agent-maintained external stores (e.g., a file-based LLM wiki with an index.md map) plus hybrid retrieval (dense embeddings + BM25 + reranking) outperforms pure semantic search and keeps the active context lean.

Why it matters

Scales agents beyond the context window while preserving answer quality; hybrid search is the retrieval pattern that makes offloading reliable.

Generalization

For any agent needing access to large corpora, combine file/database pointers with hybrid search rather than dumping embeddings-only vectors.

Hybrid search (dense embeddings plus BM25 keyword search followed by reranking) outperforms pure semantic search.
Open source video
Karpathy's LLM wiki approach uses a file-based knowledge base that agents maintain and re-read.
Open source video
Empirical Resultmedium noveltystrong evidence

Context engineering choices need automated multi-turn evaluation: the run->grade->gate->report harness with ~5,905 runs exposed that compaction degrades session memory and increases tool calls, validating the counterintuitive 'keep everything' result.

Why it matters

Without a multi-turn eval gate, teams will adopt compaction based on intuition and degrade real user sessions; evaluation harnesses are a prerequisite for context strategy decisions.

Generalization

Any context/memory strategy change should be gated by a reproducible multi-turn eval harness, not single-turn benchmarks.

Testing 5905 runs across the Gemini study evaluating single-turn and session tasks.
Open source video
Compaction often hurts quality and increases tool calls because agents must re-retrieve discarded information.
Open source video

Deep dives

4

Prompt Caching vs Compaction: The 50x Break-Even Point

Research question

At what cache discount and context-growth rate does keeping full history become strictly more cost-effective than any compaction strategy, and how does this threshold vary by model and task?

Why

Engineers routinely compact context to save tokens, but the 50x cache discount inverts that assumption. Knowing the exact break-even curve prevents teams from paying more for worse recall.

Prompt caching makes cached prefix tokens significantly cheaper (up to 50x on DeepSeek).
Open source video
Compaction must achieve greater than 50x compression to be worth breaking cache hits.
Open source video
Keeping everything in context won session memory recall tests at 92% vs 38% for compaction methods.
Open source video
Source video

Context Rot: How Attention Budget Dilution Causes Instruction Violation

Research question

What is the causal mechanism by which accumulated logs, diffs, and tool outputs erode instruction adherence over multi-turn sessions, and at what context composition does this failure become predictable?

Why

Understanding context rot as an attention-budget dilution problem rather than model degradation lets engineers monitor and prevent failures before they happen.

An agent told 'NEVER push directly to main' eventually executing 'git push origin main' after 45 turns of logs and diffs.
Open source video
Source video

Cache-Friendly Compaction: Can We Prune Without Breaking the Prefix?

Research question

Is there a compaction scheme that removes middle-token dilution while preserving a cacheable prefix, and what are the recall/tradeoffs relative to full-context and naive summarization?

Why

The open question from pass-1 suggests any rewrite of the prefix invalidates the cache. If an append-only or multi-segment format preserves prefix cache hits, it would unify the benefits of compaction and caching.

Compaction must achieve greater than 50x compression to be worth breaking cache hits.
Open source video
Compaction often hurts quality and increases tool calls because agents must re-retrieve discarded information.
Open source video
Source video

Multi-Turn Evaluation Harness for Context Strategies

Research question

How can an automated run→grade→gate→report harness be standardized to make context-management decisions (compact vs keep, retrieval strategy) falsifiable and regression-protected across models?

Why

The 5,905-run eval exposed that intuition-driven compaction degraded recall and increased tool calls, showing that context strategy changes require multi-turn gated evaluation rather than single-turn benchmarks.

Testing 5905 runs across the Gemini study evaluating single-turn and session tasks.
Open source video
Compaction often hurts quality and increases tool calls because agents must re-retrieve discarded information.
Open source video
Source video

Article ideas

4

Stop Compacting Your Context: Why Keeping Everything Often Costs Less and Works Better

Prompt caching has inverted the economics of context management: aggressive compaction breaks the cache and costs more than keeping the full conversation, while delivering worse recall. The default for long agent sessions should shift to cache-friendly full-context preserving.

Angle

Argue from the 50x discount and 92%-vs-38% recall result that most compaction playbooks are obsolete unless compression exceeds 50x.

Source video

Context Rot Is Not a Model Problem: Why Agents Forget Their Instructions

Long-agent failures are a consequence of attention-budget dilution—non-instruction tokens crowding out the system prompt—not a decline in model intelligence. Active context hygiene is required to maintain instruction adherence.

Angle

Use the 'git push to main after 45 turns' anecdote to show that even explicit instructions erode as logs and diffs accumulate, and argue for monitoring context composition as a reliability practice.

Source video

Context Management Is Not Memory: The Architectural Separation Agents Need

Conflating within-session context allocation with cross-session persistence creates agents that are either stateless or infinitely bloated. Architecturally separating a session-scoped context manager from a persistent memory service enables independent optimization of caching and retrieval.

Angle

Present the distinction as a required module boundary for long-lived agents, with file-based wikis and hybrid retrieval as the memory side and cache-aware context framing as the session side.

Source video

The 50x Rule: A Heuristic for When Compaction Pays Off

Compaction is only economically justified when it achieves more than the cache discount ratio (e.g., 50x on DeepSeek) in compression, otherwise it destroys value and recall. This simple heuristic should guide context-engineering decisions.

Angle

Derive a decision rule from the cost model: compute effective compression ratio vs cache discount; if below threshold, revert to full-context with caching.

Source video

Project ideas

4

Cache-Aware Compaction Harness

gatehouse

In an agent with prompt caching, enabling naive summarization-based compaction will increase total cost and reduce session-recall accuracy compared to full-context, when the cache discount is 50x and compression is below 50x.

Proof of concept

Build a minimal agent loop (e.g., a coding tutor) using Gemini and DeepSeek APIs. Run three conditions: full-context with caching, sliding-window compaction, and LM-summarization compaction. Run multi-turn recall and cost measurement on a fixed task set.

Measurement

Per-turn token cost, cache hit ratio, session-recall accuracy (exact/semantic match), and tool-call counts.

Source video

Context Rot Monitor

beyond-evals

Instruction-adherence accuracy in a multi-turn coding agent will degrade monotonically as the ratio of non-instruction tokens (logs, diffs, tool output) to instruction tokens increases, and this degradation can be predicted by a simple context-composition metric.

Proof of concept

Create a small coding-agent environment with an explicit 'NEVER push to main' instruction. Run extended sessions with varied log/diff padding, recording adherence per turn. Compute a context-pollution score (e.g., non-instruction token fraction) and correlate with violation likelihood.

Measurement

Instruction-following accuracy per turn, context-pollution score, and ROC/AUC for predicting the first violation.

Source video

Cache-Preserving Two-Tier Context

new

A two-tier context format—a stable instruction prefix followed by a compacted tail of older turns—will preserve cache hits on the prefix while reducing total token count and maintaining session-recall accuracy comparable to full-context, unlike naive compaction which breaks the cache.

Proof of concept

Implement a context manager that keeps the system prompt and first N turns untouched, then appends a 'compaction summary' of later turns after a stable delimiter. Compare against full-context and summarization-compaction on recall and cache hit rate.

Measurement

Cache hit ratio, tokens-per-turn, session-recall score, and end-to-end latency.

Source video

Agent Wiki Hybrid Retrieval Benchmark

movement-lab

For an agent-maintained file-based LLM wiki (with an index.md map), hybrid retrieval (dense embeddings + BM25 + reranking) will achieve higher recall@5 and MRR than pure semantic vector search on the same corpus, across factual and procedural queries.

Proof of concept

Build a small agent-maintained wiki with ~1,000 entries. Enable two retrieval modes: embeddings-only and hybrid. Run a set of 100 query-answer pairs generated from wiki content, measuring retrieval quality end-to-end.

Measurement

Recall@5, MRR, and final answer accuracy.

Source video

Architectural implications

5

Context and memory are conflated in many agent implementations.

Before

Agents pass entire conversation history as context and rely on the model's own memory (or restarts) for long-term persistence.

After

Agents separate a session-scoped context manager (with compaction/caching) from a persistent memory service (files, RAG, wiki) with explicit read/write interfaces.

Consequence

Enables independent optimization: cache-friendly session context and scalable cross-session retrieval.

Source video

Prompt caching changes the cost model for agent loops.

Before

Engineers compact/rewrite context to lower token spend; every turn resends full history.

After

Engineers preserve stable cache prefixes and avoid rewriting/summarizing them; keep full context when cache hit price is low.

Consequence

Token cost less dominant; engineering effort shifts to cache-prefix stability and TTFT latency.

Source video

Compaction and retrieval strategies are chosen by convention, not evidence.

Before

Default to sliding windows or summary-based compaction, with retrieval bolted on when context exceeds window.

After

A testable eval harness (run -> grade -> gate -> report) gates changes in context strategy, measuring recall, cost, and tool calls across long sessions.

Consequence

Context engineering becomes an empirical discipline with regression protection.

Source video

Retrieval for agent knowledge often assumes embeddings-only.

Before

Pure semantic similarity search over vector store.

After

Hybrid retrieval: dense embeddings + BM25 keyword search + reranker.

Consequence

Better hit rate/MRR for factual queries, at cost of more infrastructure.

Source video

Long tool outputs and logs bloat context.

Before

Full stack traces and logs are appended to chat history verbatim.

After

Observation truncation (head/tail trimming) and tool-result clearing are applied before insertion.

Consequence

Reduced token usage and less attention dilution with zero LLM overhead.

Source video

Tradeoffs and failure modes

5

Prompt caching vs compaction

Benefit

Cached tokens are very cheap and full-context preserves recall.

Cost or risk

Any rewrite or summarization breaks the cache, forcing full-price recomputation; compaction must exceed 50x compression to be worth it.

Compaction must achieve greater than 50x compression to be worth breaking cache hits.
Open source video
Source video

Compaction vs session memory

Benefit

Smaller context reduces token cost/latency and may reduce context rot.

Cost or risk

Aggressive compaction drops recall (38% vs 92% in tests) and increases tool calls because agents re-retrieve discarded information.

Compaction often hurts quality and increases tool calls because agents must re-retrieve discarded information.
Open source video
Source video

Full context vs context rot

Benefit

Keeping everything maximizes availability of historical information.

Cost or risk

As the window fills, attention dilution can cause instruction violations (e.g., pushing to main despite prohibition).

An agent told 'NEVER push directly to main' eventually executing 'git push origin main' after 45 turns of logs and diffs.
Open source video
Source video

Offloading vs immediacy

Benefit

Enables access to millions of tokens without bloating active context.

Cost or risk

Adds retrieval latency and requires maintaining external stores; if information isn't fetched, it's effectively absent.

Offloading persists details to disk or memory and keeps a lightweight pointer in context.
Open source video
Source video

Trivial compaction vs LM-based compaction

Benefit

Trivial methods (truncation, sliding windows, tool-result clearing) require no LLM call and are cheap.

Cost or risk

Rule-based pruning may discard semantically important information; LM-based summarization retains meaning but adds cost and can break caches.

Trivial tools like observation truncation, sliding windows, and tool-result clearing require no LLM call.
Open source video
Source video

Open questions

4

At what context length does context rot outweigh the recall benefit of keeping everything?

Why unresolved

The summary shows both a failure after 45 turns and 92% recall for full-context, so the inflection point is unknown and likely model/task-dependent.

Research direction

Measure instruction-following accuracy and downstream task success as a function of context size and composition.

Source video

Can compaction be made cache-friendly?

Why unresolved

Any summarization rewrites the prefix and invalidates the cache, but the 50x discount makes cache hits critical; existing compaction strategies don't preserve cache prefix.

Research direction

Develop append-only or suffix-stable compaction formats that preserve the cacheable prefix while removing middle tokens.

Source video

How generalizable is the 'keep everything' result across models, providers, and pricing?

Why unresolved

Only Gemini and DeepSeek with specific cache pricing were tested; ratios and recall behavior may differ.

Research direction

Replicate the 11-preset eval harness across multiple models and providers with varying cache discounts.

Source video

What is the optimal placement of offloaded retrieval content with respect to the cached prefix?

Why unresolved

Retrieval injected after the cache prefix doesn't break the cache, but long retrieved blocks may still dilute attention or exceed context; the interplay is untested.

Research direction

Benchmark cache-aware retrieval insertion positions (prefix vs after cached region vs interleaved) on recall and TTFT.

Source video

Key claims

8
factualVerification needed

Prompt caching makes cached prefix tokens significantly cheaper (up to 50x on DeepSeek).

Evidence

Prompt caching makes cached prefix tokens significantly cheaper (up to 50x on DeepSeek).

Question

What are the exact token prices and cache discount rates on DeepSeek/Gemini as of 2026?

Source video
comparativeVerification needed

Compaction must achieve greater than 50x compression to be worth breaking cache hits.

Evidence

Compaction must achieve greater than 50x compression to be worth breaking cache hits.

Question

Does the break-even ratio differ with model pricing and TTFT requirements?

Source video
comparativeVerification needed

Keeping everything in context won session memory recall tests at 92% vs 38% for compaction methods.

Evidence

Keeping everything in context won session memory recall tests at 92% vs 38% for compaction methods.

Question

What were the exact test conditions and metrics (e.g., exact-match vs semantic recall)?

Source video
causalVerification needed

Compaction often hurts quality and increases tool calls because agents must re-retrieve discarded information.

Evidence

Compaction often hurts quality and increases tool calls because agents must re-retrieve discarded information.

Question

Can this be causally verified by comparing tool-call counts with/without compaction?

Source video
comparativeVerification needed

DeepSeek V4 Flash with caching achieved significantly lower costs per turn while maintaining high recall.

Evidence

DeepSeek V4 Flash with caching achieved significantly lower costs per turn while maintaining high recall.

Question

What were the absolute cost and latency figures?

Source video
causalVerification needed

Hybrid search (dense embeddings plus BM25 keyword search followed by reranking) outperforms pure semantic search.

Evidence

Hybrid search (dense embeddings plus BM25 keyword search followed by reranking) outperforms pure semantic search.

Question

On what dataset and with what metric (MRR, recall@k) was the comparison made?

Source video
opinionVerification not requested

Context management handles within-session token allocation, while memory handles cross-session persistence.

Evidence

Context management handles within-session token allocation, while memory handles cross-session persistence.

Source video
factualVerification needed

An agent told 'NEVER push directly to main' eventually executing 'git push origin main' after 45 turns of logs and diffs.

Evidence

An agent told 'NEVER push directly to main' eventually executing 'git push origin main' after 45 turns of logs and diffs.

Question

Is this failure mode reproducible across different models and codebases?

Source video

Connections

5