ReFactX is a scalable method that enables LLMs to access external knowledge without depending on retrievers or auxiliary models. It uses constrained generation with a pre-built prefix-tree index. During inference, to acquire external knowledge, the LLM generates facts with constrained generation which allows only sequences of tokens that form an existing fact.
Install and Try
pip install refactx[torch]
Quick example (print package version)
import refactx
print(refactx.__version__)
Cite
@InProceedings{10.1007/978-3-032-09527-5_16,
author="Pozzi, Riccardo
and Palmonari, Matteo
and Coletta, Andrea
and Bellomarini, Luigi
and Lehmann, Jens
and Vahdati, Sahar",
editor="Garijo, Daniel
and Kirrane, Sabrina
and Salatino, Angelo
and Shimizu, Cogan
and Acosta, Maribel
and Nuzzolese, Andrea Giovanni
and Ferrada, Sebasti{\'a}n
and Soulard, Thibaut
and Kozaki, Kouji
and Takeda, Hideaki
and Gentile, Anna Lisa",
title="ReFactX: Scalable Reasoning with Reliable Facts via Constrained Generation",
booktitle="The Semantic Web -- ISWC 2025",
year="2026",
publisher="Springer Nature Switzerland",
address="Cham",
pages="290--308",
isbn="978-3-032-09527-5",
doi="10.1007/978-3-032-09527-5_16",
url="https://doi.org/10.1007/978-3-032-09527-5_16"
}
Metadata
Release files for refactx 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| refactx-0.1.2.tar.gz | 32.2 kB | Without provenance | Details for refactx-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| refactx-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for refactx-0.1.2-py3-none-any.whl |
Total release size: 67.3 kB
Release files / refactx-0.1.2.tar.gz
| Download URL | refactx-0.1.2.tar.gz |
|---|---|
| Size | 32.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f544e3a5550891dbc137ab49e22becc1a269de3e716e71e025c7d61983c3d5d
|
|
BLAKE2b-256 checksum How to use checksums |
05dda3a84388242434b6b0111625a2b97a30b02397bdb38cd0f437c2e422d0ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / refactx-0.1.2-py3-none-any.whl
| Download URL | refactx-0.1.2-py3-none-any.whl |
|---|---|
| Size | 35.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fde9ec39b089203af009af6512224b964ff49d97d76310fd22e0a84c6b1767ab
|
|
BLAKE2b-256 checksum How to use checksums |
7dac6f154e61e94bf2e7a5c3a4eb78ebf2dc57a1a1953d815e501afe37d3346a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for refactx 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.