CoolFace
Apppublic

Divyamshah/llm-reliability-evaluation

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
App README

LLM Reliability Evaluation Framework

A confidence-calibrated decision gating system that evaluates whether an AI should:

Respond

Ask for clarification

Defer

Remain silent

before invoking an LLM.

๐Ÿ” What This Project Does

Instead of blindly generating responses, this system first decides:

Should the AI act at all?

It uses semantic embeddings + a trained classifier to output:

Decision

Confidence score

Decision margin

Risk category

๐Ÿ— System Architecture

Pipeline:

User Input โ†’ SentenceTransformer Embedding (MiniLM-L6-v2) โ†’ 3-layer PyTorch classifier โ†’ Softmax confidence + margin โ†’ Calibration logic โ†’ Final decision

๐Ÿ“Š Output Signals

Confidence โ†’ Probability of predicted class

Decision Margin โ†’ Gap between top-2 probabilities

Risk Category โ†’ trusted / ambiguous / high_risk / noise

๐Ÿง  Calibration Logic

Rules applied on top of raw model prediction:

Low confidence โ†’ silent

Low margin โ†’ ask_clarify

Empty input โ†’ silent

High confidence + strong margin โ†’ trusted

This ensures controlled AI behavior.

๐Ÿš€ Deployment

Built with PyTorch + SentenceTransformers

Deployed on Hugging Face Spaces (Gradio UI)

Fully interactive reliability evaluation

๐ŸŽฏ Why It Matters

Most AI demos generate text.

This project measures and controls when generation should happen.

Focus: โœ” Reliability โœ” Confidence gating โœ” Safe AI activation โœ” Deployable evaluation system