Models

What Is Probabilistic Classification?

A classification approach where the model outputs a probability for each class rather than a single hard label, enabling thresholding, abstention, and calibration.

What Is Probabilistic Classification?

Probabilistic classification is a class of methods that output a probability for each possible class rather than a single hard label. Logistic regression, naive Bayes, calibrated neural networks, and LLM-as-a-judge classifiers all fit. The probabilities support three useful behaviors hard labels cannot: thresholding (pick a decision cutoff per use case), abstention (refuse to label when confidence is low), and calibration (align predicted probabilities with empirical frequencies). In LLM stacks, probabilistic classification appears in intent routing, content moderation, judge-model rubrics that return scores, and any evaluator that emits a 0–1 confidence rather than a boolean pass/fail.

Why It Matters in Production LLM and Agent Systems

Production LLM stacks rely on probabilistic classifiers everywhere — usually without calling them that. An intent router scores user queries across five intents and picks the top one if its probability exceeds 0.7, otherwise routes to a human. A content-moderation guardrail returns a toxicity probability; a request is blocked at 0.95, flagged for review at 0.6–0.95, allowed below 0.6. A judge-model rubric returns a 1–5 quality score that becomes a calibrated probability of “user satisfaction.”

Failures cluster around miscalibration. An ML engineer ships an intent classifier with apparent 92% accuracy on the test set but cannot tune the routing threshold because the model is overconfident — predictions cluster at 0.99 and 0.01 with nothing in between. A product team sets a moderation threshold at 0.8 and watches false-positive rate skyrocket because the model was trained on aggressive labels. An evaluation lead picks F1 as the only metric and misses that recall on a rare class collapsed to 30% because the global F1 looked fine.

In 2026 agent stacks where multi-step decisioning chains compound, an uncalibrated classifier at any step routes inputs into the wrong branch and corrupts every downstream evaluation. Probabilistic classification needs not just accuracy, but calibrated, threshold-aware, and abstention-aware evaluation tied to your actual deployment policy.

How FutureAGI Handles Probabilistic Classifiers

FutureAGI treats probabilistic classifiers — both classical models and LLM-as-a-judge — as first-class artifacts to evaluate. Two surfaces matter.

Evaluator scoring. Many fi.evals evaluators return continuous scores rather than booleans: Toxicity, ContentModeration, BiasDetection, Faithfulness, AnswerRelevancy, Groundedness. These are probabilistic classifiers under the hood — typically a calibrated LLM-as-a-judge with a structured prompt. The engineer plots score distributions per cohort, picks a threshold based on the precision-recall trade-off they want, and configures metric-threshold for the deploy gate. Cohort-level confusion matrices surface where the classifier is over- or under-confident.

Threshold-aware regression eval. When an engineer ships a new prompt or model, FutureAGI compares score distributions, not just point F1. A Dataset.add_evaluation() run against the prior version surfaces threshold-shifted regressions: the same threshold that worked for v3 of the prompt produces different precision/recall on v4 because the score distribution shifted right.

Calibration auditing. A custom CustomEvaluation can wrap a calibration check — bin predicted probabilities, compute empirical accuracy per bin, flag bins where calibration error exceeds a threshold. This catches the “overconfident classifier” failure mode before deployment.

A real workflow: a content-platform team uses fi.evals.Toxicity as a post-guardrail and discovers the classifier scores cluster at 0.05 and 0.95 with very little mid-range, making threshold tuning impossible. They retrain the LLM-as-a-judge with an expanded rubric (“borderline cases must score 0.4–0.6”), re-run regression eval, and confirm the score histogram now spans the range usefully. FutureAGI’s approach is to make the score a first-class object — unlike Ragas, where many metrics return aggregate values without per-row distributions, FutureAGI exposes the row-level score so you can inspect calibration.

How to Measure or Detect It

Calibrated probabilistic classifiers are measured through threshold-aware metrics:

  • ROC-AUC: threshold-free measure of ranking quality; complementary to a chosen threshold.
  • Calibration error (ECE): average gap between predicted probability and empirical accuracy per bin.
  • Precision-recall at threshold: the operational pair you actually deploy on.
  • Toxicity / ContentModeration row-level scores: continuous values you bin to inspect calibration.
  • Abstention rate: percentage of inputs scored in a configurable uncertainty band; tracked alongside precision and recall.
from fi.evals import Toxicity

tox = Toxicity()
result = tox.evaluate(output="That comment was unnecessarily hostile.")
print(result.score, result.reason)
# Calibrate: bin scores from a labeled cohort and compute ECE

Common Mistakes

  • Reporting only accuracy. Accuracy hides class imbalance and threshold choice; track precision, recall, and ECE per class.
  • Picking a threshold from the validation set. Production class balance and cost asymmetry often differ; tune threshold on a hold-out cohort that matches deployment.
  • Using LLM-as-a-judge without calibration probing. Judge models are often overconfident; bin scores and inspect empirical accuracy per bin.
  • Ignoring abstention. A useful classifier sometimes refuses; force every input into a label and you bake noise into downstream metrics.
  • Conflating probability with confidence. Softmax outputs are not necessarily calibrated; verify with reliability diagrams before trusting them as confidence scores.

Frequently Asked Questions

What is probabilistic classification?

Probabilistic classification is the practice of producing a probability for each possible class instead of one hard label, allowing thresholding, abstention, calibration, and confidence-aware downstream decisions.

How is probabilistic classification different from hard classification?

Hard classification returns one label per input. Probabilistic classification returns a probability per class, so you can pick a threshold per use case, abstain on uncertain inputs, and calibrate scores to match real-world frequencies.

How does FutureAGI evaluate probabilistic classifiers?

FutureAGI's evaluators consume the score from probabilistic classifiers — including LLM-as-a-judge — and apply thresholds. Evaluators like ContentModeration and Toxicity surface continuous scores you can chart, calibrate, and gate on.