anulum/director-ai
Real-time LLM hallucination guardrail — NLI + RAG fact-checking with token-level streaming halt. Drop-in for any LLM backend.
What's novel
Real-time LLM hallucination guardrail — NLI + RAG fact-checking with token-level streaming halt. Drop-in for any LLM backend.
Code Analysis
8 files read · 4 roundsA production-grade LLM hallucination guardrail that scores response coherence using NLI-based logical and factual divergence (DeBERTa/ONNX), with streaming contradiction detection, RAG grounding, online calibration, and multi-provider SDK integration.
Strengths
Genuinely deep implementation with real NLI inference pipelines (FactCG template, batched PyTorch/ONNX, sharded multi-GPU), a well-structured multi-backend architecture with clean mixin composition, and a sophisticated production guard combining conformal prediction, online calibration, and sector-specific policy enforcement. The codebase demonstrates real engineering maturity with thread-safe tokenization, memory-bounded batching, input sanitization against adversarial zero-width attacks, and a
Weaknesses
The sheer breadth (628 core files, 2546 total) creates significant cognitive overhead and the CoherenceScorer constructor has 30+ parameters with many interdependent tuning knobs that are hard to configure correctly. The multi-language polyglot stack (Python, Rust, Go, Julia, Lean, WASM, TypeScript) adds substantial maintenance burden, and the tiered licensing system (free/pro/full) with lazy paid-module imports adds complexity to the import surface.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
386
Contributors
2
Files
646
Active weeks
5
Repository
Language
Python
Stars
2
Forks
0
License
AGPL-3.0