The Problem:
You build a RAG system. It gives an answer. It sounds right.
But is it actually grounded in your data, or just hallucinating with confidence?
A single "correctness" or "relevance" score doesn’t cut it anymore, especially in enterprise, regulated, or governance-heavy environments. We need to know why it failed.
My solution:
Introducing TrustifAI – a framework designed to quantify, explain, and debug the trustworthiness of AI responses.
Instead of pass/fail, it computes a multi-dimensional Trust Score using signals like:
- Evidence Coverage: Is the answer actually supported by retrieved documents?
- Epistemic Consistency: Does the model stay stable across repeated generations?
- Semantic Drift: Did the response drift away from the given context?
- Source Diversity: Is the answer overly dependent on a single document?
- Generation Confidence: Uses token-level log probabilities at inference time to quantify how confident the model was while generating the answer (not after judging it).
Why this matters:
TrustifAI doesn’t just give you a number - it gives you traceability.
It builds Reasoning Graphs (DAGs) and Mermaid visualizations that show why a response was flagged as reliable or suspicious.
How is this different from LLM Evaluation frameworks:
All popular Eval frameworks measure how good your RAG system is, but
TrustifAI tells you why you should (or shouldn’t) trust a specific answer - with explainability in mind.
Since the library is in its early stages, I’d genuinely love community feedback.
Star⭐ the repo if it helps 😄
Get started: pip install trustifai
Github link: https://github.com/Aaryanverma/trustifai

Top comments (0)