-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmulti-assertion.yaml
More file actions
30 lines (27 loc) · 923 Bytes
/
multi-assertion.yaml
File metadata and controls
30 lines (27 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Multi-Assertion — Multiple checks on a single agent response
# Demonstrates how to validate different aspects of one response.
name: "Multi-Assertion"
description: "Apply multiple assertions to verify response quality"
agent:
adapter: openai
model: gpt-4o-mini
system: "You are a math tutor. Always show your work step by step."
steps:
- send: "What is 15% of 200?"
assert:
# Must contain the correct answer
- type: contains
value: "30"
# Should show working/steps
- type: regex
pattern: "(step|first|multiply|percent)"
# Should not be excessively long
- type: max-tokens
value: 500
# Should not contain wrong answers
- type: not-contains
value: "25"
# LLM-as-judge: is the explanation clear?
- type: llm-judge
criteria: "The response clearly explains how to calculate 15% of 200"
threshold: 0.8