evals-lab 0.10.0 → 0.12.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +88 -1
  2. package/README.md +12 -6
  3. package/bin/evals-lab.js +9 -1
  4. package/bin/lab-file.js +97 -0
  5. package/bin/run.js +16 -16
  6. package/lab/VERSION +1 -1
  7. package/lab/demo/CREDITS.md +37 -3
  8. package/lab/demo/datasets/demo-1.json +2 -2
  9. package/lab/demo/datasets/demo-2.json +2 -2
  10. package/lab/demo/datasets/sentiment.json +383 -0
  11. package/lab/demo/datasets/weather-alerts.json +61 -0
  12. package/lab/demo/datasets/wordings.json +39 -0
  13. package/lab/demo/manifest.json +3 -3
  14. package/lab/demo/pipelines/demo-1.json +8 -6
  15. package/lab/demo/pipelines/demo-2.json +8 -6
  16. package/lab/demo/pipelines/sentiment.json +65 -0
  17. package/lab/demo/pipelines/weather-alerts.json +66 -0
  18. package/lab/demo/pipelines/wordings.json +104 -0
  19. package/lab/demo/sources/Demo 1/source.json +3 -0
  20. package/lab/demo/sources/Demo 2/source.json +3 -0
  21. package/lab/demo/sources/sentiment/bakery-croissant.txt +1 -0
  22. package/lab/demo/sources/sentiment/bus-timetable.txt +1 -0
  23. package/lab/demo/sources/sentiment/cafe-coffee.txt +1 -0
  24. package/lab/demo/sources/sentiment/concert-night.txt +1 -0
  25. package/lab/demo/sources/sentiment/film-sequel.txt +1 -0
  26. package/lab/demo/sources/sentiment/garden-tomatoes.txt +1 -0
  27. package/lab/demo/sources/sentiment/gym-contract.txt +1 -0
  28. package/lab/demo/sources/sentiment/headphones-review.txt +1 -0
  29. package/lab/demo/sources/sentiment/hotel-room.txt +1 -0
  30. package/lab/demo/sources/sentiment/library-hours.txt +1 -0
  31. package/lab/demo/sources/sentiment/meeting-minutes.txt +1 -0
  32. package/lab/demo/sources/sentiment/parcel-lost.txt +1 -0
  33. package/lab/demo/sources/sentiment/phone-update.txt +1 -0
  34. package/lab/demo/sources/sentiment/puppy-home.txt +1 -0
  35. package/lab/demo/sources/sentiment/recipe-note.txt +1 -0
  36. package/lab/demo/sources/sentiment/road-closure.txt +1 -0
  37. package/lab/demo/sources/sentiment/source.json +3 -0
  38. package/lab/demo/sources/sentiment/teacher-thanks.txt +1 -0
  39. package/lab/demo/sources/sentiment/train-delay.txt +1 -0
  40. package/lab/demo/sources/sentiment/volunteer-day.txt +1 -0
  41. package/lab/demo/sources/sentiment/weather-report.txt +1 -0
  42. package/lab/demo/sources/weather-alerts/https-api.weather.gov-alerts-types.txt +116 -0
  43. package/lab/demo/sources/weather-alerts/source.json +8 -0
  44. package/lab/evals-core.mjs +584 -167
  45. package/lab/flows/record.mjs +16 -4
  46. package/lab/kinds/list.mjs +32 -23
  47. package/lab/run-evals.js +3 -3
  48. package/lab/server.py +913 -119
  49. package/lab/web/dist/assets/gallery-CFntjQFG.js +5 -0
  50. package/lab/web/dist/assets/main-BlTG2i20.css +1 -0
  51. package/lab/web/dist/assets/main-D6MNWqak.js +17 -0
  52. package/lab/web/dist/assets/tokens-DwzzdSIF.css +1 -0
  53. package/lab/web/dist/assets/tokens-bvuNFuYg.js +60 -0
  54. package/lab/web/dist/gallery.html +3 -3
  55. package/lab/web/dist/index.html +4 -4
  56. package/package.json +10 -2
  57. package/lab/web/dist/assets/gallery-BcvmOPqb.js +0 -3
  58. package/lab/web/dist/assets/main-BBUxHZ-D.js +0 -16
  59. package/lab/web/dist/assets/main-CMoyjImZ.css +0 -1
  60. package/lab/web/dist/assets/tokens-B7N4NvmM.css +0 -1
  61. package/lab/web/dist/assets/tokens-CiJkwD3V.js +0 -60
@@ -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
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "version": 17,
3
+ "id": "wordings",
4
+ "name": "Demo: compare wordings",
5
+ "jobs": [
6
+ {
7
+ "type": "job",
8
+ "id": "j1",
9
+ "name": "",
10
+ "steps": [
11
+ {
12
+ "type": "attachContent",
13
+ "content": {
14
+ "type": "prompt"
15
+ }
16
+ },
17
+ {
18
+ "type": "readReply",
19
+ "out": {
20
+ "kind": "text"
21
+ }
22
+ }
23
+ ]
24
+ }
25
+ ],
26
+ "targets": [
27
+ {
28
+ "id": "s1",
29
+ "name": "",
30
+ "connection": {
31
+ "id": "model",
32
+ "name": "Model"
33
+ },
34
+ "profile": null,
35
+ "steps": [
36
+ {
37
+ "type": "prompt",
38
+ "prompt": "Which planet is closest to the Sun?"
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "id": "s2",
44
+ "name": "",
45
+ "connection": {
46
+ "id": "model",
47
+ "name": "Model"
48
+ },
49
+ "profile": null,
50
+ "steps": [
51
+ {
52
+ "type": "prompt",
53
+ "prompt": "Name the planet nearest the Sun. Reply with its name only."
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ "id": "s3",
59
+ "name": "",
60
+ "connection": {
61
+ "id": "model",
62
+ "name": "Model"
63
+ },
64
+ "profile": null,
65
+ "steps": [
66
+ {
67
+ "type": "prompt",
68
+ "prompt": "Of the eight planets in our solar system, which one orbits closest to the Sun? Answer in one word."
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "id": "s4",
74
+ "name": "",
75
+ "connection": {
76
+ "id": "model",
77
+ "name": "Model"
78
+ },
79
+ "profile": null,
80
+ "steps": [
81
+ {
82
+ "type": "prompt",
83
+ "prompt": "Quick question: what's the innermost planet?"
84
+ }
85
+ ]
86
+ }
87
+ ],
88
+ "evals": [
89
+ {
90
+ "id": "t1",
91
+ "name": "",
92
+ "type": "group",
93
+ "continueOnFailure": true,
94
+ "group": {
95
+ "id": "wordings",
96
+ "name": "Demo: compare wordings"
97
+ },
98
+ "pin": null
99
+ }
100
+ ],
101
+ "pass": {
102
+ "mode": "all"
103
+ }
104
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "Demo: describe images"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "Demo: describe images 2"
3
+ }
@@ -0,0 +1 @@
1
+ Stopped at the new bakery on Elm Street this morning. The croissant was still warm, flaky all the way through, and the woman at the till remembered my name from last week. I'll be back tomorrow.
@@ -0,0 +1 @@
1
+ Route 12 now leaves the station every twenty minutes between seven and seven, and every forty minutes in the evening. The last bus is at eleven fifteen.
@@ -0,0 +1 @@
1
+ Waited twenty-five minutes for a lukewarm flat white that tasted burnt. The staff were chatting the whole time and nobody apologised.
@@ -0,0 +1 @@
1
+ The band played for nearly three hours and the whole crowd sang the last song back to them. My voice is gone today and I would do it all again.
@@ -0,0 +1 @@
1
+ The sequel takes everything that made the first film charming and buries it under two and a half hours of noise. I checked my watch more than the screen.
@@ -0,0 +1 @@
1
+ Picked the first tomatoes of the summer today, and they were worth every evening of watering. Sweet, a little sharp, and still warm from the sun.
@@ -0,0 +1 @@
1
+ Cancelling my gym membership took four phone calls, a letter by recorded post and a fee nobody mentioned when I signed up. Avoid.
@@ -0,0 +1 @@
1
+ Six months in and these headphones still last two full days on a charge. The noise cancelling turns my open-plan office into a quiet room. Best thing I bought this year.
@@ -0,0 +1 @@
1
+ The website promised a sea view. Our window faced a car park and the air conditioner rattled all night. When we asked to move, the desk said nothing else was free.
@@ -0,0 +1 @@
1
+ From the first of next month, the library will open at ten on weekdays instead of nine. Weekend hours stay the same. Returns can still be left in the box by the door at any time.
@@ -0,0 +1 @@
1
+ The committee met on Tuesday. The budget for the spring fair was approved as proposed. The next meeting is on the fourteenth, in the community hall.
@@ -0,0 +1 @@
1
+ The tracking says delivered, but nothing came. Customer service closed my complaint without reply, twice. Forty pounds gone and nobody will even answer.
@@ -0,0 +1 @@
1
+ Since last night's update my phone drains from full to empty by lunchtime, and half my apps crash on opening. I wish I had never pressed install.
@@ -0,0 +1 @@
1
+ We brought our puppy home on Saturday. She has already learned to sit, chewed one slipper, and fallen asleep on my feet every evening. We adore her.
@@ -0,0 +1 @@
1
+ Preheat the oven to 180 degrees. Mix the flour, sugar and butter until it looks like breadcrumbs, then add the egg and press into the tin.
@@ -0,0 +1 @@
1
+ Mill Lane will be closed between the bridge and the school from Monday for two weeks while the water main is replaced. A diversion will be signed.
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "Demo: classify sentiment"
3
+ }
@@ -0,0 +1 @@
1
+ Mr Okafor stayed after class every Thursday for a term to help me with algebra. I passed the exam last week with a grade I never thought I'd get. Thank you, sir.
@@ -0,0 +1 @@
1
+ Third cancelled train this week. No announcement, no replacement bus, just a blank board and a crowd of us standing in the rain. I was an hour late for work again.
@@ -0,0 +1 @@
1
+ Thirty of us turned out to clear the riverbank on Sunday. We filled forty bags, met neighbours we'd never spoken to, and finished with tea and cake. A lovely day.
@@ -0,0 +1 @@
1
+ Tomorrow will be cloudy in the morning with sunny spells later. Highs of seventeen degrees, with a light westerly wind.
@@ -0,0 +1,116 @@
1
+ {
2
+ "@context": [],
3
+ "eventTypes": [
4
+ "911 Telephone Outage",
5
+ "Administrative Message",
6
+ "Air Quality Alert",
7
+ "Air Stagnation Advisory",
8
+ "Ashfall Advisory",
9
+ "Ashfall Warning",
10
+ "Avalanche Advisory",
11
+ "Avalanche Warning",
12
+ "Avalanche Watch",
13
+ "Beach Hazards Statement",
14
+ "Blizzard Warning",
15
+ "Blowing Dust Advisory",
16
+ "Blowing Dust Warning",
17
+ "Blue Alert",
18
+ "Brisk Wind Advisory",
19
+ "Child Abduction Emergency",
20
+ "Civil Danger Warning",
21
+ "Civil Emergency Message",
22
+ "Coastal Flood Advisory",
23
+ "Coastal Flood Statement",
24
+ "Coastal Flood Warning",
25
+ "Coastal Flood Watch",
26
+ "Cold Weather Advisory",
27
+ "Dense Fog Advisory",
28
+ "Dense Smoke Advisory",
29
+ "Dust Advisory",
30
+ "Dust Storm Warning",
31
+ "Earthquake Warning",
32
+ "Evacuation Immediate",
33
+ "Extreme Heat Warning",
34
+ "Extreme Heat Watch",
35
+ "Extreme Cold Warning",
36
+ "Extreme Cold Watch",
37
+ "Extreme Fire Danger",
38
+ "Extreme Wind Warning",
39
+ "Fire Warning",
40
+ "Fire Weather Watch",
41
+ "Flash Flood Statement",
42
+ "Flash Flood Warning",
43
+ "Flash Flood Watch",
44
+ "Flood Advisory",
45
+ "Flood Statement",
46
+ "Flood Warning",
47
+ "Flood Watch",
48
+ "Freeze Warning",
49
+ "Freeze Watch",
50
+ "Freezing Fog Advisory",
51
+ "Freezing Spray Advisory",
52
+ "Frost Advisory",
53
+ "Gale Warning",
54
+ "Gale Watch",
55
+ "Hazardous Materials Warning",
56
+ "Hazardous Seas Warning",
57
+ "Hazardous Seas Watch",
58
+ "Hazardous Weather Outlook",
59
+ "Heat Advisory",
60
+ "Heavy Freezing Spray Warning",
61
+ "Heavy Freezing Spray Watch",
62
+ "High Surf Advisory",
63
+ "High Surf Warning",
64
+ "High Wind Warning",
65
+ "High Wind Watch",
66
+ "Hurricane Force Wind Warning",
67
+ "Hurricane Force Wind Watch",
68
+ "Hurricane Warning",
69
+ "Hurricane Watch",
70
+ "Hydrologic Outlook",
71
+ "Ice Storm Warning",
72
+ "Lake Effect Snow Warning",
73
+ "Lake Wind Advisory",
74
+ "Lakeshore Flood Advisory",
75
+ "Lakeshore Flood Statement",
76
+ "Lakeshore Flood Warning",
77
+ "Lakeshore Flood Watch",
78
+ "Law Enforcement Warning",
79
+ "Local Area Emergency",
80
+ "Low Water Advisory",
81
+ "Marine Weather Statement",
82
+ "Nuclear Power Plant Warning",
83
+ "Radiological Hazard Warning",
84
+ "Red Flag Warning",
85
+ "Rip Current Statement",
86
+ "Severe Thunderstorm Warning",
87
+ "Severe Thunderstorm Watch",
88
+ "Severe Weather Statement",
89
+ "Shelter In Place Warning",
90
+ "Short Term Forecast",
91
+ "Small Craft Advisory",
92
+ "Snow Squall Warning",
93
+ "Special Marine Warning",
94
+ "Special Weather Statement",
95
+ "Storm Surge Warning",
96
+ "Storm Surge Watch",
97
+ "Storm Warning",
98
+ "Storm Watch",
99
+ "Test",
100
+ "Tornado Warning",
101
+ "Tornado Watch",
102
+ "Tropical Cyclone Local Statement",
103
+ "Tropical Storm Warning",
104
+ "Tropical Storm Watch",
105
+ "Tsunami Advisory",
106
+ "Tsunami Warning",
107
+ "Tsunami Watch",
108
+ "Typhoon Warning",
109
+ "Typhoon Watch",
110
+ "Volcano Warning",
111
+ "Wind Advisory",
112
+ "Winter Storm Warning",
113
+ "Winter Storm Watch",
114
+ "Winter Weather Advisory"
115
+ ]
116
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "Demo: sort weather alerts",
3
+ "type": "dynamic",
4
+ "config": {
5
+ "provider": "http-get",
6
+ "url": "https://api.weather.gov/alerts/types"
7
+ }
8
+ }