Task-sufficient retrieval
for greener 5G QA

A question answering system that decides, per question, exactly how much web evidence it needs, stops as soon as it has enough, and moves fewer bytes and less energy over a 5G link, without losing answer quality. Built entirely on local models, no hosted LLM API anywhere in the pipeline.

See it in action
The idea, in plain terms

Most retrieval systems either load a fixed amount of context or load everything they can. Both waste data. EcoBudget asks a sharper question: not "can it answer," but what is the smallest amount of loading that still answers correctly, and whether the energy saved by loading less beats the energy spent running the models.

01

Decompose

The question is parsed into small, explicit (entity, attribute) requirements, e.g. (iPhone 16, price), snapped to a closed 35-attribute vocabulary. The system only ever seeks evidence for these exact facts.

It never loads a whole page for a single fact.
02

Retrieve

For each requirement it gates candidates to the matching entity first, then ranks them by the attribute. This two-stage, entity-aware step surfaces the right passage without dragging in neighbours.

Lifts recall@1 from 0.914 to 0.989.
03

Decide

After every retrieval a learned LinUCB controller weighs coverage and confidence against the byte cost of one more fetch, and chooses STOP or RETRIEVE, halting the instant the evidence is sufficient.

Most questions stop after 1-2 passages.
04

Answer + measure

It answers from only the passages gathered, then logs the exact bytes moved and the 5G transfer + RRC radio energy that implies, so every saving is measured on real coefficients, never estimated.

~75% fewer bytes at equal answer success.
01By the numbers

Fewer bytes, same answers

The headline results our team measured, on a frozen test set and on real web pages.

Retrieval
0.989
recall@1 for entity-aware retrieval, up from 0.914; recall@5 reaches a perfect 1.000.
175 unique requirements
Data transfer
−75%
fewer bytes than full-page loading at statistically equal answer success on the frozen test set.
106 B vs 420 B per query
Energy
−66 J
per query versus full-page loading at the measured 506 KB page scale; transfer is 95% of energy.
frozen test, 95% CI [41, 95]
Real pages
92-98%
fewer bytes measured end to end on live web pages, roughly 14x less transfer energy.
live gsmarena.com
02See it work

The whole idea, in your hand

Tap a question in the app. EcoBudget breaks it into the exact facts it needs, retrieves only those, decides it has enough, and answers, while a normal browser would haul the entire page. Every step is explained as it runs.

-
fewer bytes vs full page
-
transfer energy saved
-
passages loaded
9:41 5G
EcoBudget
Ask a question. It loads only what the answer needs, then shows you what it saved.
Runs on local models, no cloud API
Questions idle
03System

What the pipeline is made of

A chain of small, independent, dependency-injected components, each unit tested without downloading a model.

Decomposer

Turns a question into (entity, attribute) requirements, snapped to a closed 35-attribute vocabulary.

decomposer.py

Retriever

MiniLM bi-encoder, entity-aware two-stage: gate to the entity, then rank by the attribute.

retriever.py

Evidence tracker

Scores coverage with a RoBERTa QA confidence signal, since similarity is fooled by entity-only matches.

evidence.py

Stopping policy

Contextual bandits, LinUCB by default, trading evidence coverage against byte cost.

bandit.py

Answer generator

Fine-tuned flan-t5-base + LoRA, called once per requirement, with an abstain path.

answer.py

Judge

Answer-type-aware checker with a symmetric normalizer, reporting success and fact-F1 separately.

judge.py

Energy model & orchestration

The system.py orchestrator wires every component into one deployed path, and energy.py turns each query into joules: model-FLOP compute, a 5G per-bit transfer model over measured real page payloads (median 506 KB), and an RRC radio-state and tail-energy model. Every coefficient is cited, so the savings are grounded, not guessed.

−66 J
per query vs full-page load
95%
of energy is transfer at page scale
3 terms
compute + transfer + radio
energy.py · system.py

Per-query flow

User task
the question
Decompose
(entity, attribute) requirements
Retrieve
gate to entity, rank by attribute
Evidence check
coverage, confidence, bytes used
Controller
LinUCB: value of retrieving more
STOP?
enough evidence?
Yes
Final answer
from only what was loaded
No → retrieve one more passage → loop back to Evidence check and re-decide.
04Progress

Roadmap, phase by phase

Planned as phases A through H. Here is the honest status of each, including the parts that did not go as first expected.

A

Compute vs transfer accounting done

At snippet scale compute dominates transfer ~100x, so saving bytes alone saves little; the policy still wins via fewer evidence-scoring inferences.

B

A defensible 5G energy model done

A 5G per-bit model split into radio access, transport, and device receive. At realistic page scale transfer dominates and loading fewer pages is the lever.

C

Dataset scale-up done

186 passages, 344 hand-authored seed tasks, 1,376 total tasks, frozen train/val/test splits grouped by seed with a coverage invariant enforced in code.

D

Entity-aware retriever done

Two-stage retrieval, gate to the entity then rank by attribute. recall@1 rose from 0.914 to 0.989, recall@5 reached a perfect 1.000.

E

External baselines & test run done

Added LinUCB, Thompson sampling, and an Adaptive-RAG analog. All adaptive methods converge; the SGD bandit is seed-unstable, so LinUCB is the default.

F

Radio-state & tail energy done

An RRC radio-state model: fewer, earlier fetches shorten radio active time and tail energy. The finding holds across every cited coefficient range.

G

Rigor & reproducibility done

Consolidated ablations, multi-seed variance, a single frozen test-split run, and a reproducibility appendix with every command and checkpoint config.

H

Paper writeup in progress

Related work, the figures, and the limitations section. The engineering and results are complete; this is the write-up stage.

05Results

Measured, and reproducible

Every number here was produced on our own machine and is reproducible from the commands in the repository.

0.989
retriever recall@1 (from 0.914)
0.895
frozen-test answer success
75%
fewer bytes vs full-page load
172
tests passing, no hosted LLM API

Retriever recall (Phase D)

On 175 unique seed requirements, comparing whole-question against per-requirement and entity-aware retrieval.

Retrieverrecall@1recall@5
Whole-question baseline0.5890.931
Per-requirement bi-encoder0.9140.983
Entity-aware, attribute-ranked0.9891.000

Frozen test-split run (124 headline tasks)

The single final run against the frozen test set, after every configuration was locked on validation. LinUCB is the deployed policy.

ConditionSuccessFact F1Avg bytesFetches
LinUCB (deployed)0.8950.9441081.87
SGD bandit0.8950.9441061.84
Heuristic0.8950.9441362.29
One per requirement0.8310.9111011.74
Full page load0.9030.9194207.56

The figures

Generated from the frozen test results and the measured payload and real-page data.

How it is evaluated

A structured task benchmark, a frozen split, a policy comparison, and the metrics that matter for a 5G-green claim.

Experimental evaluation
Structured task benchmark
344 seeds + synthetic = 1,376 tasks
Frozen splits
train 1008 / val 240 / test 128 (73/17/9)
Compare policies
Full, Fixed, Heuristic, Adaptive-RAG, LinUCB, Thompson, EcoBudget
Evaluate metrics
success & fact-F1, bytes, steps, energy (compute + transfer + radio), gCO2e, latency
06Honesty, by design

What we report plainly, not just the wins

The point is a defensible energy story, not a flattering one.

Does the learned policy beat a hand-tuned heuristic?

Not under the entity-aware retriever. With recall@1 at 0.989 there is little uncertainty left to exploit, so the learned policy converges to the same behavior as the heuristic (difference 0, CI [0, 0]). It still clearly dominates fixed budgets and full load, and its edge over the heuristic grows with retrieval uncertainty, characterized directly in the noise sweep.

Is the custom SGD bandit a better algorithm than standard baselines?

No. On validation, the SGD bandit, LinUCB, Thompson sampling, and the heuristic all reach the same success at the same bytes. Over five seeds the SGD bandit is unstable (0.790 ± 0.283, collapsing on some seeds), while LinUCB (0.913 ± 0.007) and Thompson (0.897 ± 0.014) are stable. LinUCB is the deployed default for that reason.

Does compute or transfer energy dominate?

It depends on payload realism. At short-snippet scale, compute dominates transfer by roughly 100x. At realistic web-page scale (median 506 KB), transfer dominates and loading fewer pages becomes the primary energy lever. The policy wins in both regimes, for different reasons.

Does any part of this depend on a hosted LLM API?

No. Every model runs locally: flan-t5-base with LoRA, a MiniLM bi-encoder, and a RoBERTa QA confidence model. This is enforced in code: a script scans for banned imports and known API hosts, and a test runs it as part of the suite.

What is still open?

The paper writeup itself in Phase H. Two known ceilings: narrative tasks have no training coverage and currently fail, and answer quality degrades on raw live-page text (a corpus-to-web domain gap) even though the byte and energy savings hold.

See it live on the open web

The live dashboard runs a real query through both a normal full-page load and EcoBudget's task-sufficient loading, then shows the measured bytes, 5G transfer and radio energy, and carbon saved, side by side.

Open the live dashboard → View the results