-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathevaluation_data.yaml
More file actions
199 lines (182 loc) · 6.31 KB
/
Copy pathevaluation_data.yaml
File metadata and controls
199 lines (182 loc) · 6.31 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# Lightspeed Evaluation Framework - Sample/Mock Data
- conversation_group_id: conv_group_1
description: conversation group description
tag: basic # Tag for grouping eval conversations (default: "eval")
conversation_metrics: []
conversation_metrics_metadata: {}
turns:
- turn_id: turn_id1
query: User query
attachments: null
response: API response
tool_calls: null
contexts:
- Context 1
- Context 2
expected_response: Expected Response
expected_tool_calls: null
turn_metrics:
- ragas:faithfulness
- ragas:response_relevancy
- ragas:context_utilization
turn_metrics_metadata:
ragas:faithfulness:
threshold: 0.99
verify_script: null
setup_script: null
cleanup_script: null
- conversation_group_id: conv_group_2
description: conversation group description
conversation_metrics: []
conversation_metrics_metadata: {}
turns:
- turn_id: turn_id1
query: User Query
response: Sample response based on context # Required when API disabled
contexts:
- Context 1
expected_response: Expected Response
turn_metrics:
- ragas:context_recall
- ragas:context_relevance
- ragas:context_precision
- conversation_group_id: conv_group_3
description: conversation group description
conversation_metrics:
- deepeval:conversation_completeness
- deepeval:conversation_relevancy
turns:
- turn_id: turn_id1 # Skip turn-level evaluation
query: User Query 1
response: Response to query 1 # Required for conversation metrics
turn_metrics: []
- turn_id: turn_id2 # Default evaluation
query: User Query 2
response: Response to query 2 # Required for conversation metrics
- conversation_group_id: tool_eval_example
description: Example of tool call evaluation with direct and regex matching
tag: tools
turns:
- turn_id: turn_id1
query: Get all pods in the default namespace
tool_calls:
-
- tool_name: oc_get
arguments:
kind: pod
namespace: default
expected_tool_calls:
-
- tool_name: oc_get
arguments:
kind: pod
namespace: default
turn_metrics:
- custom:tool_eval
- turn_id: turn_id2
query: Get all pods in the openshift-lightspeed namespace
tool_calls:
-
- tool_name: oc_get
arguments:
kind: pod
namespace: openshift-lightspeed
expected_tool_calls:
-
- tool_name: oc_get
arguments:
kind: pod
namespace: openshift-light.* # Regex pattern for flexible matching
turn_metrics:
- custom:tool_eval
- conversation_group_id: tool_eval_with_result
description: Example of tool call evaluation including result validation
tag: tools
turns:
- turn_id: turn_id1
query: Get the status of pod nginx-123 in the default namespace
tool_calls:
-
- tool_name: oc_get
arguments:
kind: pod
name: nginx-123
namespace: default
result: "pod/nginx-123 Running 1/1"
expected_tool_calls:
-
- tool_name: oc_get
arguments:
kind: pod
name: nginx-.*
namespace: default
result: ".*Running.*" # Regex pattern to verify pod is running
turn_metrics:
- custom:tool_eval
- turn_id: turn_id2
query: Create a new namespace called test-ns
tool_calls:
-
- tool_name: oc_create
arguments:
kind: namespace
name: test-ns
result: "namespace/test-ns created"
expected_tool_calls:
-
- tool_name: oc_create
arguments:
kind: namespace
name: test-ns
result: ".*created" # Verify creation succeeded
turn_metrics:
- custom:tool_eval
- conversation_group_id: script_eval_example
description: Example of script-based evaluation for namespace testing
tag: infrastructure
setup_script: sample_scripts/setup.sh
cleanup_script: sample_scripts/cleanup.sh
turns:
- turn_id: turn_id1
query: Create a namespace called ols-test-ns
turn_metrics:
- script:action_eval
verify_script: sample_scripts/verify.sh
# NLP Metrics Examples - Text comparison without LLM
# These metrics compare response vs expected_response using traditional NLP techniques
#
# REQUIRED: Install optional dependencies first:
# pip install 'lightspeed-evaluation[nlp-metrics]'
# OR: pip install sacrebleu rouge-score rapidfuzz
- conversation_group_id: nlp_metrics_basic
description: Basic NLP metrics - BLEU, ROUGE, and Semantic Similarity with defaults
turns:
- turn_id: turn_id1
query: What is the capital of France?
response: The capital of France is Paris, a major European city.
expected_response: Paris is the capital of France.
turn_metrics:
- nlp:bleu # N-gram overlap (0-1, higher = more similar)
- nlp:rouge # Recall-oriented overlap (default: rougeL, fmeasure)
# - nlp:semantic_similarity_distance # String distance (NOT recommended for LLM outputs)
- conversation_group_id: nlp_metrics_custom_config
description: NLP metrics with custom configuration options
turns:
- turn_id: turn_id1
query: Explain how to deploy a pod in Kubernetes
response: Use kubectl apply -f pod.yaml to deploy a pod to your Kubernetes cluster.
expected_response: To deploy a pod in Kubernetes, use the kubectl apply command with your pod manifest file.
turn_metrics:
- nlp:bleu
- nlp:rouge
- nlp:semantic_similarity_distance # Caution: measures character distance, not meaning
turn_metrics_metadata:
nlp:bleu:
threshold: 0.3 # Custom threshold for BLEU
max_ngram: 2 # Use bigrams instead of default 4-grams (options: 1-4)
nlp:rouge:
threshold: 0.3
rouge_type: rouge1 # Options: rouge1, rouge2, rougeL, rougeLsum
nlp:semantic_similarity_distance:
threshold: 0.6
distance_measure: jaro_winkler # Options: levenshtein, hamming, jaro, jaro_winkler