Installation#

Artefactual needs Python 3.11, 3.12 or 3.13 (requires-python = ">=3.11,<3.14"). The floor comes from scikit-learn 1.8, the oldest release that reads the published detectors.

From PyPI#

pip install artefactual

or, in a uv project:

uv add artefactual

The base install pulls in numpy, scikit-learn, skops, pydantic, beartype and huggingface-hub. That is everything needed to load a detector and score responses.

Extras#

Extra

Install

Adds

adapters

pip install "artefactual[adapters]"

langfuse and openai, for scoring Langfuse traces with HallucinationEvaluator

docs

pip install "artefactual[docs]"

Sphinx, MyST-NB and the theme, to build this site

From source#

git clone https://github.com/artefactory/artefactual.git
cd artefactual
uv sync                # the package and the development tools
uv sync --extra docs   # also the documentation toolchain

The version is derived from the git tags, so install from a clone that has them rather than from a source archive.

Check the install#

python -c "import artefactual; print(artefactual.__version__)"

Loading a detector downloads its weights from the Hugging Face Hub on first use and reads them from the local cache afterwards:

from artefactual import WEPR

detector = WEPR.from_pretrained("artefactory/wepr-ministral")
detector.classes_  # array([0, 1])

Next: Using a detector to score a response, or scikit-learn compatibility to use a detector inside scikit-learn tooling.