...
The AI Assertor is designed to support multiple validation assertions to create complex verifications. It can be added via the Add Output wizard or as a stand-alone Standard test.
...
- Click Add in the AI Assertor’s Configuration tab. A new assertion will be added.
- Assertions are automatically assigned a name, but you can change this to make it easier to track what multiple prompts are meant to do.
- Enter the assertion you want the AI to validate in the AI Assertor Prompt field.
Tip title Best Practices The best results are generally achieved when assertions are short and clear. If you have multiple conditions that you want to validate, it is recommended that you create multiple short assertions rather than one longer one. Not only will this be less likely to confuse the AI, but it will also make targeted changes to your assertions easier.
In addition, there is no need to request that the AI "check" or "verify" anything. Simply state the expectation, for example, "The cart Cart has two items."
- Save your changes.
...
If you want to change your assertion, do so and save your changes. Clicking Evaluate again will query the LLM with the updated assertion against the previous input. In this way, you can fine-tune your assertions until they are functioning the way you want. If you find the AI struggling to fully comprehend your assertion, providing it with an example or two of a passing or failing condition can help.