다중 턴 코딩 에이전트에서 컨텍스트 압축 게이트웨이의 실증적 비용 귀속
An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents
한국어 초록
컨텍스트 압축은 LLM 코딩 에이전트의 토큰 비용을 줄이는 방법으로 널리 제안되며, 공개 벤치마크는 공격적인 압축이 과제 해결 품질을 유지한다고 보고한다. 그러나 이 두 사실은 흔히 가정되는 세 번째 사실—파일 읽기를 압축하면 실제 다중 턴 에이전트에서 비용이 절감된다는 것—을 함의하지 않는다. 우리는 코딩 에이전트(Claude Code, Codex)와 최신 LLM(Claude Sonnet, GPT-5) 사이의 운영 압축 게이트웨이(Paritok)에 계측을 부착하고, 실제 세션의 토큰 비용을 세 가지 독립적인 레버로 분해한다: 도구 스키마 필터링, 파일 읽기 및 도구 출력의 내용 압축, 이력 요약. 통제된 A/B 실행에서 각각을 고립 측정하면, 세 레버는 근본적으로 다른 비율로 절감한다. 도구 스키마 필터링은 매 턴마다 고정 블록을 제거하며, 일반적인 턴에서 대략 21K–57K 토큰이다. 턴 수 N에 선형이며, 유일하게 명확하고 재현 가능하게 긍정적인 레버이다. 내용 압축은 턴당 캐시 가격이 책정된 접두 문맥의 약 2%만 절감하지만, 압축된 읽기는 이력에 누적되어 이후 매 턴마다 재전송되므로 누적 절감은 이차적으로 증가한다(측정값 약 3350*N^2 토큰). 대략 6턴 이내에 고정 도구 필터 절감을 추월하며, 컨텍스트 윈도우가 상한을 둘 때까지 그렇다. 비파괴 게이트웨이는 에이전트가 필요 시 원본 바이트를 다시 가져오게 하며, 각 재호출은 방금 압축해 제거한 세그먼트 하나만 정확히 재전송하므로 비용은 곱셈적 폭증이 아니라 고정·유계이고, 재호출이 잦으면 누적 절감을 세그먼트 단위로 되돌린다. 마지막으로, 강한 단일 샷 압축 벤치마크—25.7% 압축률에서 SWE-bench 품질의 86.5% 유지, 이 게이트웨이가 배포하는 모델(Paritok-4B, 별도 보고)로 달성—is 다중 턴 에이전트 비용과 직교하며 비용 절감 논거로 인용해서는 안 된다. 우리는 결과를 토큰 절감 노력이 효과를 내는 지점에 대한 실행 가능한 요약으로 정리한다.
원문 초록
Context compression is widely proposed as a way to cut the token bill of LLM coding agents, and public benchmarks report that aggressive compression preserves task-solving quality. These two facts do not imply the third one commonly assumed: that compressing file reads saves money in a real multi-turn agent. We instrument a production compression gateway (Paritok) between coding agents (Claude Code, Codex) and frontier LLMs (Claude Sonnet, GPT-5), and decompose the token bill of real sessions into three independent levers: tool-schema filtering, content compression of file reads and tool output, and history summarization. Measured in isolation under controlled A/B runs, the three save at fundamentally different rates. Tool-schema filtering removes a fixed block every turn, roughly 21K-57K tokens on a typical turn; it is linear in the turn count N and the only unambiguously and reproducibly positive lever. Content compression saves only about 2% of the cache-priced prefix per turn, but compressed reads accumulate in history and are re-sent on every later turn, so its cumulative saving grows quadratically, about 3350*N^2 tokens (measured), overtaking the fixed tool-filter saving within roughly 6 turns until the context window caps it. A non-destructive gateway lets the agent pull original bytes back on demand; each recall re-sends exactly the one segment just compressed away, so its cost is fixed and bounded rather than a multiplicative blowup, and heavy recall spends the accumulated saving back one segment at a time. Finally, a strong single-shot compression benchmark - 86.5% of SWE-bench quality retained at a 25.7% compression rate, achieved by the model this gateway deploys (Paritok-4B, reported separately) - is orthogonal to multi-turn agent cost and must not be cited as a cost-saving argument. We distill the results into an actionable recipe for where token-saving effort pays off.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
- arXiv:2609.22114v1제출 시각 미확인
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.