Axiomatic constraints for information retrieval and retrieval-augmented generation.
Project description
↕️ 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). |
sbert |
Use Sentence Transformers for sentence similarity (enabled automatically). |
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 bandit -c pyproject.toml -r . # Security 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.
Project details
Release history Release notifications | RSS feed
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 ir_axioms-1.1.tar.gz.
File metadata
- Download URL: ir_axioms-1.1.tar.gz
- Upload date:
- Size: 29.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae9341ce1072693eb9f640bf9096b8d06398fb083268d83ebc293a8811501739
|
|
| MD5 |
f304c563551dadd3ff178525803b554a
|
|
| BLAKE2b-256 |
4e7426779781f99e7467c9cb6590612754511ac0300dd08208f527d712a615ab
|
Provenance
The following attestation bundles were made for ir_axioms-1.1.tar.gz:
Publisher:
ci.yml on webis-de/ir_axioms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ir_axioms-1.1.tar.gz -
Subject digest:
ae9341ce1072693eb9f640bf9096b8d06398fb083268d83ebc293a8811501739 - Sigstore transparency entry: 405856025
- Sigstore integration time:
-
Permalink:
webis-de/ir_axioms@65baab32c3d8e727f4069495e0134aa461d26d2f -
Branch / Tag:
refs/tags/1.1 - Owner: https://github.com/webis-de
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@65baab32c3d8e727f4069495e0134aa461d26d2f -
Trigger Event:
push
-
Statement type:
File details
Details for the file ir_axioms-1.1-py3-none-any.whl.
File metadata
- Download URL: ir_axioms-1.1-py3-none-any.whl
- Upload date:
- Size: 19.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4071d60b86fa39d840ffe207e902611e50c91ebe2cdb3811e5f286eeeddd59aa
|
|
| MD5 |
4bc6e48e438dcae45fce6ee2dfcb9e17
|
|
| BLAKE2b-256 |
14937398193d8ee66451495aeebec5dbfe4c475f2c551956374b9076b0e6cc96
|
Provenance
The following attestation bundles were made for ir_axioms-1.1-py3-none-any.whl:
Publisher:
ci.yml on webis-de/ir_axioms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ir_axioms-1.1-py3-none-any.whl -
Subject digest:
4071d60b86fa39d840ffe207e902611e50c91ebe2cdb3811e5f286eeeddd59aa - Sigstore transparency entry: 405856033
- Sigstore integration time:
-
Permalink:
webis-de/ir_axioms@65baab32c3d8e727f4069495e0134aa461d26d2f -
Branch / Tag:
refs/tags/1.1 - Owner: https://github.com/webis-de
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@65baab32c3d8e727f4069495e0134aa461d26d2f -
Trigger Event:
push
-
Statement type: