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.
Start from zero
Python 3.10 or newer is required. The recommended path is PyPI:
python -m pip install worthir-eval==1.3.0
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.0 --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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file worthir_eval-1.3.0.tar.gz.
File metadata
- Download URL: worthir_eval-1.3.0.tar.gz
- Upload date:
- Size: 45.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7246c5ae7ebee6397bd19678cbec7ff35fb49015c0676d89783939b3b91a3158
|
|
| MD5 |
33fbf14e5d60f6fdb1d27fe560d1b09c
|
|
| BLAKE2b-256 |
ff348b58efe3f18d363fe4bfadf2fab92c1f1b814a3d5f9fcd0fe495b18ca5cf
|
Provenance
The following attestation bundles were made for worthir_eval-1.3.0.tar.gz:
Publisher:
publish.yml on HongTianShi/worthir-artifact
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
worthir_eval-1.3.0.tar.gz -
Subject digest:
7246c5ae7ebee6397bd19678cbec7ff35fb49015c0676d89783939b3b91a3158 - Sigstore transparency entry: 2579982531
- Sigstore integration time:
-
Permalink:
HongTianShi/worthir-artifact@0c0d59ca3b509d28c281f797779780d4cc2dbde4 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/HongTianShi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c0d59ca3b509d28c281f797779780d4cc2dbde4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file worthir_eval-1.3.0-py3-none-any.whl.
File metadata
- Download URL: worthir_eval-1.3.0-py3-none-any.whl
- Upload date:
- Size: 66.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f5dde635c73ae514e682af5a00c86c40191f3f0f0a918316a4d393de67e2fa0
|
|
| MD5 |
85246604d16672d98d42fc191440d624
|
|
| BLAKE2b-256 |
5d65fc4350d6c9483750f467e3bb4349fe2f1d868b528ad133c86cdd1081c973
|
Provenance
The following attestation bundles were made for worthir_eval-1.3.0-py3-none-any.whl:
Publisher:
publish.yml on HongTianShi/worthir-artifact
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
worthir_eval-1.3.0-py3-none-any.whl -
Subject digest:
3f5dde635c73ae514e682af5a00c86c40191f3f0f0a918316a4d393de67e2fa0 - Sigstore transparency entry: 2579982538
- Sigstore integration time:
-
Permalink:
HongTianShi/worthir-artifact@0c0d59ca3b509d28c281f797779780d4cc2dbde4 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/HongTianShi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c0d59ca3b509d28c281f797779780d4cc2dbde4 -
Trigger Event:
release
-
Statement type: