Skip to main content

Benchmarks

Reproducible numbers: the real optimizer over fixed synthetic payloads.

These isolated request measurements show transformation efficiency, not total session spend. Provider prompt-cache writes, persistent client transcripts, retrieval turns, and tool reruns can dominate the bill, so session-level regressions are monitored separately.

For the numbers behind every claim here, and to reproduce them, see the benchmarks repository.

Benchmarks

How it's measured

1
Two configs per workload

Each workload runs as control (the baseline) and optimized (the workload's strategy, pinned at one knob). The Anyray analog of a before/after.

2
Optimizer

The harness calls a live optimizer over its HTTP contract — pin one strategy via /admin/optimizer/settings, run the request through /v1/optimize, read back the transformed request. No optimizer internals are vendored.

3
Token accounting

Token counts are real BPE tokens (gpt-tokenizer o200k_base, the GPT-4o/4.1 family), measured the same way for the control and optimized runs.

Patterns

The common token-waste patterns users and coding agents fall into every day — the ones Anyray benchmarks against.

Waste patternWhy it's costly
Paste a whole log or data dump and ask one questionthe single most common thing engineers do with an assistant — billed in full, every turn
Agents re-read entire files when the question needs signatures~70% of a coding agent's tokens are irrelevant file reads
Tool-schema bloat rides along every call55k+ tokens of tool definitions before the first message
RAG over-retrieval3–5× more chunks fetched than the answer uses
Agents resend the whole history every turnthe #1 pattern — 4–15× chat tokens; a 50-turn session bills ~25:1 input:output
Redundant / near-duplicate requests40–60% of enterprise traffic is repetitive (18% exact, ~47% similar)

Headline savings

Whole-request input-token reduction, measured by running each workload's strategy through a live optimizer at a fixed knob. Grouped into suites:

SuiteWorkloadsBefore (tok)After (tok)Saved
Logs & structured data3126,99818,38386%
Code context515,1617,74549%
Tools & retrieval312,9533,35474%
Agent operations389,01324,03373%
Cross-session memory recall518,8093,18083%

Run it yourself

The suite needs a reachable optimizer (the Anyray stack brings one up in-network on :8088) and its admin token. Then:

Run the benchmarks
git clone https://github.com/anyrayHQ/benchmarks && cd benchmarks
cp .env.example .env # set ANYRAY_OPTIMIZER_URL + ANYRAY_ADMIN_TOKEN
./run.sh --all # writes <suite>/results/*.json

Each suite writes results/control.json and results/optimized.json — the committed, real scores. Full per-workload tables and a live-provider cross-check are in the repo's RESULTS.md.