今日已更新 80 条资讯 | 累计 20052 条内容
关于我们

标签:#modelmaxxing

找到 1 篇相关文章

AI 资讯

You Don't Need an LLM to Route Agent Context: Regex Beats Classifiers by 45 Points

LLM agents burn a ridiculous number of tokens on redundancy: opening the same files again and again, trying a patch, failing, then wandering back through the repo like they’ve never seen it before. A July 2026 paper, ContextSniper: AntTrail's Token-Efficient Code Memory for Repository-Level Program Repair , puts real numbers behind that waste. In repository-level repair, agents keep dragging in irrelevant code and logs. ContextSniper tackles that with a context layer built around tiered memory and an intention-aware context gate that filters low-value regions before they ever reach the model. That gate alone cut tokens by 51.5% on one host agent and 38.9% on Claude Code, while submitted-resolution rates stayed basically in the same neighborhood. The gate is the interesting part, because it is not tied to that paper’s exact system. It is a more general idea, and it is starting to show up across agent architectures. At heart, the gate is just a classifier. Given a request, it has to decide what kind of retrieval will answer the question cheapest: symbol lookup, semantic search, graph impact, mutation prep, or something else. That leads to the practical question the paper does not really answer: Do you need another LLM call just to decide what context to retrieve? We tested that directly. Five ways agents get code into context Before you can gate anything, you need a retrieval strategy. Most current systems fall into one of five rough families: Grounded read-only retrieval: parse the code and return exact symbol source by name. Byte-precise, no synthesis. Graph code intelligence: model calls, imports, entities, and dependencies as a graph, then traverse it. Embedding / RAG search: use vector similarity over chunks. Whole-repo packers: compress or dump the repo into the context window. Mutate / execute runtimes: retrieve context, then modify or run code. None of these is magic. Graphs are great for relationships, but they can drift away from source. RAG is useful, but f

2026-07-09 原文 →