Metadata-Version: 2.4
Name: hallx
Version: 1.0.1
Summary: Lightweight hallucination risk scoring for LLM outputs
Author: Dhanush Kandhan
Maintainer: Dhanush Kandhan
License-Expression: MIT
Project-URL: Homepage, https://github.com/dhanushk-offl/hallx
Project-URL: Repository, https://github.com/dhanushk-offl/hallx
Project-URL: Issues, https://github.com/dhanushk-offl/hallx/issues
Project-URL: Documentation, https://github.com/dhanushk-offl/hallx#readme
Keywords: llm,hallucination,validation,scoring,ai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jsonschema<5.0.0,>=4.0.0
Requires-Dist: rapidfuzz<4.0.0,>=3.0.0
Provides-Extra: dev
Requires-Dist: pytest<9.0.0,>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio<1.0.0,>=0.23.0; extra == "dev"
Requires-Dist: build<2.0.0,>=1.2.0; extra == "dev"
Requires-Dist: twine<7.0.0,>=6.0.0; extra == "dev"
Dynamic: license-file

﻿<h1 align="center">hallx</h1>

<p align="center">
  <img src="https://res.cloudinary.com/dwir71gi2/image/upload/v1774898674/Untitled_2_b5xwxj.png" alt="hallx logo" style="width:50%; max-width:720px; height:auto;">
</p>

<p align="center">
  Lightweight hallucination-risk scoring for production LLM pipelines
</p>

## What Is Hallx

Hallx is a practical guardrail layer that evaluates LLM responses before they are trusted in downstream systems.

It scores responses using:
- `schema` validity
- `consistency` across repeated generations
- `grounding` against provided context

It returns:
- `confidence`
- `risk_level`
- `issues`
- `recommendation`

## Quick Start

```bash
pip install hallx
```

```python
from hallx import Hallx

checker = Hallx(profile="balanced")
result = checker.check(prompt="p", response="r", context=["c"])
print(result.confidence, result.risk_level, result.recommendation)
```

## Workflow

<p align="center">
  <img src="docs/images/hallx-working-flow.svg" alt="Hallx workflow" width="100%">
</p>

## Essential Links

### Languages
- [English](docs/README.en.md)
- [Tamil](docs/README.ta.md)
- [Malayalam](docs/README.ml.md)
- [Hindi](docs/README.hi.md)
- [Kannada](docs/README.kn.md)
- [German](docs/README.de.md)
- [Japanese](docs/README.ja.md)
- [Chinese](docs/README.zh.md)

### Community
- [Contributing](CONTRIBUTING.md)
- [GitHub Sponsors](https://github.com/sponsors/dhanushk-offl)
- [Buy Me a Coffee](https://buymeacoffee.com/itzmedhanu)

