Skip to main content

CI status Code coverage Maintenance
PyPI version PyPI downloads Python versions
Issues Pull requests Commit activity License

↕️ ir_axioms

Axiomatic constraints for information retrieval and retrieval-augmented generation.

ir_axioms is a Python framework for experimenting with axioms in information retrieval in a declarative way. It includes reference implementations of many commonly used traditional retrieval axioms as well as axioms for retrieval-augmented generation. The library is well integrated with the PyTerrier framework and supports Pyserini retrieval indices too. Use-cases of ir_axioms include search-result re-ranking, analyses of (neural) retrieval systems, and analyses of generated RAG answers.

Note: If you're looking out for ir_axioms<1.0, please go here.

Publications

Read more about the ir_axioms framework and the new RAG axioms in these publications:

Installation

  1. Install the package from PyPI:

    pip install ir_axioms>=1.0
    
  2. Install spaCy model:

    python -m spacy download en_core_web_sm
    

Optional Dependencies

Tag Description
pyserini Use index statistics, document contents, and tokenization from Pyserini/Anserini indices.
pyterrier Use index statistics, document contents, and tokenization from PyTerrier/Terrier indices. Apply KwikSort re-ranking to PyTerrier pipelines. Run axiomatic analyses.
keybert Use KeyBERT for aspect extraction (must be enabled manually if installed).
sbert Use Sentence Transformers for sentence similarity (enabled automatically if installed).
blingfire Use BlingFire for fast tokenization (enabled automatically if installed).

Note: To reproduce our results from ICTIR'25, please use these extras: pyterrier,keybert,sbert

Usage

Run the CLI with:

ir_axioms --help

Development

  1. Install Python 3.11 or later.

  2. Create and activate a virtual environment:

    python3 -m venv venv/
    source venv/bin/activate
    
  3. Install project dependencies:

    pip install -e .[tests]
    
  4. Install spaCy model:

    python -m spacy download en_core_web_sm
    
  5. After having implemented a new feature, please check the code format, inspect common LINT errors, and run all unit tests with the following commands:

    ruff check .                   # Code format and LINT
    mypy .                         # Static typing
    pytest .                       # Unit tests
    

Contribute

If you have found an important feature missing from our tool, please suggest it by creating an issue. We also gratefully accept pull requests!

If you are unsure about anything, post an issue or contact us:

We are happy to help!

License

This repository is released under the MIT license. Files in the data/ directory are exempt from this license.

Metadata

Release files for ir-axioms 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ir-axioms 1.2.1
File Size Uploaded
ir_axioms-1.2.1.tar.gz 29.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ir-axioms 1.2.1
File Interpreter ABI Platform
ir_axioms-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 48.9 MB

Release files / ir_axioms-1.2.1.tar.gz

Download URL ir_axioms-1.2.1.tar.gz
Size 29.0 MB
Tags Source
SHA-256 checksum
How to use checksums
c8767064d396c4f321950ab4e8b51ed430dadb091c5761b7d4c6edf4b84ebb23
BLAKE2b-256 checksum
How to use checksums
de0bec2d0971ac992cfd132a0f0373aae8f9869d763d473822e26113c00c0e15
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 Sep 17, 2026.

Transparency log

Release files / ir_axioms-1.2.1-py3-none-any.whl

Download URL ir_axioms-1.2.1-py3-none-any.whl
Size 19.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
827797933eaa8502923286b038a65bb865c1835d5c0c0fb8dbda7509a5e7ef30
BLAKE2b-256 checksum
How to use checksums
7d14e13c5c4fb8d0e85ca0f932cd86748c2d8334a334727d1f96c01eb0f5afae
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 Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.5

2 release files

1.2.4

2 release files

1.2.2

2 release files

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

0.2.12

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.5

2 release files

0.1.3

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page