Skip to main content

Bias testing for AI agents that make decisions about people

An AI agent that screens, prices or approves for people needs bias tests on its outcomes, reasoning and tool use. What to test, with what data, and when.

Share -
A man in glasses and a camel blazer sits at a desk while cyan facial scan markers frame his face and a holographic panel shows a profile silhouette and assessment readouts.

Bias testing for an AI agent means checking whether people in different groups get different outcomes for the same facts. Run paired test cases that change only a personal attribute, compare outcomes across groups on realistic cases, and check the agent's reasoning and tool calls, not just its final answer. Test before launch, then keep measuring in production.

Why agents need their own bias tests

A classic scoring model takes fixed inputs and returns a score, so bias testing looks at one output. An agent is different. It decides which records to look up, which questions to ask, which tool to call and when to hand a case to a person. Unfair treatment can enter at any of those steps, even when the final decision looks reasonable.

An agent can also pick up signals you did not give it. A name, a postcode, a writing style or a gap in an employment history can stand in for a protected characteristic. Removing the protected field from the prompt does not remove the bias if the model can infer it from everything else.

Depending on the jurisdiction and use, equality and data protection laws can apply to agents that shape decisions about people. Under the EU AI Act, listed uses such as recruitment and creditworthiness assessment can be high-risk. Article 10 sets data governance requirements for providers, including examining relevant datasets for biases and taking measures to detect, prevent and mitigate them. Bias testing can help document that work.

Decide what fair means for this decision

Before writing a test, agree what you are measuring. Different fairness measures can conflict, so this is a business and legal decision, not only an engineering one.

  • Equal outcomes: do groups receive approvals, offers or escalations at similar rates?
  • Equal error: when the agent is wrong, is it wrong as often, and in the same direction, for each group?
  • Consistent treatment: do two cases that differ only in a personal attribute get the same result?

Record which groups matter for the decision, which measure you will use and what gap would stop a release. Put that record next to your DPIA for the agent, because both describe the same risk to people.

Build the test set

Paired cases

Take a realistic case and create copies that change one attribute: the name, the stated gender, the age, the nationality, the address. Everything else stays identical. Repeat each pair with the same model settings and tool data, and check whether the differences persist. One changed outcome is a signal to investigate. Paired cases are easy to explain to a reviewer.

Realistic case mixes

Paired cases can test a specific proxy, such as a name or postcode, but they miss proxies and combinations you did not vary. Use a larger set of cases that resemble real traffic to compare outcomes across groups, using only group information you may lawfully process. Where real data cannot be used, synthetic test data can fill gaps, but check that it carries the patterns real applicants and customers show, or the test will be too easy.

Conversations, not single prompts

Many agents gather facts over several turns. Test whole conversations, including the follow-up questions the agent chooses to ask. An agent that asks one group for more documents than another treats them differently, even if the final decision is the same.

What to look at in each run

Score each run on the final decision, and also on the path the agent took:

  • the tools it called and the records it retrieved
  • the questions it asked and the information it requested
  • whether it escalated to a person, and how quickly
  • the reason it gave, and whether that reason holds for every group

Your agent evals already capture much of this. Add the group label to each test case so the same results can be broken down by group, and look for gaps in escalation and follow-up questions as well as in outcomes.

Fixing what the tests find

When a test fails, find the step that caused it before changing anything. Common fixes include:

  • removing fields from the context that act as proxies and are not needed for the decision
  • rewriting instructions so the criteria are explicit and the same for every case
  • narrowing tools so the agent cannot retrieve data it should not weigh
  • sending borderline or low-confidence cases to a human reviewer with the facts laid out neutrally

Re-run the full bias suite after every fix. A change that closes one gap can open another.

Keep testing after launch

Bias can appear after launch when the model, the prompt, a tool or the mix of users changes. Treat the bias suite as part of your release checks, so a prompt change or model switch cannot ship without it. In production, track outcomes and escalations by group where you lawfully can, and alert on gaps alongside your other production monitoring.

Keep the test sets, results and decisions in one place. When a regulator, an auditor or a customer asks how you know the agent treats people fairly, that record is your answer.

If you are building an AI agent that makes decisions about people and want help designing its bias tests, talk to our team.

Frequently asked questions

Can we test for bias without collecting protected characteristics?

Partly. Paired cases need no real personal data, because you create the variations yourself. Measuring outcome gaps across real users usually needs some group information, which raises data protection questions. Use synthetic cases where they can answer the question. Before collecting or using real group data, confirm the applicable legal basis and safeguards with your data protection officer. Voluntary collection alone does not establish that processing is lawful.

Is removing names and gender from the prompt enough?

No. Models can infer protected characteristics from postcodes, writing style, education history, employment gaps and other details. Removing the obvious fields is a sensible first step, but it does not prove the agent is fair. You still need paired tests and outcome comparisons on realistic cases to see whether proxies are shaping the decision. Remove proxies that the decision does not genuinely need.

Who should sign off on bias test results?

The team that owns the decision should, not only the engineers. A product or business owner decides which fairness measure applies and what gap is acceptable, legal or compliance checks that against the law, and engineering shows the evidence. Record the sign-off with the release, so anyone reviewing the agent later can see who accepted which result and why.

How often should we rerun bias tests?

Rerun the full suite whenever the model, the instructions, a tool or the data the agent can reach changes, and before any wider rollout. Between releases, monitor outcomes and escalations by group in production and investigate any gap that grows. A scheduled review, tied to your regular access or risk reviews, catches drift that no single change explains.

Share this post

Contact us to build the right product

Talk to our engineers about your application, the systems it connects to, and what you want to build next.

Get in touch
Two people discussing work with a laptop