evals-lab 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +96 -0
- package/README.md +4 -4
- package/bin/evals-lab.js +9 -1
- package/bin/lab-file.js +97 -0
- package/bin/run.js +1 -1
- package/lab/VERSION +1 -1
- package/lab/demo/CREDITS.md +37 -3
- package/lab/demo/datasets/demo-1.json +2 -2
- package/lab/demo/datasets/demo-2.json +2 -2
- package/lab/demo/datasets/sentiment.json +383 -0
- package/lab/demo/datasets/weather-alerts.json +61 -0
- package/lab/demo/datasets/wordings.json +39 -0
- package/lab/demo/manifest.json +3 -3
- package/lab/demo/pipelines/demo-1.json +4 -4
- package/lab/demo/pipelines/demo-2.json +4 -4
- package/lab/demo/pipelines/sentiment.json +65 -0
- package/lab/demo/pipelines/weather-alerts.json +66 -0
- package/lab/demo/pipelines/wordings.json +104 -0
- package/lab/demo/sources/Demo 1/source.json +3 -0
- package/lab/demo/sources/Demo 2/source.json +3 -0
- package/lab/demo/sources/sentiment/bakery-croissant.txt +1 -0
- package/lab/demo/sources/sentiment/bus-timetable.txt +1 -0
- package/lab/demo/sources/sentiment/cafe-coffee.txt +1 -0
- package/lab/demo/sources/sentiment/concert-night.txt +1 -0
- package/lab/demo/sources/sentiment/film-sequel.txt +1 -0
- package/lab/demo/sources/sentiment/garden-tomatoes.txt +1 -0
- package/lab/demo/sources/sentiment/gym-contract.txt +1 -0
- package/lab/demo/sources/sentiment/headphones-review.txt +1 -0
- package/lab/demo/sources/sentiment/hotel-room.txt +1 -0
- package/lab/demo/sources/sentiment/library-hours.txt +1 -0
- package/lab/demo/sources/sentiment/meeting-minutes.txt +1 -0
- package/lab/demo/sources/sentiment/parcel-lost.txt +1 -0
- package/lab/demo/sources/sentiment/phone-update.txt +1 -0
- package/lab/demo/sources/sentiment/puppy-home.txt +1 -0
- package/lab/demo/sources/sentiment/recipe-note.txt +1 -0
- package/lab/demo/sources/sentiment/road-closure.txt +1 -0
- package/lab/demo/sources/sentiment/source.json +3 -0
- package/lab/demo/sources/sentiment/teacher-thanks.txt +1 -0
- package/lab/demo/sources/sentiment/train-delay.txt +1 -0
- package/lab/demo/sources/sentiment/volunteer-day.txt +1 -0
- package/lab/demo/sources/sentiment/weather-report.txt +1 -0
- package/lab/demo/sources/weather-alerts/https-api.weather.gov-alerts-types.txt +116 -0
- package/lab/demo/sources/weather-alerts/source.json +8 -0
- package/lab/evals-core.mjs +246 -57
- package/lab/flows/wdl.mjs +19 -0
- package/lab/kinds/list.mjs +5 -2
- package/lab/metrics/builtin.mjs +34 -7
- package/lab/run-evals.js +30 -11
- package/lab/server.py +614 -75
- package/lab/web/dist/assets/gallery-DpaqOg9Z.js +5 -0
- package/lab/web/dist/assets/main-BSw-jyYD.css +1 -0
- package/lab/web/dist/assets/main-CrB8wPZn.js +17 -0
- package/lab/web/dist/assets/tokens-CrjDMCbz.js +60 -0
- package/lab/web/dist/assets/tokens-DDOONQon.css +1 -0
- package/lab/web/dist/gallery.html +3 -3
- package/lab/web/dist/index.html +4 -4
- package/package.json +1 -1
- package/lab/web/dist/assets/gallery-DKy8QK3o.js +0 -5
- package/lab/web/dist/assets/main-BGmSu7aS.css +0 -1
- package/lab/web/dist/assets/main-DdGON-yl.js +0 -16
- package/lab/web/dist/assets/tokens-BmytrwxE.js +0 -60
- package/lab/web/dist/assets/tokens-DBN7I0ru.css +0 -1
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "evals-lab/eval-group",
|
|
3
|
+
"version": 9,
|
|
4
|
+
"group": {
|
|
5
|
+
"name": "Demo: classify sentiment",
|
|
6
|
+
"body": {
|
|
7
|
+
"version": 9,
|
|
8
|
+
"scoring": {
|
|
9
|
+
"mode": "all",
|
|
10
|
+
"threshold": null
|
|
11
|
+
},
|
|
12
|
+
"grader": null,
|
|
13
|
+
"every": [],
|
|
14
|
+
"run": [],
|
|
15
|
+
"cases": [
|
|
16
|
+
{
|
|
17
|
+
"id": "bakery-croissant",
|
|
18
|
+
"item": "bakery-croissant.txt",
|
|
19
|
+
"todo": false,
|
|
20
|
+
"note": "",
|
|
21
|
+
"metrics": [
|
|
22
|
+
{
|
|
23
|
+
"type": "regex",
|
|
24
|
+
"pattern": "^\\s*Label:\\s*positive\\s*\\.?\\s*$",
|
|
25
|
+
"flags": "im"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "factuality",
|
|
29
|
+
"reference": "The text is positive. The writer enjoyed the warm, flaky croissant and the friendly service, and plans to return.",
|
|
30
|
+
"threshold": 0.5
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "train-delay",
|
|
36
|
+
"item": "train-delay.txt",
|
|
37
|
+
"todo": false,
|
|
38
|
+
"note": "",
|
|
39
|
+
"metrics": [
|
|
40
|
+
{
|
|
41
|
+
"type": "regex",
|
|
42
|
+
"pattern": "^\\s*Label:\\s*negative\\s*\\.?\\s*$",
|
|
43
|
+
"flags": "im"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "factuality",
|
|
47
|
+
"reference": "The text is negative. The writer is frustrated by repeated cancellations with no notice or alternative, which made them late.",
|
|
48
|
+
"threshold": 0.5
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "library-hours",
|
|
54
|
+
"item": "library-hours.txt",
|
|
55
|
+
"todo": false,
|
|
56
|
+
"note": "",
|
|
57
|
+
"metrics": [
|
|
58
|
+
{
|
|
59
|
+
"type": "regex",
|
|
60
|
+
"pattern": "^\\s*Label:\\s*neutral\\s*\\.?\\s*$",
|
|
61
|
+
"flags": "im"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "factuality",
|
|
65
|
+
"reference": "The text is neutral. It is a factual notice of changed opening hours with no opinion either way.",
|
|
66
|
+
"threshold": 0.5
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "headphones-review",
|
|
72
|
+
"item": "headphones-review.txt",
|
|
73
|
+
"todo": false,
|
|
74
|
+
"note": "",
|
|
75
|
+
"metrics": [
|
|
76
|
+
{
|
|
77
|
+
"type": "regex",
|
|
78
|
+
"pattern": "^\\s*Label:\\s*positive\\s*\\.?\\s*$",
|
|
79
|
+
"flags": "im"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "factuality",
|
|
83
|
+
"reference": "The text is positive. The writer praises the battery life and noise cancelling and calls them their best purchase of the year.",
|
|
84
|
+
"threshold": 0.5
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "hotel-room",
|
|
90
|
+
"item": "hotel-room.txt",
|
|
91
|
+
"todo": false,
|
|
92
|
+
"note": "",
|
|
93
|
+
"metrics": [
|
|
94
|
+
{
|
|
95
|
+
"type": "regex",
|
|
96
|
+
"pattern": "^\\s*Label:\\s*negative\\s*\\.?\\s*$",
|
|
97
|
+
"flags": "im"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "factuality",
|
|
101
|
+
"reference": "The text is negative. The room did not match the advertised view, was noisy, and the hotel would not move them.",
|
|
102
|
+
"threshold": 0.5
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "meeting-minutes",
|
|
108
|
+
"item": "meeting-minutes.txt",
|
|
109
|
+
"todo": false,
|
|
110
|
+
"note": "",
|
|
111
|
+
"metrics": [
|
|
112
|
+
{
|
|
113
|
+
"type": "regex",
|
|
114
|
+
"pattern": "^\\s*Label:\\s*neutral\\s*\\.?\\s*$",
|
|
115
|
+
"flags": "im"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "factuality",
|
|
119
|
+
"reference": "The text is neutral. It reports what the committee decided and when it meets next, without expressing a feeling.",
|
|
120
|
+
"threshold": 0.5
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "garden-tomatoes",
|
|
126
|
+
"item": "garden-tomatoes.txt",
|
|
127
|
+
"todo": false,
|
|
128
|
+
"note": "",
|
|
129
|
+
"metrics": [
|
|
130
|
+
{
|
|
131
|
+
"type": "regex",
|
|
132
|
+
"pattern": "^\\s*Label:\\s*positive\\s*\\.?\\s*$",
|
|
133
|
+
"flags": "im"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "factuality",
|
|
137
|
+
"reference": "The text is positive. The writer is delighted with the taste of their first home-grown tomatoes and feels the effort paid off.",
|
|
138
|
+
"threshold": 0.5
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": "phone-update",
|
|
144
|
+
"item": "phone-update.txt",
|
|
145
|
+
"todo": false,
|
|
146
|
+
"note": "",
|
|
147
|
+
"metrics": [
|
|
148
|
+
{
|
|
149
|
+
"type": "regex",
|
|
150
|
+
"pattern": "^\\s*Label:\\s*negative\\s*\\.?\\s*$",
|
|
151
|
+
"flags": "im"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "factuality",
|
|
155
|
+
"reference": "The text is negative. The update made the battery drain fast and apps crash, and the writer regrets installing it.",
|
|
156
|
+
"threshold": 0.5
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "bus-timetable",
|
|
162
|
+
"item": "bus-timetable.txt",
|
|
163
|
+
"todo": false,
|
|
164
|
+
"note": "",
|
|
165
|
+
"metrics": [
|
|
166
|
+
{
|
|
167
|
+
"type": "regex",
|
|
168
|
+
"pattern": "^\\s*Label:\\s*neutral\\s*\\.?\\s*$",
|
|
169
|
+
"flags": "im"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"type": "factuality",
|
|
173
|
+
"reference": "The text is neutral. It states the bus frequency and last departure, a plain timetable fact.",
|
|
174
|
+
"threshold": 0.5
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "teacher-thanks",
|
|
180
|
+
"item": "teacher-thanks.txt",
|
|
181
|
+
"todo": false,
|
|
182
|
+
"note": "",
|
|
183
|
+
"metrics": [
|
|
184
|
+
{
|
|
185
|
+
"type": "regex",
|
|
186
|
+
"pattern": "^\\s*Label:\\s*positive\\s*\\.?\\s*$",
|
|
187
|
+
"flags": "im"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"type": "factuality",
|
|
191
|
+
"reference": "The text is positive. The writer is grateful to a teacher whose extra help led to an exam result they are proud of.",
|
|
192
|
+
"threshold": 0.5
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "parcel-lost",
|
|
198
|
+
"item": "parcel-lost.txt",
|
|
199
|
+
"todo": false,
|
|
200
|
+
"note": "",
|
|
201
|
+
"metrics": [
|
|
202
|
+
{
|
|
203
|
+
"type": "regex",
|
|
204
|
+
"pattern": "^\\s*Label:\\s*negative\\s*\\.?\\s*$",
|
|
205
|
+
"flags": "im"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"type": "factuality",
|
|
209
|
+
"reference": "The text is negative. The parcel never arrived and the complaints were closed without a reply, leaving the writer out of pocket.",
|
|
210
|
+
"threshold": 0.5
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "weather-report",
|
|
216
|
+
"item": "weather-report.txt",
|
|
217
|
+
"todo": false,
|
|
218
|
+
"note": "",
|
|
219
|
+
"metrics": [
|
|
220
|
+
{
|
|
221
|
+
"type": "regex",
|
|
222
|
+
"pattern": "^\\s*Label:\\s*neutral\\s*\\.?\\s*$",
|
|
223
|
+
"flags": "im"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"type": "factuality",
|
|
227
|
+
"reference": "The text is neutral. It is a forecast of the weather, giving conditions without any opinion.",
|
|
228
|
+
"threshold": 0.5
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"id": "concert-night",
|
|
234
|
+
"item": "concert-night.txt",
|
|
235
|
+
"todo": false,
|
|
236
|
+
"note": "",
|
|
237
|
+
"metrics": [
|
|
238
|
+
{
|
|
239
|
+
"type": "regex",
|
|
240
|
+
"pattern": "^\\s*Label:\\s*positive\\s*\\.?\\s*$",
|
|
241
|
+
"flags": "im"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"type": "factuality",
|
|
245
|
+
"reference": "The text is positive. The writer loved the long concert and the shared singing, and would happily go again.",
|
|
246
|
+
"threshold": 0.5
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"id": "gym-contract",
|
|
252
|
+
"item": "gym-contract.txt",
|
|
253
|
+
"todo": false,
|
|
254
|
+
"note": "",
|
|
255
|
+
"metrics": [
|
|
256
|
+
{
|
|
257
|
+
"type": "regex",
|
|
258
|
+
"pattern": "^\\s*Label:\\s*negative\\s*\\.?\\s*$",
|
|
259
|
+
"flags": "im"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"type": "factuality",
|
|
263
|
+
"reference": "The text is negative. Cancelling was a long ordeal with a hidden fee, and the writer warns others away.",
|
|
264
|
+
"threshold": 0.5
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"id": "recipe-note",
|
|
270
|
+
"item": "recipe-note.txt",
|
|
271
|
+
"todo": false,
|
|
272
|
+
"note": "",
|
|
273
|
+
"metrics": [
|
|
274
|
+
{
|
|
275
|
+
"type": "regex",
|
|
276
|
+
"pattern": "^\\s*Label:\\s*neutral\\s*\\.?\\s*$",
|
|
277
|
+
"flags": "im"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"type": "factuality",
|
|
281
|
+
"reference": "The text is neutral. It gives cooking instructions and expresses no feeling.",
|
|
282
|
+
"threshold": 0.5
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"id": "cafe-coffee",
|
|
288
|
+
"item": "cafe-coffee.txt",
|
|
289
|
+
"todo": false,
|
|
290
|
+
"note": "",
|
|
291
|
+
"metrics": [
|
|
292
|
+
{
|
|
293
|
+
"type": "regex",
|
|
294
|
+
"pattern": "^\\s*Label:\\s*negative\\s*\\.?\\s*$",
|
|
295
|
+
"flags": "im"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"type": "factuality",
|
|
299
|
+
"reference": "The text is negative. The coffee was slow, lukewarm and burnt, and the staff ignored the writer without apology.",
|
|
300
|
+
"threshold": 0.5
|
|
301
|
+
}
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"id": "puppy-home",
|
|
306
|
+
"item": "puppy-home.txt",
|
|
307
|
+
"todo": false,
|
|
308
|
+
"note": "",
|
|
309
|
+
"metrics": [
|
|
310
|
+
{
|
|
311
|
+
"type": "regex",
|
|
312
|
+
"pattern": "^\\s*Label:\\s*positive\\s*\\.?\\s*$",
|
|
313
|
+
"flags": "im"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"type": "factuality",
|
|
317
|
+
"reference": "The text is positive. The writer is clearly fond of their new puppy and describes her with affection.",
|
|
318
|
+
"threshold": 0.5
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"id": "road-closure",
|
|
324
|
+
"item": "road-closure.txt",
|
|
325
|
+
"todo": false,
|
|
326
|
+
"note": "",
|
|
327
|
+
"metrics": [
|
|
328
|
+
{
|
|
329
|
+
"type": "regex",
|
|
330
|
+
"pattern": "^\\s*Label:\\s*neutral\\s*\\.?\\s*$",
|
|
331
|
+
"flags": "im"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"type": "factuality",
|
|
335
|
+
"reference": "The text is neutral. It announces a road closure and diversion, a factual notice.",
|
|
336
|
+
"threshold": 0.5
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"id": "film-sequel",
|
|
342
|
+
"item": "film-sequel.txt",
|
|
343
|
+
"todo": false,
|
|
344
|
+
"note": "",
|
|
345
|
+
"metrics": [
|
|
346
|
+
{
|
|
347
|
+
"type": "regex",
|
|
348
|
+
"pattern": "^\\s*Label:\\s*negative\\s*\\.?\\s*$",
|
|
349
|
+
"flags": "im"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"type": "factuality",
|
|
353
|
+
"reference": "The text is negative. The writer found the sequel long, loud and boring compared with the first film.",
|
|
354
|
+
"threshold": 0.5
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"id": "volunteer-day",
|
|
360
|
+
"item": "volunteer-day.txt",
|
|
361
|
+
"todo": false,
|
|
362
|
+
"note": "",
|
|
363
|
+
"metrics": [
|
|
364
|
+
{
|
|
365
|
+
"type": "regex",
|
|
366
|
+
"pattern": "^\\s*Label:\\s*positive\\s*\\.?\\s*$",
|
|
367
|
+
"flags": "im"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"type": "factuality",
|
|
371
|
+
"reference": "The text is positive. The writer enjoyed the clean-up, the sense of community and the day as a whole.",
|
|
372
|
+
"threshold": 0.5
|
|
373
|
+
}
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
},
|
|
378
|
+
"preview": {
|
|
379
|
+
"id": "sentiment",
|
|
380
|
+
"name": "Demo: classify sentiment"
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "evals-lab/eval-group",
|
|
3
|
+
"version": 9,
|
|
4
|
+
"group": {
|
|
5
|
+
"name": "Demo: sort weather alerts",
|
|
6
|
+
"body": {
|
|
7
|
+
"version": 9,
|
|
8
|
+
"scoring": {
|
|
9
|
+
"mode": "all",
|
|
10
|
+
"threshold": null
|
|
11
|
+
},
|
|
12
|
+
"grader": null,
|
|
13
|
+
"every": [],
|
|
14
|
+
"run": [],
|
|
15
|
+
"cases": [
|
|
16
|
+
{
|
|
17
|
+
"id": "alert-types",
|
|
18
|
+
"item": "https-api.weather.gov-alerts-types.txt",
|
|
19
|
+
"todo": false,
|
|
20
|
+
"note": "The National Weather Service's alert types. The plain dangers belong in High and the notices with no hazard in Low.",
|
|
21
|
+
"metrics": [
|
|
22
|
+
{
|
|
23
|
+
"type": "contains",
|
|
24
|
+
"value": "Tornado Warning",
|
|
25
|
+
"ignoreCase": true
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "regex",
|
|
29
|
+
"pattern": "^\\W*High:.*\\bTornado Warning\\b",
|
|
30
|
+
"flags": "im"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "regex",
|
|
34
|
+
"pattern": "^\\W*High:.*\\bTsunami Warning\\b",
|
|
35
|
+
"flags": "im"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "regex",
|
|
39
|
+
"pattern": "^\\W*High:.*\\bHurricane Warning\\b",
|
|
40
|
+
"flags": "im"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "regex",
|
|
44
|
+
"pattern": "^\\W*Low:.*\\bAdministrative Message\\b",
|
|
45
|
+
"flags": "im"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "regex",
|
|
49
|
+
"pattern": "^\\W*Low:.*\\bTest\\b",
|
|
50
|
+
"flags": "im"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"preview": {
|
|
57
|
+
"id": "weather-alerts",
|
|
58
|
+
"name": "Demo: sort weather alerts"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "evals-lab/eval-group",
|
|
3
|
+
"version": 9,
|
|
4
|
+
"group": {
|
|
5
|
+
"name": "Demo: compare wordings",
|
|
6
|
+
"body": {
|
|
7
|
+
"version": 9,
|
|
8
|
+
"scoring": {
|
|
9
|
+
"mode": "all",
|
|
10
|
+
"threshold": null
|
|
11
|
+
},
|
|
12
|
+
"grader": null,
|
|
13
|
+
"every": [
|
|
14
|
+
{
|
|
15
|
+
"type": "contains",
|
|
16
|
+
"value": "Mercury",
|
|
17
|
+
"ignoreCase": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "contains",
|
|
21
|
+
"value": "Venus",
|
|
22
|
+
"not": true,
|
|
23
|
+
"ignoreCase": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "regex",
|
|
27
|
+
"pattern": "^\\W*Mercury\\W*$",
|
|
28
|
+
"flags": "i"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "latency",
|
|
32
|
+
"max": 10000
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"run": [],
|
|
36
|
+
"cases": []
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
package/lab/demo/manifest.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"version": 1,
|
|
4
4
|
"id": "demo",
|
|
5
5
|
"name": "Demo",
|
|
6
|
-
"packVersion": "2026.10.
|
|
6
|
+
"packVersion": "2026.10.11",
|
|
7
7
|
"requires": {
|
|
8
|
-
"lab": ">=
|
|
8
|
+
"lab": ">=17",
|
|
9
9
|
"plugins": []
|
|
10
10
|
},
|
|
11
|
-
"description": "
|
|
11
|
+
"description": "Five demos, each a dataset with a starter pipeline: two sets of public-domain images, short texts to classify, one question in four wordings, and a dynamic Source's snapshot."
|
|
12
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version":
|
|
2
|
+
"version": 17,
|
|
3
3
|
"id": "demo-1",
|
|
4
|
-
"name": "Demo
|
|
4
|
+
"name": "Demo: describe images",
|
|
5
5
|
"jobs": [
|
|
6
6
|
{
|
|
7
7
|
"type": "job",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"type": "source",
|
|
15
15
|
"ref": {
|
|
16
16
|
"id": "Demo 1",
|
|
17
|
-
"name": "Demo
|
|
17
|
+
"name": "Demo: describe images"
|
|
18
18
|
},
|
|
19
19
|
"first": null,
|
|
20
20
|
"loops": 1
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"continueOnFailure": true,
|
|
142
142
|
"group": {
|
|
143
143
|
"id": "demo-1",
|
|
144
|
-
"name": "Demo
|
|
144
|
+
"name": "Demo: describe images"
|
|
145
145
|
},
|
|
146
146
|
"pin": null
|
|
147
147
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version":
|
|
2
|
+
"version": 17,
|
|
3
3
|
"id": "demo-2",
|
|
4
|
-
"name": "Demo 2",
|
|
4
|
+
"name": "Demo: describe images 2",
|
|
5
5
|
"jobs": [
|
|
6
6
|
{
|
|
7
7
|
"type": "job",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"type": "source",
|
|
15
15
|
"ref": {
|
|
16
16
|
"id": "Demo 2",
|
|
17
|
-
"name": "Demo 2"
|
|
17
|
+
"name": "Demo: describe images 2"
|
|
18
18
|
},
|
|
19
19
|
"first": null,
|
|
20
20
|
"loops": 1
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"continueOnFailure": true,
|
|
142
142
|
"group": {
|
|
143
143
|
"id": "demo-2",
|
|
144
|
-
"name": "Demo 2"
|
|
144
|
+
"name": "Demo: describe images 2"
|
|
145
145
|
},
|
|
146
146
|
"pin": null
|
|
147
147
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 17,
|
|
3
|
+
"id": "sentiment",
|
|
4
|
+
"name": "Demo: classify sentiment",
|
|
5
|
+
"jobs": [
|
|
6
|
+
{
|
|
7
|
+
"type": "job",
|
|
8
|
+
"id": "j1",
|
|
9
|
+
"name": "",
|
|
10
|
+
"steps": [
|
|
11
|
+
{
|
|
12
|
+
"type": "attachContent",
|
|
13
|
+
"content": {
|
|
14
|
+
"type": "source",
|
|
15
|
+
"ref": {
|
|
16
|
+
"id": "sentiment",
|
|
17
|
+
"name": "Demo: classify sentiment"
|
|
18
|
+
},
|
|
19
|
+
"first": null,
|
|
20
|
+
"loops": 1
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "readReply",
|
|
25
|
+
"out": {
|
|
26
|
+
"kind": "text"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"targets": [
|
|
33
|
+
{
|
|
34
|
+
"id": "s1",
|
|
35
|
+
"name": "",
|
|
36
|
+
"connection": {
|
|
37
|
+
"id": "model",
|
|
38
|
+
"name": "Model"
|
|
39
|
+
},
|
|
40
|
+
"profile": null,
|
|
41
|
+
"steps": [
|
|
42
|
+
{
|
|
43
|
+
"type": "prompt",
|
|
44
|
+
"prompt": "Read the text below and say how its writer feels about what they describe.\n\nReply with two lines and nothing else:\nLabel: positive, negative or neutral\nReason: one sentence saying why\n\nText:\n{text}"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"evals": [
|
|
50
|
+
{
|
|
51
|
+
"id": "t1",
|
|
52
|
+
"name": "",
|
|
53
|
+
"type": "group",
|
|
54
|
+
"continueOnFailure": true,
|
|
55
|
+
"group": {
|
|
56
|
+
"id": "sentiment",
|
|
57
|
+
"name": "Demo: classify sentiment"
|
|
58
|
+
},
|
|
59
|
+
"pin": null
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"pass": {
|
|
63
|
+
"mode": "all"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 17,
|
|
3
|
+
"id": "weather-alerts",
|
|
4
|
+
"name": "Demo: sort weather alerts",
|
|
5
|
+
"jobs": [
|
|
6
|
+
{
|
|
7
|
+
"type": "job",
|
|
8
|
+
"id": "j1",
|
|
9
|
+
"name": "",
|
|
10
|
+
"steps": [
|
|
11
|
+
{
|
|
12
|
+
"type": "attachContent",
|
|
13
|
+
"content": {
|
|
14
|
+
"type": "source",
|
|
15
|
+
"ref": {
|
|
16
|
+
"id": "weather-alerts",
|
|
17
|
+
"name": "Demo: sort weather alerts"
|
|
18
|
+
},
|
|
19
|
+
"first": null,
|
|
20
|
+
"loops": 1,
|
|
21
|
+
"live": false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "readReply",
|
|
26
|
+
"out": {
|
|
27
|
+
"kind": "text"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"targets": [
|
|
34
|
+
{
|
|
35
|
+
"id": "s1",
|
|
36
|
+
"name": "",
|
|
37
|
+
"connection": {
|
|
38
|
+
"id": "model",
|
|
39
|
+
"name": "Model"
|
|
40
|
+
},
|
|
41
|
+
"profile": null,
|
|
42
|
+
"steps": [
|
|
43
|
+
{
|
|
44
|
+
"type": "prompt",
|
|
45
|
+
"prompt": "Below is the US National Weather Service's list of alert types, as JSON.\n\nSort every alert type on it by hazard into three groups. Reply with exactly three lines and nothing else:\nHigh: the types that warn of a threat to life\nMedium: the types that warn of damage or disruption\nLow: the rest\nSeparate the types on a line with commas, and write each exactly as the list does.\n\n{text}"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"evals": [
|
|
51
|
+
{
|
|
52
|
+
"id": "t1",
|
|
53
|
+
"name": "",
|
|
54
|
+
"type": "group",
|
|
55
|
+
"continueOnFailure": true,
|
|
56
|
+
"group": {
|
|
57
|
+
"id": "weather-alerts",
|
|
58
|
+
"name": "Demo: sort weather alerts"
|
|
59
|
+
},
|
|
60
|
+
"pin": null
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"pass": {
|
|
64
|
+
"mode": "all"
|
|
65
|
+
}
|
|
66
|
+
}
|