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 | |
|---|---|---|---|
| refactx-0.1.2.tar.gz | 32.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| refactx-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
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
|