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.
Context Engineering in 2026
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.
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.
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.
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.
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
- foundedLouis-François Bouchard founded
Towards AIco-founder and CTO“I'm Louis-François Bouchard, co-founder and CTO of Towards AI”
2:06inTurn 10,994 Notes Into MemoryYouTube Verified7 sources· Talk, Web· archived
- built
Towards AI built AI tutor
“One of the features we provide is an AI tutor”
YouTube Unverified1 source· Talk
- uses
“we create a very simple one using the LangChain library”
YouTube Unverified1 source· Talk
- metric
AI tutor: 95% exact-detail recall when keeping the full conversation; 32% after summarization or compaction
“exact details I was looking for 95% of the time when it kept everything”
YouTube Unverified1 source· Talk
- metric
DeepSeek-V4-Flash: 97% of tokens cached in the full-history setup
“97% of the tokens were cached”
YouTube Unverified1 source· Talk
- metric
AI tutor: Selected setup compacts after 30K tokens
“after 30K tokens, we are going to compact”
YouTube Unverified1 source· Talk
- uses
“We decided on DeepSeek V4 Flash”
YouTube Unverified1 source· Talk










