Skip to main content

WorthIR

English | 简体中文

CI Python 3.10+ MIT License

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

worthir_eval-1.3.1.tar.gz (45.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

worthir_eval-1.3.1-py3-none-any.whl (66.3 kB view details)

Uploaded Python 3

File details

Details for the file worthir_eval-1.3.1.tar.gz.

File metadata

  • Download URL: worthir_eval-1.3.1.tar.gz
  • Upload date:
  • Size: 45.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for worthir_eval-1.3.1.tar.gz
Algorithm Hash digest
SHA256 f8e41875e096a037f1e154a42f55cf722e7a32acd768faa6185146e2eb25852c
MD5 25273c7ed5ed190bf0cc2e2d2b23545a
BLAKE2b-256 adae782fdb094e64bebd730a913bbcc682ca925b5ab4a6f306e359eb518c7422

See more details on using hashes here.

Provenance

The following attestation bundles were made for worthir_eval-1.3.1.tar.gz:

Publisher: publish.yml on HongTianShi/worthir-artifact

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file worthir_eval-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: worthir_eval-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 66.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for worthir_eval-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6fff0f74d2d9384968dcf9b4a0cf21ae31cad286fa13fdc877626afbb8cec0bd
MD5 8c02a464630e6e695316a75af792d287
BLAKE2b-256 df4a49e3a829bf90c436a9f0958bc97aba66d170d9916130220dc0e02eee27a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for worthir_eval-1.3.1-py3-none-any.whl:

Publisher: publish.yml on HongTianShi/worthir-artifact

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page