WhoBuilt

Context Engineering in 2026

Aug 17, 2026· 1 h 3 min· 9.9K views·Watch on YouTube

Speakers

Louis-François Bouchard, founder of Towards AI, presents with colleagues Omar Solano and Samridhi Vaid at AI Engineer on managing context for their AI tutor.

Why context needs managing

Bouchard outlines five needs for the tutor: grounded answers, course-specific context, support for long sessions and code, and low latency. He explains that a model has a finite context window and no memory between sessions, while long histories and repeated tool outputs can raise costs, slow responses, and hurt answer quality.

Compaction, retrieval, and caching

Bouchard describes ways to reduce context, from truncating unusually long tool outputs and using a sliding window to summarizing or selectively retaining information. He cautions that transformed context can lose prompt-cache benefits, so clearing old outputs and loading only relevant files or skills may be preferable to summarizing everything.

The tutor and its first evaluations

Solano describes a LangChain ReAct agent with hybrid retrieval over a corpus of more than 8 million tokens, reranking results to return five relevant chunks. A second tool let the agent browse a generated knowledge base, but it made responses about 50% slower without improving recall. In early tests, keeping the full history outperformed the tutor's default compaction settings on recall, cost, and speed.

What longer context tests showed

Vaid tested cached chats, documents and tools, and local models. With cloud models, full history recalled specific details 95% of the time, compared with 32% after summarization; on DeepSeek, 97% of full-history tokens were cached. Local retrieval worked well for large documents, but a 32K context limit held local chat recall to about 33%, compared with 92% to 95% in the cloud.

The tutor's chosen setup

Vaid says the team chose DeepSeek V4 Flash with hybrid retrieval and plans to retain conversation history until it reaches 30K tokens, then compact it. She gives an estimated monthly cost of about $40,000 for Gemini and $1,900 for DeepSeek at a scale of 1,000 students.

Takeaways

  • Measure answer quality, latency, and cost before adding compaction rules.
  • Keep full history when cache discounts make it cheaper and recall remains strong.
  • Use hybrid retrieval when documents exceed the model's context window.
  • Test knowledge-base browsing against simpler retrieval; extra tool calls may add latency without improving recall.
  • Set compaction thresholds around measured context limits and workload needs.

Mentioned in this talk

Search inside this talk

What was claimed 7

Related talks