Ideas from AI Engineer talks Curated by Alex Vidal (@dobleio) and Borja Pérez (@borjaperfra) 76 ideas · 101 talks · 5 events

The Engineering Brief

Towards AI's tutor recalled more and cost less keeping full history than compacting

Towards AI tested context strategies for its AI tutor in small experiments. Keeping the full conversation beat summarising and clearing tool outputs on recall, latency and cost, because cached tokens were cheap. Compaction became necessary only on a local model with a 32K window.

Louis-François Bouchard, Omar Solano, Samridhi VaidTowards AIAIE World's Fair 20262 min read
Watch from 16:45

Recording by AI Engineer.

The idea

The speaker’s argument, in our words.

Louis-François Bouchard, Omar Solano and Samridhi Vaid set out to tune the context handling of the Towards AI Academy tutor, an agent with retrieval tools whose production defaults cleared old tool outputs and summarised history after 30,000 tokens. They compared eleven presets on real student questions and on multi-turn sessions where a fact is planted early and asked about later.

The cost side rests on prompt caching. Providers charge much less for tokens they have already processed, but any summary or rewrite is new text and loses the discount. Bouchard's rule of thumb is that compaction only pays if it shrinks the context by more than the cache discount. Their production choice is to keep everything up to a 30K-token limit and compact after that.

What they found

From the talk. Figures are self-reported unless stated.
  • On multi-turn sessions, the production defaults (clearing tool outputs, summarising at 30K tokens) recalled the planted fact 38% of the time; keeping the full history had better recall and was also cheaper and faster per turn.

    Self-reported. Eleven presets, same model, prompt, tools and data; sessions of 11 to 13 turns with planted facts and filler; one or two trials per run, which the team says may make figures imprecise. Model transcribed as Gemini 3.5 Flash. Full-history comparison at 45:36.

    Measured result

    44:37
  • Clearing tool outputs made the agent re-retrieve information it already had, adding tool calls, tokens and cost.

    The team's explanation of the result, from their logs.

    Case study

    46:26
  • On DeepSeek V4 Flash, questions about specific details in real student chats were answered correctly 95% of the time with full history versus 32% after summarising or compacting.

    Self-reported; number of chats and questions not stated.

    Measured result

    51:18
  • On DeepSeek, the full-history setup sent the most tokens but was the cheapest to run, because 97% of its tokens were cached; this held on a 36-turn conversation of about 1.78 million tokens.

    Self-reported, single long conversation for the 36-turn figure.

    Measured result

    51:57

Why it matters

Our reading. Not said in the talk.

Summarising history is a common default in agent frameworks, set for cost as much as quality. With provider caching that argument can reverse, and logging cache hits and recall per turn shows whether it does. Dex Horthy's case for compaction comes from long coding sessions that fill the window, with a person checking the compacted file; Arize, like Towards AI, found automatic summaries unreliable.

What one could try

  • Log cached tokens, cost, time to first token and tool calls per turn before choosing a compaction policy.
  • Run an eval that plants a fact early in a session and asks for it later, and compare full history against your compaction settings.
  • If you clear old tool outputs, check whether the agent simply calls the same tools again.

Limitations

  • Small samples: one or two trials per preset and short sessions; the team calls the figures possibly imprecise.
  • One application (a course tutor) with one agent; results depend on each provider's cache pricing.
  • On their local 32K-window setup, keeping everything was not possible and scored about 33% versus 92 to 95% in the cloud (59:59).

Original sources

This is our synthesis of the talk, checked against the transcript at the linked moments.

Related ideas