Inspiration
More and more companies let AI read CVs, score candidates and build shortlists. The uncomfortable question is simple: would the same qualified person get the same score if only their name, or their graduation year, were different? Most teams can't answer it, because there is no easy, repeatable way to test. We wanted to build that test, and to make the answer readable by an HR manager, not only a data scientist.
What it does
FairScreen audits LLM-based CV screeners for hidden bias in three steps:
Measure. It creates synthetic CVs in matched pairs that are identical except for one signal (a gender-coded name, a name origin, or an age cue), scores both with the same model and prompt, and measures the gap. Fix. It applies mitigations (anonymizing the CV, or a skills-only prompt) and re-runs the exact same test. Prove. It checks that the fix did not break the screener: the model must still rank strong candidates above weak ones.
A dashboard shows the gaps, the before and after, the model comparison and a plain-language verdict: gap found, fix worked, quality kept.
How we built it
Test set. Synthetic CVs across several roles at three quality tiers (strong, average, weak). The tier is our ground truth. Each CV expands into matched variants that change one detail at a time, and an automated test checks that every pair differs only in the intended field. Scoring. Each CV is scored by 2 to 3 LLMs behind one interface, with a fixed prompt and settings, 3 repeats each, results cached so runs can resume. Statistics. For each group pair we compute the mean score gap $$\Delta = \bar{s}A - \bar{s}_B$$ with a 95% bootstrap confidence interval and a paired permutation test. We also report the shortlist-rate ratio against the four-fifths reference, $$R = \frac{\text{selection rate}{\text{lower group}}}{\text{selection rate}_{\text{higher group}}}, \qquad R < 0.8 \Rightarrow \text{flag for review},$$ and apply Holm correction across attributes and models. A gap only counts if it clearly exceeds the noise floor, the score difference we see when the identical CV is scored repeatedly. Accuracy gate. After each mitigation we measure ranking quality against the tier labels (pairwise accuracy and AUC). A fix passes only if accuracy drops by 2 points or less. Stack. Python and FastAPI for scoring and statistics, scipy and statsmodels for the tests, SQLite or Postgres for storage, and Next.js with Tailwind and Recharts for the dashboard.
The audit layer never calls an LLM. It only reads stored scores, so every result is reproducible.
Challenges we ran into
Changing only one thing. If a matched pair differs in anything besides the target signal, the whole result is meaningless. We wrote tests that diff every pair and fail if anything else changed. Telling bias from randomness. LLM scores vary from run to run. Without a noise floor, random variation looks like bias, so we repeat every CV and judge gaps against that baseline. Fairness versus quality. It is easy to equalize scores by making them useless. The accuracy gate exists to catch exactly that. Names are imperfect proxies. A name only hints at gender or origin, so we use several names per group and state this limit openly. Claiming no more than we measured. Every result is scoped to "this model, this prompt, this test set", and a gap is treated as a reason to investigate, not proof of discrimination. Cost and reliability. Hundreds of model calls need retries, caching, budget caps and resumable runs.
Accomplishments that we're proud of
A test that tests itself. We plant a known bias in synthetic scores and check that the audit recovers it, and we run a zero-bias case to make sure it does not cry wolf. The tool is validated before it ever touches a real model. Separating bias from noise. Every gap is judged against a measured noise floor, so a "finding" is never just model randomness. Fairness without the quality trade-off hidden. The accuracy gate means a fix is only called a success if the screener still ranks strong candidates above weak ones. Gap and accuracy are always shown together. Reproducible by design. The audit layer never calls an LLM and every run stores its prompt, model and settings, so anyone can re-run the audit and get the same numbers. One command rebuilds the full demo. Readable by non-experts. A plain-language verdict (gap found, fix worked, quality kept) sits on top, with the statistics one click deeper. Honest claims. Every result is scoped to "this model, this prompt, this test set", and the tool labels simulated data as simulated. A real finding. [Add your strongest real result here, for example: "Model X scored female-coded names [Δ] points lower, and anonymizing the CV cut that gap by [Y]% with accuracy unchanged."]
What we learned
Good fairness testing is mostly good experimental design: controlling variables matters more than the model. Confidence intervals and a noise floor change how results read, and keep us from overclaiming. A fairness fix means little unless it is reported next to what it costs in accuracy. Presenting statistics to non-technical people is its own design problem, and plain language first, detail one click deeper, worked best.
What's next for FairScreen
Let users upload their own screening prompt or model and audit it. Test intersectional cases (for example gender and origin together). Add counterfactual explanations that highlight which CV phrases moved the score. Expand to more attributes and languages, with native-speaker review.
Built With
- fastapi
- next.js
- postgresql
- python
- recharts
- scipy
- sqlalchemy
- sqlite
- statsmodels
- tailwind-css
- typescript