技巧精选

Context Engineering 2026 工作坊:压缩、记忆与成本

🆕 Context Engineering in 2026: Compaction, Memory & Cost https://t.co/08qPA63bBd @Whats_AI, @samr...

精选理由

想省token成本?这场工作坊用开源AI导师演示上下文压缩全流程,还对比了Gemini和开源模型的质量和开销。

AI 摘要

这场工作坊围绕上下文工程展开,以开源AI导师为实例,讲解如何设计每次模型调用时看到的指令、历史、检索内容和工具输出。内容分三阶段:解决有限窗口和无状态模型两个根本问题,整理截断、修剪、摘要、卸载到文件等压缩工具,并覆盖跨会话记忆与按需技能加载。团队用Gemini测量了每次运行的token、成本、延迟和内存探针,而非主观评估。在真实负载下Gemini Flash成本偏高,因此他们测试了开源和本地模型是否能以更低成本匹配质量。所有实现均已开源,将在工作坊中分享代码和评估工具。

图片来源 · AI Engineer
原文 · AI Engineer

🆕 Context Engineering in 2026: Compaction, Memory & Cost https://t.co/08qPA63bBd @Whats_AI, @samr...

🆕 Context Engineering in 2026: Compaction, Memory & Cost youtube.com/watch?v=WP3hjU… d @Whats_AI , @samridhivaid and @omar_solano1 return! This workshop is about engineering the context window so rot stops happening, shown with @towards_AI 's open-source AI tutor, which answers questions for students of our AI-engineering courses. Context engineering is deciding what the model sees on every single call — instructions, history, retrieved course content, memory, and tool outputs — and it's the line between a tutor that holds a coherent session and one that forgets the student's setup halfway through. We'll move in three stages, mirroring how the project actually went. The concepts: - the two root problems (a finite window, a stateless model), - the full compaction toolkit (truncation, trimming, tool-result clearing, summarization, and offloading to files — and when each actually helps), - memory that survives across sessions, skills loaded on demand, and - production-grade retrieval (chunking, metadata, course scoping, hybrid search, reranking, and evaluating). We'll cover the tutor's architecture, and the evaluation harness we used to measure every run on Gemini — tokens, cost, latency, and memory probes instead of vibe-checks. At real volume, even Gemini Flash got expensive, so we tested whether open and local models could match the quality for a fraction of the cost and match result quality. Everything is open-source and will be shared during the workshop. 💬 2 🔄 1 ❤️ 5 👀 1175 📊 4 ⚡