Hi bobbychick,
To address the issues you're encountering with non-deterministic assistant behavior, consider setting up evaluations that focus on flexible, outcome-based criteria rather than strict turn counts. Here's how you can implement this:
1. **Use Pattern Matching**: Employ regex patterns to allow for slight variations in assistant responses. This way, the evaluation can tolerate additional lines or minor changes in phrasing.
2. **Flexible Tool Call Validation**: Instead of exact timing, focus on whether the correct tool was called at any point during the conversation. Use regex validation to ensure the tool name appears in the sequence of tool calls rather than at a specific turn.
3. **Outcome-Based AI Judges**: Use AI-powered judges to evaluate the semantic correctness of the conversation's outcome. This allows you to focus on achieving the correct end state or intent fulfillment, regardless of intermediate variations.
4. **Continue Plan**: Leverage the
continuePlan
feature to define subsequent actions when a test fails at certain points, which allows more holistic evaluation of the assistant's behavior.
For more detailed guidance, you can refer to the [Advanced Eval Testing guide](
https://docs.vapi.ai/observability/evals-advanced), which provides examples of using regex and AI judges for flexible evaluations. You can also consider creating test suites that encapsulate broader criteria and use test results to refine your evaluation strategy further.