Skip to main content

Refactx package

Project description

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.

ISWC 2025 Arxiv

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"
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

refactx-0.1.2.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

refactx-0.1.2-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file refactx-0.1.2.tar.gz.

File metadata

  • Download URL: refactx-0.1.2.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for refactx-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0f544e3a5550891dbc137ab49e22becc1a269de3e716e71e025c7d61983c3d5d
MD5 820b0eca85a1ed4f13f8d183bea9a180
BLAKE2b-256 05dda3a84388242434b6b0111625a2b97a30b02397bdb38cd0f437c2e422d0ee

See more details on using hashes here.

File details

Details for the file refactx-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: refactx-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 35.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for refactx-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fde9ec39b089203af009af6512224b964ff49d97d76310fd22e0a84c6b1767ab
MD5 05b1fe2579075a8487be8de056497723
BLAKE2b-256 7dac6f154e61e94bf2e7a5c3a4eb78ebf2dc57a1a1953d815e501afe37d3346a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page