WorthIR
WorthIR evaluates query-level retrieval routing under a declared effectiveness measure, cumulative route costs, and cost preference. It compares a frozen routing policy with fixed routes and reports effectiveness, cost, utility, regret, and the fixed-route Pareto curve.
If you are an AI tool, read README_FOR_AI.md before searching the repository.
Choose the reproduction scope
| Goal | Entry point | Required material | Result |
|---|---|---|---|
| Try WorthIR or evaluate a custom task | PyPI package | Built-in demo or your task CSV files | Runnable contract validation, scoring, comparison, and organizer analysis |
| Recompute the paper results | Pinned source tree and released query--route ledgers | Files included under paper_results/ |
Exact closure of the released tables and figures |
| Rebuild original retrieval routes | Source tree plus external corpora, indexes, and models | FiQA-Compression260 is the complete reference implementation; other tasks require their registered resources and an adapter | New query--route outcomes followed by WorthIR validation |
Start from zero
Python 3.10 or newer is required. The recommended path is PyPI:
python -m pip install worthir-eval==1.3.1
worthir demo-custom
If worthir is not on PATH, run python -m worthir demo-custom.
To use the pinned source tree instead:
git clone --branch v1.3.1 --depth 1 https://github.com/HongTianShi/worthir-artifact.git
cd worthir-artifact
./worthir demo-custom
On Windows, replace the last line with .\worthir.cmd demo-custom. The source
launcher creates .venv on first use; do not install the PyPI package as an
additional setup step.
A successful run ends with lines like these:
BUILT: .../reproduced/custom_task
WROTE: .../reproduced/custom_router_choices.csv
OPEN: .../reproduced/custom_task/comparison.md
It creates:
reproduced/
├── custom_router_choices.csv
└── custom_task/
├── contracts/ route definitions and task contract
├── participant/ legal router inputs and frozen actions
├── evaluator/ledger.csv organizer-only query--route outcomes
├── comparison.csv
├── comparison.md
└── fixed_routes.csv
The report includes the router and every fixed route, for example:
| Policy | Effectiveness | Cost | Utility | Delta U vs. fixed |
| example-rule-router | 0.9000 | 0.1507 | 0.8774 | +0.0625 |
Evaluate your own task
Copy the four files in examples/custom_task/source/:
task.json: metric, lambda, declared sensitivity grids, and fixed reference;queries.csv: one row per query with only information legal at route-selection time;routes.csv: route labels, prerequisites, costs, and the development-selected route;outcomes.csv: organizer-only effectiveness and cost for every query--route pair.
Build and check the task:
worthir build-custom my_source my_task
worthir validate-task my_task
Your router—not WorthIR—reads my_task/participant/ and writes choices.csv.
The minimum format is:
query_uid,selected_route_id
q001,base
q002,rerank
Bind those frozen choices to the task contract and compare them with all fixed routes:
worthir evaluate my_task choices.csv --policy-id my-router
The complete router example is under examples/custom_router/.
For qrels and six-column TREC runs, use build-trec.
All generic input formats are documented in docs/ADAPT_TO_NEW_TASK.md.
Organizer analyses
These commands join frozen actions with the evaluator ledger. They default to
my_task/organizer_private/ and refuse to write under participant/:
worthir analyze my_task --organizer-output my_task/organizer_private/per_query_scores.csv
worthir sensitivity my_task
worthir budget my_task
worthir plot my_task
analyze reports selected outcomes, the development-fixed reference, oracle
route, regret, and opportunity stratum for each query. sensitivity and
budget use the grids declared in task.json; a command-line grid is labeled
non-prespecified. plot writes a dependency-free SVG Pareto chart. Every
output is marked descriptive and evaluator_only. Parquet output is available
when pyarrow is installed; CSV requires no extra package.
See docs/OUTPUTS.md for field definitions and docs/TROUBLESHOOTING.md for installation and download failures.
Recompute the paper tables and figures
This step requires a source checkout because the released query--route ledgers are not part of the core PyPI wheel:
python paper_results/run.py
Open paper_results/reproduced/INDEX.md. It links every paper figure and table
to its input, command, output, and reproduction level.
Rebuild retrieval routes
Raw corpora, indexes, and model weights are not distributed here. The staged
rebuild interface and resource estimates are in
paper_results/full_replay/README.md.
FiQA-Compression260 has a runnable public-corpus adapter and a CPU installation
path in FIQA260.md.
WorthIR code uses the MIT License. Third-party data and model terms are listed in NOTICE.
Metadata
Release files for worthir-eval 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| worthir_eval-1.3.1.tar.gz | 45.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| worthir_eval-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 112.2 kB
Release files / worthir_eval-1.3.1.tar.gz
| Download URL | worthir_eval-1.3.1.tar.gz |
|---|---|
| Size | 45.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8e41875e096a037f1e154a42f55cf722e7a32acd768faa6185146e2eb25852c
|
|
BLAKE2b-256 checksum How to use checksums |
adae782fdb094e64bebd730a913bbcc682ca925b5ab4a6f306e359eb518c7422
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / worthir_eval-1.3.1-py3-none-any.whl
| Download URL | worthir_eval-1.3.1-py3-none-any.whl |
|---|---|
| Size | 66.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fff0f74d2d9384968dcf9b4a0cf21ae31cad286fa13fdc877626afbb8cec0bd
|
|
BLAKE2b-256 checksum How to use checksums |
df4a49e3a829bf90c436a9f0958bc97aba66d170d9916130220dc0e02eee27a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency log