Skip to main content

CI status Code coverage Documentation 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.

Refer to the ir_axioms documentation for:

TL;DR

To get started without reading the documentation, follow these steps:

  1. Install the package from PyPI:

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

    python -m spacy download en_core_web_sm
    
  3. Load and combine axioms:

    from ir_axioms.axiom import TFC1, PROX1, ORIG
    
    axiom = (TFC1() & PROX1()) | ORIG()
    
  4. Define some test data:

    from ir_axioms.model import Query, Document
    
    query = Query(id="q1", text="axiomatic information retrieval")
    documents = [
       Document(id="d1", text="Retrieval axioms formalize constraints for retrieval models.", rank=1),
       Document(id="d2", text="Axiomatic information retrieval: axiomatic constraints guide retrieval.", rank=2),
    ]
    
  5. Compute axiom preferences or re-rank documents:

    axiom.preferences(input=query, outputs=documents)
    axiom.rerank_kwiksort(input=query, ranking=documents)
    

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! Get started by following our development guides.

License

This repository is released under the MIT license. Files in the data/ directory are exempt from this license. If you use ir_axioms in your research, consider citing us.

Metadata

Release files for ir-axioms 1.2.4

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.4
File Size Uploaded
ir_axioms-1.2.4.tar.gz 28.7 MB Details

Built distribution (wheel)

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

Total release size: 48.6 MB

Release files / ir_axioms-1.2.4.tar.gz

Download URL ir_axioms-1.2.4.tar.gz
Size 28.7 MB
Tags Source
SHA-256 checksum
How to use checksums
e7136165a8638ba9a71ce7def0092b2b2d7b2214d180418722597e2637979ae9
BLAKE2b-256 checksum
How to use checksums
5fd00f6299c1d403e727d62f030a0954d4a00683f4bc52ecf83da1117990b8d6
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 Oct 16, 2026.

Transparency log

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

Download URL ir_axioms-1.2.4-py3-none-any.whl
Size 20.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
492af9cda5079d5d5e29cfd8cd60f0f45eae966de9784493a90434d39ade46d8
BLAKE2b-256 checksum
How to use checksums
7f6556b1acf869a33cb3fb52ac2e18c4b6fbcf37cb57096d4480a7032adfccb3
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 Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.5

2 release files

This release

1.2.4 This release

2 release files

1.2.2

2 release files

1.2.1

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