Parameters
- Application: The application to be evaluated, it’s the same as the application id in application setup.
- Messages: The messages to be evaluated, it can be
user,assistant, orboth, optionally you can pass thesystemmessage. - Policy IDs: The policy ids to be evaluated, it’s a list of policy ids in the same order as the policies in the application. Your application should have these policies set up (see policies setup) or passed by
policiesparameter. - Policies: List of policies to be evaluated, see policies setup for more details.
- Correction: If a policy is violated and
correction_enabledis set totrue, the LLM will be corrected by an automatic correction, or a manual override response defined in the policy. - Fail Fast: If
fail_fastis set totrue, it will stop the evaluation once any policy is violated.
Evaluation Flow
Once the policies set is enabled or passed bypolicy_ids in API request, it will be checked on every evaluation request against the provided messages (user, assistant, or both). The policies have a priority order, first in the list has the highest priority. If fail_fastis set totrue`, it will stop the evaluation once any policy is violated.
Here is the policy flow:
