RAI Acceptance Testing

Summary: RAI acceptance testing is conducted to determine whether the ethical requirements of an AI system are met.

Type of pattern: Process pattern

Type of objective: Trustworthiness

Target users: Testers, AI users, AI consumers 

Impacted stakeholders: Business analysts, developers, data scientists

Lifecycle stages: Testing

Relevant AI ethics principles: Human, societal and environmental wellbeing, human-centered values, fairness, privacy protection and security, reliability and safety, transparency and explainability, contestability, accountability

Mapping to AI regulations/standards: EU AI Act, ISO/IEC 42001:2023 Standard.

Context: AI ethics principles are designed to ensure the AI systems and their development processes are trustworthy and responsible. These principles, which are very high level, need to be captured through specific ethical requirements that can be adopted by the development team. The requirements serve as a set of agreed-upon commitments that guides the development of AI systems.

Problem: How can we make sure that the ethical requirements have been met?

Solution: RAI acceptance testing, such as bias testing, is designed to detect design flaws in RAI systems and verify that ethical requirements have been met—for example, whether the data pipeline has appropriate privacy control, fairness testing for training, and validation data. In an agile development process, ethical requirements can be framed as ethical user stories and associated with corresponding acceptance tests. These tests serve as a contract between the customer and development team, and can be used to quantify the behavior of the AI system. The acceptance criteria for each ethical principle should be clearly defined in a testable way. The history of ethical acceptance testing should be recorded and tracked, including how and by whom the ethical issues were addressed. A testing leader may be appointed to lead the ethical acceptance testing for each principle. For example, if bias is detected at runtime, the monitoring reports are returned to the bias testing leader for review.

Benefits: 

  • Measurement of ethical requirements: RAI acceptance tests help to capture the ethical requirements and measure to the extent to which the AI system meets the requirements.
  • Improved users’ confidence: RAI acceptance tests ensure that the decisions and behaviours of AI systems are consistent with AI ethics principles.

Drawbacks: 

  • Limited maintainability: RAI acceptance tests may require frequent update as ethical requirements evolve over time.
  • Limited coverage: RAI acceptance tests may not be able to cover all possible ethical concerns and scenarios.

Related patterns:

  • RAI user story: In the agile process, the customer can write the acceptance tests before the development team implements the ethical user story.
  • RAI assessment for test cases: The ethical quality of all the test cases designed for ethical acceptance testing should be assessed.

Known uses: