Original-question accuracy
236 of 503 LongBench v2 questions
Research project · Autonomous LLM infrastructure
This project explores a two-stage cache that reuses verified LLM work without confusing similar-looking questions. It combines local retrieval, model-based equivalence checks, source provenance, and persistent knowledge extraction.
236 of 503 LongBench v2 questions
1,000 of 1,006 exact + semantic repeats
497 of 497 hits matched the original prediction
vs. repeating full context for all three query forms
The problem
Autonomous agents repeat work. A cache can save time and compute, but a naive vector lookup may treat “include timeout errors” and “exclude timeout errors” as the same request.
The system separates recall from judgment: a fast local Dragnet finds plausible matches, then a focused Sniper decides whether a candidate asks for exactly the same information.
How it works
Cache reuse comes first. Expensive reasoning only happens when the system cannot prove that earlier work applies.
Look for exact, meaning-equivalent, or previously extracted knowledge within the active corpus.
Use local Qwen3 embeddings and FAISS to cast a wide net, then rerank the strongest evidence.
Route misses to an executor that reads selected context iteratively and synthesizes a grounded answer.
Check provenance and model consensus, store the answer, and index atomic facts for future queries.
Two indexes, two kinds of reuse
The answer cache serves exact or meaning-equivalent requests. A separate fact index turns useful answers into atomic subject–relation–object triples, so later questions can reuse facts that were buried inside a longer response.
“The filing reports ARR of $12.4M and identifies the CFO as Jordan Lee.”
Companyreported ARR$12.4MCompanyhas CFOJordan LeeSafety boundary
Cache entries and extracted facts remain tied to the document set that produced them. A load-time mismatch is refused rather than silently mixing knowledge across domains.
Context control
Oversized cached results are flagged as ephemeral or recursively summarized before they can overwhelm the calling agent’s working context.
LongBench v2 · 20260716T204202Z
503 independent questions were each evaluated as an original, exact repeat, and semantic variation: 1,509 scored rows in total. Repeat rows measure reuse, not additional benchmark accuracy.
Original-question accuracy
All 503 originals produced valid A–D predictions. The result is competitive for a deliberately difficult long-context benchmark, but official comparisons are contextual—not controlled head-to-head tests.
Accuracy by task family
| Query form | Rows | Accuracy | Cache hit rate | Model calls | Input tokens | Avg. latency |
|---|---|---|---|---|---|---|
| Original | 503 | 46.9% | 0% | 6,837 | 173.63M | 67.32s |
| Semantic | 503 | 46.9% | 98.8% | 601 | 2.09M | 1.08s |
| Exact | 503 | 46.9% | 100% | 0 | 0 | 0.02s |
Token economics
The run demonstrates amortization across repeated queries. It does not establish lower dollar cost: pricing, GPU-hours, energy, and utilization were not recorded.
tokens processed by executor and evaluator calls
Observed input was 38.09M lower, a 17.8% reduction
Observed input was 146.6% higher, or 2.47× this baseline
What we learned
All 497 semantic cache hits reproduced the paired original prediction. The six misses produced two improvements and two regressions, leaving net accuracy unchanged.
The ten most expensive originals generated 27.1% of original input tokens. Code-repository tasks were 9.9% of questions but 40.7% of original input.
The next defensible comparison needs a measured full-context control plus GPU-hours, energy, utilization, and per-model pricing—not token totals alone.
Core stack