A non-transitory, computer-readable storage medium comprising instructions thereon, wherein the instructions when executed by at least one data processor of a system, cause the system to:
- obtain a set of regulatory guidelines defining one or more operation boundaries of an AI application,
- wherein the AI application is configured to generate, in response to a received input, an outcome and an explanation of how the outcome was determined;
- construct a set of test cases associated with each regulatory guideline in the set of regulatory guidelines,
- wherein each test case maps to a specific scenario derived from the regulatory guidelines,
- wherein each test case comprises:
- (1) a prompt, (2) an expected outcome, and (3) an expected explanation, and
- wherein each test case is configured to test the one or more operation boundaries of the regulatory guidelines;
- evaluate the AI application against the set of test cases to determine compliance of the AI application with the regulatory guidelines by applying a particular test case in the set of test cases to the AI application by:
- supplying the prompt of the particular test case into the AI application,
- responsive to inputting the prompt, receiving, from the AI application, a case-specific outcome and a corresponding case-specific explanation of the case-specific outcome,
- comparing the expected outcome of the particular test case to the case-specific outcome received from the AI application, and
- responsive to the expected outcome of the particular test case satisfying the case-specific outcome received from the AI application, comparing the expected explanation of the particular test case to the corresponding case-specific explanation of the case-specific outcome;
- using the evaluation, generate a first indicator of the AI application indicating compliance of the AI application with the regulatory guidelines using the comparison between the expected outcome of the particular test case and the case-specific outcome received from the AI application;
- and
- using the evaluation, generate a second indicator of the AI application indicating compliance of the AI application with the set of regulatory guidelines using the comparison between the expected explanation of the particular test case and the corresponding case-specific explanation of the case-specific outcome;
- and
- automatically adjusting parameters of the AI application based on the evaluation, the first indicator, and the second indicator,
- wherein adjusting the parameters of the AI application aligns the AI application within the one or more operation boundaries of the set of regulatory guidelines.