{% extends "main.html" %} {% block tabs %} {{ super() }}

Fairness benchmarking for generative AI

How do you know your generative AI is fair to our society?

FAIRBench measures how fair a generative model (or a system using one) is to the people it serves, its representational bias, harmful stereotypes, and service-quality disparities, using counterfactual testing and six calibrated fairness metrics.

  • 6 calibrated metrics
  • Text + Image models
  • Thresholds & bands per metric
Example FAIRBench scorecard for a soccer player image benchmark
An actual FAIRBench scorecard, from the soccer player representation benchmark.
{% endblock %} {% block content %}

What an output looks like

One page tells you if you're ready

Instead of a single opaque score, FAIRBench returns a verdict you can act on. The scorecard above reports one image benchmark; here is how to read it.

Overall verdict

A plain-language call at the top (ship, investigate, or do not ship), driven by the worst band across all metrics.

Per-metric bands

Each of the six metrics gets a value, its threshold, and a Pass / Watch / Flag / Fail band, so nothing hides behind an average.

Data-driven findings

Every band comes with the specific numbers behind it (which group, which scenario, how large the gap), pointing straight at the fix.

Honest coverage note

The scorecard states what the evaluation could and could not see, so a clean result is never mistaken for a complete one.

The measurement

Six metrics, each watching a different failure

Fairness is not one number. FAIRBench decomposes it into six signals that together separate a representational problem from a harmful one, and a content problem from a service one.

Pass: equitable, monitor Watch: a gap, investigate Flag: remediate before release Fail: do not release

How it works

From a prompt to a verdict

  1. 1ScenarioA YAML file defines prompts and the sensitive attributes to probe.
  2. 2CounterfactualEach prompt is expanded into demographic variants, changing only the sensitive attribute.
  3. 3ModelVariants go to the model under test: any LLM or image model.
  4. 4EvaluationA stack of local classifiers scores every response; Vision captions images.
  5. 5MetricsThe six fairness metrics compare distributions across variants.
  6. 6ScorecardResults are packaged into bands, reasoning, and recommendations.

Quick install

Run your first audit in minutes

Requires Python 3.11+. Set an API key for the service you want to test, then run a built-in benchmark.

pip install -e ".[dev]"

export ANTHROPIC_API_KEY=sk-ant-...

fairbench run gender_occupation \
    --model anthropic --html report.html

Measure what matters, before it ships.

{% endblock %}