docs(benchmark): add rtk (Rust Token Killer) as a 4th SWE-bench arm#20
Merged
Conversation
Adds rtk to the live SWE-bench Verified study alongside baseline, context-guru, and headroom. rtk is architecturally distinct from the two request-stream proxies: it is a Claude Code PreToolUse hook that rewrites Bash commands (cat->rtk read, pytest->rtk pytest, grep->rtk grep, ...) and compresses their output at the shell, before it enters the transcript — so it adds 0 ms request latency, runs no model ($0 tool cost), and is cache-safe by construction. Harness (deploy/harbor/): swebench_rtk.py routes model traffic through the same `off` passthrough proxy as the baseline (only variable = in-container bash compression) and runs a custom claude-code-rtk Harbor agent (committed reference copy: claude_code_rtk_agent.py) that uploads the static-musl rtk binary and installs the hook per trial. deep_analysis.py / deep_plots.py extended to a 4th arm. Result (matched 50, all four arms 0 exceptions): rtk 43/50 solved, $29.09 billed (-9.0% vs baseline), 91.7M cache-read (-10.8%), 33.2 steps, 0 ms/req, $0 tool cost. It is the 2nd-cheapest arm and reward-neutral vs baseline, beating the headroom proxy on both cost and reward. Its 65.8% bash-output reduction nets to -9% on the bill because bash output is a small slice of a ~98%-cached agent; its ceiling is that only Bash-tool output passes the hook (built-in Read/Grep/Glob bypass it). Docs: new results/rtk.md; comparison.md, components.md, RESULTS.md, README.md, home page, charts.js, and mkdocs nav updated to four-way; REPRODUCE.md documents the rtk arm. mkdocs build clean. Assisted-By: Claude (Opus 4.8) Signed-off-by: Osher Elhadad <osher.elhadad@live.biu.ac.il>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds rtk (
rtk-ai/rtk, "Rust Token Killer") as a 4th arm to the live SWE-bench Verified study, alongside baseline, context-guru, and headroom.rtk is architecturally distinct from the two request-stream proxies: it is a Claude Code
PreToolUsehook that rewrites Bash commands (cat→rtk read,pytest→rtk pytest,grep→rtk grep, …) and compresses their output at the shell, before it enters the transcript. It is not on the network path — so it adds 0 ms request latency, runs no model ($0 tool cost), and is cache-safe by construction (the compressed form is what gets cached; there is no cached prefix to invalidate).Result (matched 50 tasks, all four arms, 0 exceptions)
rtk is the efficiency surprise — a simple deterministic shell filter is the 2nd-cheapest arm (−9.0%), reward-neutral vs baseline (43 = 43), at zero request-path latency and $0 tool cost, beating the headroom proxy on both cost and reward. Its 65.8% bash-output reduction (dominated by
cat→readandgrep) nets to −9% on the bill because bash output is a small slice of a ~98%-cached agent's context; its ceiling is that only Bash-tool output passes the hook (Claude Code's built-inRead/Grep/Globbypass it), which is why context-guru's whole-request compaction goes deeper.Changes
docs/results/rtk.md— per-task table, rtk's own savings ledger, per-command breakdown, and real before→after examples.comparison.md,components.md,RESULTS.md,README.md, the home page,charts.js, and the mkdocs nav.REPRODUCE.mddocuments the rtk arm end-to-end.deploy/harbor/swebench_rtk.py+ a committed reference copy of the customclaude-code-rtkHarbor agent;deep_analysis.py/deep_plots.pyextended to a 4th arm (figures regenerated).mkdocs build --cleanis warning-free.Notes
offpassthrough proxy) — the only variable is the in-container bash compression.Assisted-By: Claude (Opus 4.8)