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.0

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.0
File Size Uploaded
ir_axioms-1.2.0.tar.gz 29.0 MB Details

Built distribution (wheel)

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

Total release size: 48.9 MB

Release files / ir_axioms-1.2.0.tar.gz

Download URL ir_axioms-1.2.0.tar.gz
Size 29.0 MB
Tags Source
SHA-256 checksum
How to use checksums
98c6ab441f55ff24fc46e55f79b0f1dd96db00bf5ff8a1851c23d6720a391705
BLAKE2b-256 checksum
How to use checksums
be4ccd1b712948a1eadb6f79d07bb72b6b695ac4071f81a65b16cb8b85e99e16
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 16, 2026.

Transparency log

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

Download URL ir_axioms-1.2.0-py3-none-any.whl
Size 19.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9f010842f905ab78c7b56aaf82e4da758baade1f9f090f38315afd44d0f05648
BLAKE2b-256 checksum
How to use checksums
e367aaf4cdd6587b895aeaca907344f479d692e93ace1d1e0c01fbe9ddab21b3
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 16, 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

1.2.1

2 release files

This release

1.2.0 This release

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