↕️ 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:
- Alexander Bondarenko, Maik Fröbe, Jan Heinrich Reimer, Benno Stein, Michael Völske, and Matthias Hagen. Axiomatic Retrieval Experimentation with
ir_axioms. - Jan Heinrich Merker, Maik Fröbe, Benno Stein, Martin Potthast, and Matthias Hagen. Axioms for Retrieval-Augmented Generation.
Installation
-
Install the package from PyPI:
pip install ir_axioms>=1.0
-
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
-
Install Python 3.11 or later.
-
Create and activate a virtual environment:
python3 -m venv venv/ source venv/bin/activate
-
Install project dependencies:
pip install -e .[tests]
-
Install spaCy model:
python -m spacy download en_core_web_sm
-
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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ir_axioms-1.2.2.tar.gz | 28.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ir_axioms-1.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.6 MB
Release files / ir_axioms-1.2.2.tar.gz
| Download URL | ir_axioms-1.2.2.tar.gz |
|---|---|
| Size | 28.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44fb26dfa56e1d725423eaea0964199a76467009c4fe4f107edbd699c8bc0094
|
|
BLAKE2b-256 checksum How to use checksums |
a88c4296b42148e134a15d3ded7e2ca291fbbb19d7a3e20b8ded55250a2584ed
|
| 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 28, 2026.
Transparency logRelease files / ir_axioms-1.2.2-py3-none-any.whl
| Download URL | ir_axioms-1.2.2-py3-none-any.whl |
|---|---|
| Size | 19.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b806d416edc2b5761ddd5f957e4302436cd71525f5038ace43e3fb9958f79169
|
|
BLAKE2b-256 checksum How to use checksums |
41387a224b267ecf39fcf3f69568da253b97ca811d7458c038747f7deefd4a67
|
| 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 28, 2026.
Transparency log