CoolFace
Apppublic

suryagsr/resout-factuality-demo

sourceHugging Facemitupdated 8mo agoView on Hugging Face
0likes
App README

AI Factuality Detection Demo

Team Response Outliers (ResOut) | Data4Good Competition | 1st Place, National Level

Overview

This demo showcases our transformer ensemble system for detecting AI hallucinations in educational Q&A content. The system achieves 99.11% balanced accuracy while reducing costs by 98% compared to pure LLM approaches.

How It Works

  1. 1.Primary Model (DeBERTa-v3-Large): Classifies the response as factual, contradiction, or irrelevant
  2. 2.Secondary Model (RoBERTa-Large): Provides a second opinion
  3. 3.Ensemble Agreement: If both models agree, use that prediction (free - just GPU inference)
  4. 4.LLM Arbitration: If models disagree (~1% of cases), Claude API makes the final decision

The Monty Hall Insight

When models disagree, they still confidently eliminate one class. This makes the LLM's job a binary choice (50% baseline) instead of 3-way (33% baseline) - dramatically improving arbitration accuracy.

Classification Labels

  • —Factual: Answer correctly addresses the question and is supported by context
  • —Contradiction: Answer conflicts with information in the context
  • —Irrelevant: Answer does not address the question

Competition Results

  • —1st Place - Americas West Regional
  • —1st Place - National Championship
  • —99.11% Balanced Accuracy on test set
  • —98% Cost reduction vs pure LLM approach

Technical Details

  • —DeBERTa-v3-Large: 434M parameters, 99.04% validation accuracy
  • —RoBERTa-Large: 355M parameters, 98.34% validation accuracy
  • —LLM Arbitration: Claude Sonnet (only for the ~1% of disagreements)

Try It

  1. 1.Enter a context (optional), question, and answer
  2. 2.Select models and enable/disable ensemble
  3. 3.Click "Classify" to see the result

Built for the INFORMS Data4Good AI Factuality Detection Competition Protecting educational integrity by detecting AI hallucinations