A professional hallucination detection API for AI responses.
- Extractor (SpaCy) — Named entity mismatch detection (local, ~10ms)
- Scorer (Cross-Encoder via ONNX) — Semantic faithfulness score (local, ~10ms)
- Judge (Groq Llama 3.3 70B) — Natural language explanation (API, ~1s)
- Memory (Supabase) — Audit log persistence + leaderboard
- Backend: FastAPI + Python 3.13
- NLP: SpaCy (NER) + fastembed (ONNX cross-encoder, no PyTorch)
- LLM: Groq Llama-3.3-70b-versatile (zero cost, sub-second)
- Database: Supabase (Postgres)
- Hosting: Render (free tier — 512 MB RAM)
| Method | Path | Description |
|---|---|---|
| GET | /health | Service health check |
| POST | /audit | Run full hallucination audit |
| GET | /leaderboard | Aggregated model scores |
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python -m spacy download en_core_web_sm
cp .env.example .env # fill in your keys
uvicorn main:app --reloadOpen http://localhost:8000/docs for the interactive API docs.
MIT