RIDI
Allocation identity for capacity-limited AI
See what aggregate evaluation can miss: who actually received the scarce slots.
PyPI · Open in Colab · 60-second Quick Start · Python API · Reporting checklist · Paper & evidence
The one-line idea
Performance, fairness, calibration and ranking metrics remain necessary. RIDI asks a different question at the score-to-action boundary:
Which identities occupy the finite queue, shortlist or context window—and did those identities change?
Two systems can be exactly indistinguishable under a declared audit while assigning scarce slots to different identities. In the preregistered RAG experiment behind this project, that difference sometimes changed the downstream AI decision itself.
Install and use it in seconds
pip install ridi-audit
ridi-audit demo
Already have two selected lists?
from ridi_audit import compare_allocations
reference = ["doc-1", "doc-2", "doc-3", "doc-4"]
updated = ["doc-1", "doc-2", "doc-9", "doc-4"]
report = compare_allocations(reference, updated)
print(report)
RIDI Allocation Comparison
--------------------------
Before size: 4
After size: 4
Overlap: 3
Changed slots: 1
RIDI: 0.400000
This is the shortest path for RAG contexts, shortlists, alert queues, remediation lists and other realized top-k allocations.
Have paired candidate scores?
import pandas as pd
from ridi_audit import audit
before = pd.read_csv("before.csv")
after = pd.read_csv("after.csv")
report = audit(before, after, k=[10, 50, 100])
controlled = report.control(k=100, eta=0.001)
What RIDI adds
| You already report | RIDI adds |
|---|---|
| performance / accuracy | whether the identities receiving action changed |
| group fairness | realized membership change inside or across groups |
| rank correlation | finite top-k membership stability |
| retrieval quality | which passages actually entered the context window |
| model/version comparison | a direct allocation-level comparator |
For equal-size selected sets A and B:
RIDI(A, B) = 1 - |A ∩ B| / |A ∪ B|
RIDI is not a replacement for AUROC, precision, recall, nDCG, calibration, robustness, safety or fairness. It makes realized membership observable.
Evidence behind the project
| Test | Current result |
|---|---|
| Preregistered RAG, 800 queries | Exact registered retrieval-audit equivalence with 17.27% benchmark-defined correctness divergence at the primary condition (95% CI 14.60–20.03%) |
| SciFact 275 | Same positive passage, rank and registered retrieval metrics; identity substitution changes SUPPORTS → REFUTES; order-only control remains SUPPORTS |
| EPSS production update | 565 / 1,000 priorities changed (RIDI=0.722) vs adjacent same-version controls of 0 and 7 |
| Exact identity–utility frontier | Separates necessary from avoidable turnover under an explicit utility-regret budget, with no retraining |
Most RAG benchmark-defined outcomes remained stable. The claim is behavioral non-equivalence can exist inside an exactly audit-equivalent class, not that every allocation change is harmful or that all AI systems are fragile.
Independent verification status — 4 Sep 2026
- The sealed EPSS numerical workflow was reproduced by two independent external executors in separate environments.
- SciFact 275 was independently regenerated twice, blind, by external executors using distinct serving environments.
- Mohammed Hamdan: all registered retrieval-audit quantities remained identical; reference and identity control were
SUPPORTS(the identity output was byte-identical to reference), the order-only permutation remainedSUPPORTS, and the audit-equivalent identity substitution producedREFUTES. His run used the same frozen inputs and prompt conditioning but, because of hardware limits, used a disclosed Q4_K_Mqwen3:8bllama.cpp/Ollama serving path rather than the frozen bf16 Hugging Face pipeline. - Théophile Ossard: independently reproduced the same substantive
SUPPORTSversusREFUTESpattern on a distinct GPU/software stack. His regenerated reference prefixed the verdict withVerdict:, exposing a strict-parser boundary that is retained transparently. - These are independent computational regenerations, not a CODECHECK certificate. Community CODECHECK request #208 is registered; formal checking has not begun.
Read the evidence and boundaries →
Designed to drop into research workflows
Framework-agnostic. RIDI needs identities—and optionally scores—not a particular model library.
Two entry points. compare_allocations() for selected IDs; audit() for paired score tables.
Publication-ready output. Reports can emit dictionaries or Markdown records.
Control, not only measurement. AuditReport.control() exposes the exact identity–utility frontier.
Reproducible by default. Deterministic tie handling, CI on Python 3.10–3.12, locked research workflows, negative results retained, and explicit verification boundaries.
Common settings: RAG and information retrieval · cybersecurity remediation · clinical alerts · fraud/compliance triage · inspection queues · hiring/shortlisting · grant review · moderation · any budget-constrained ranking or finite action set.
Use it in a paper
The Allocation Identity Reporting Checklist covers capacity, selection rule, comparator, identity metrics, controls, conventional evaluation, privacy and downstream outcomes.
A minimal methods sentence is:
We audited allocation identity at the prespecified capacity by reporting selected-set overlap, changed slots and RIDI alongside the domain’s conventional evaluation metrics.
Adapt it to the design; do not claim endpoints you did not test.
Replicate it. Challenge it. Extend it.
Independent reproductions, boundary cases, discrepancies and null results are welcome. Use the dedicated GitHub issue forms for an Independent replication or a New domain application.
Current manuscript
Identical audits can yield different AI decisions
The public repository is synchronized to the current science/product lock as of 4 Sep 2026. The manuscript is prepared for journal submission; it is not peer reviewed, accepted or published.
Registered RxNorm and Open Targets failures remain part of the project record to delimit the claim. Allocation identity alone does not establish correctness, fairness, causal harm, benefit, clinical utility or model superiority.
- Paper overview
- RAG preregistration
- Reproducibility guide
- Numerical provenance
- CODECHECK request #208
Citation
If you use RIDI or ridi-audit, cite the software using CITATION.cff and the accompanying manuscript when a public bibliographic record is available.
Adeeb Noor
Department of Information Technology, Faculty of Computing and Information Technology
King Abdulaziz University, Jeddah, Saudi Arabia
ORCID: 0000-0002-8251-1853
Metadata
Release files for ridi-audit 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ridi_audit-1.1.1.tar.gz | 21.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ridi_audit-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.3 kB
Release files / ridi_audit-1.1.1.tar.gz
| Download URL | ridi_audit-1.1.1.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2af6f98171cb5b5a307911eeca2824dd401e014d595c6af69c94ddcf3d5440e
|
|
BLAKE2b-256 checksum How to use checksums |
4901b3518c5ba09f2ae6526582570fe1bb6b097e1bc91b6cead5b5aa46e6f87d
|
| 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 4, 2026.
Transparency logRelease files / ridi_audit-1.1.1-py3-none-any.whl
| Download URL | ridi_audit-1.1.1-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b91dcf6cf227a3a579d88318029c02d78e378d16510a2223d17223acbf7bb6f7
|
|
BLAKE2b-256 checksum How to use checksums |
1341eac051040225addcb6431764cfa9cb13737d734663c13050c4950ba181ee
|
| 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 4, 2026.
Transparency logSecurity for ridi-audit 1.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ridi_audit-1.1.1.tar.gz
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 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.