jev-recipes 0.7.0 → 0.8.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/README.md +5 -1
- package/dist/catalog/generated/details/callback-responsibility.json +45 -0
- package/dist/catalog/generated/details/contact-opt-out.json +45 -0
- package/dist/catalog/generated/details/followup-timing.json +45 -0
- package/dist/catalog/generated/details/game-action.json +8 -109
- package/dist/catalog/generated/loaders.js +3 -0
- package/dist/catalog/generated/metadata.js +78 -0
- package/dist/catalog/generated/names.d.ts +1 -1
- package/dist/catalog/generated/names.js +3 -0
- package/dist/catalog/schema.d.ts +3 -0
- package/dist/cli/evaluation.d.ts +1 -0
- package/dist/cli/evaluation.js +82 -0
- package/dist/cli/index.js +13 -0
- package/dist/cli/schema.d.ts +9 -0
- package/dist/evaluation/archive.d.ts +501 -0
- package/dist/evaluation/archive.js +276 -0
- package/dist/evaluation/dataset.d.ts +12 -0
- package/dist/evaluation/dataset.js +162 -0
- package/dist/evaluation/decisions.d.ts +10 -0
- package/dist/evaluation/decisions.js +87 -0
- package/dist/evaluation/engine.d.ts +50 -0
- package/dist/evaluation/engine.js +130 -0
- package/dist/evaluation/index.d.ts +5 -0
- package/dist/evaluation/index.js +3 -0
- package/dist/evaluation/report.d.ts +186 -0
- package/dist/evaluation/report.js +177 -0
- package/dist/evaluation/schema.d.ts +82 -0
- package/dist/evaluation/schema.js +50 -0
- package/dist/recipes/callback-responsibility/demo.json +25 -0
- package/dist/recipes/callback-responsibility/index.d.ts +5 -0
- package/dist/recipes/callback-responsibility/index.js +17 -0
- package/dist/recipes/callback-responsibility/schema.d.ts +42 -0
- package/dist/recipes/callback-responsibility/schema.js +20 -0
- package/dist/recipes/checkers-move/schema.d.ts +1 -1
- package/dist/recipes/choose-action/schema.d.ts +1 -1
- package/dist/recipes/contact-opt-out/demo.json +24 -0
- package/dist/recipes/contact-opt-out/index.d.ts +5 -0
- package/dist/recipes/contact-opt-out/index.js +17 -0
- package/dist/recipes/contact-opt-out/schema.d.ts +42 -0
- package/dist/recipes/contact-opt-out/schema.js +20 -0
- package/dist/recipes/correction-target/schema.d.ts +1 -1
- package/dist/recipes/exercise-select/schema.d.ts +1 -1
- package/dist/recipes/failure-kind/schema.d.ts +1 -1
- package/dist/recipes/field-select/schema.d.ts +1 -1
- package/dist/recipes/finger-actions/schema.d.ts +1 -1
- package/dist/recipes/followup-link/schema.d.ts +1 -1
- package/dist/recipes/followup-timing/demo.json +25 -0
- package/dist/recipes/followup-timing/index.d.ts +5 -0
- package/dist/recipes/followup-timing/index.js +18 -0
- package/dist/recipes/followup-timing/schema.d.ts +45 -0
- package/dist/recipes/followup-timing/schema.js +21 -0
- package/dist/recipes/game-action/schema.d.ts +6 -6
- package/dist/recipes/game-action/schema.js +11 -6
- package/dist/recipes/handoff/schema.d.ts +3 -3
- package/dist/recipes/incident-match/schema.d.ts +1 -1
- package/dist/recipes/model-route/schema.d.ts +1 -1
- package/dist/recipes/next-chord/schema.d.ts +1 -1
- package/dist/recipes/next-duration/schema.d.ts +1 -1
- package/dist/recipes/next-note/schema.d.ts +1 -1
- package/dist/recipes/objection-kind/schema.d.ts +3 -3
- package/dist/recipes/reference-resolve/schema.d.ts +1 -1
- package/dist/recipes/reply-template-match/schema.d.ts +1 -1
- package/dist/recipes/route/schema.d.ts +2 -2
- package/dist/recipes/route/schema.js +3 -3
- package/dist/recipes/route-many/schema.d.ts +3 -3
- package/dist/recipes/route-many/schema.js +3 -3
- package/dist/recipes/style-kind/schema.d.ts +3 -3
- package/dist/src/answers.d.ts +1 -1
- package/dist/src/answers.js +6 -2
- package/dist/src/data.d.ts +6 -0
- package/dist/src/data.js +41 -0
- package/dist/src/decisions.d.ts +1 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +3 -0
- package/dist/src/schema.d.ts +4 -4
- package/dist/src/schema.js +4 -3
- package/package.json +23 -2
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<!-- BEGIN GENERATED: summary -->
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
246 focused recipes for JavaScript and TypeScript. Route messages, check evidence, and label model responses with a function call.
|
|
15
15
|
|
|
16
16
|
<!-- END GENERATED: summary -->
|
|
17
17
|
|
|
@@ -19,6 +19,10 @@ Each recipe accepts your data, calls [Jev through TypeSafe's API](https://docs.t
|
|
|
19
19
|
|
|
20
20
|
For example, give `route` a support message and descriptions of your teams. It returns a team such as `billing`, or a review outcome when the choice is uncertain.
|
|
21
21
|
|
|
22
|
+
Evaluate your own cases with the [installed evaluator](https://github.com/agencyenterprise/jev-recipes/blob/main/docs/evaluation.md), retain model responses, and replay confidence policies offline. The [agent workflow](https://github.com/agencyenterprise/jev-recipes/blob/main/examples/agent-loop/README.md) and [customer queue](https://github.com/agencyenterprise/jev-recipes/blob/main/examples/customer-queue/README.md) show how decisions fit into application code. [Direct and Gateway integrations](https://github.com/agencyenterprise/jev-recipes/blob/main/docs/integrations.md) use the same recipe interface.
|
|
23
|
+
|
|
24
|
+
Build the searchable static catalog with `npm run site:build`, then preview it with `npm run site:preview`. It includes fixture exploration, related-recipe comparisons, and saved evaluation evidence. Current measurements and missing or older evidence are labeled explicitly.
|
|
25
|
+
|
|
22
26
|
## Watch Jev play checkers against Jev using the checkers-move recipe
|
|
23
27
|
|
|
24
28
|
[](https://www.youtube.com/shorts/Z282rGKysTg)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"inputSchema": {
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"conversation": { "type": "string" },
|
|
7
|
+
"roles": { "type": "string" },
|
|
8
|
+
"minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
9
|
+
},
|
|
10
|
+
"required": ["conversation", "roles"]
|
|
11
|
+
},
|
|
12
|
+
"resultSchema": {
|
|
13
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"model": { "type": "string" },
|
|
17
|
+
"usage": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
21
|
+
"output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
|
|
22
|
+
},
|
|
23
|
+
"required": ["input_tokens", "output_tokens"],
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
},
|
|
26
|
+
"status": { "type": "string", "enum": ["ready", "review"] },
|
|
27
|
+
"verdict": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["business", "customer", "either", "none", "unclear"]
|
|
30
|
+
},
|
|
31
|
+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
32
|
+
"probabilities": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"propertyNames": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["business", "customer", "either", "none", "unclear"]
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
39
|
+
"required": ["business", "customer", "either", "none", "unclear"]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": ["model", "usage", "status", "verdict", "confidence", "probabilities"],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"inputSchema": {
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"message": { "type": "string" },
|
|
7
|
+
"context": { "type": "string" },
|
|
8
|
+
"minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
9
|
+
},
|
|
10
|
+
"required": ["message"]
|
|
11
|
+
},
|
|
12
|
+
"resultSchema": {
|
|
13
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"model": { "type": "string" },
|
|
17
|
+
"usage": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
21
|
+
"output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
|
|
22
|
+
},
|
|
23
|
+
"required": ["input_tokens", "output_tokens"],
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
},
|
|
26
|
+
"status": { "type": "string", "enum": ["ready", "review"] },
|
|
27
|
+
"verdict": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["all_contact", "channel", "campaign", "none", "unclear"]
|
|
30
|
+
},
|
|
31
|
+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
32
|
+
"probabilities": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"propertyNames": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["all_contact", "channel", "campaign", "none", "unclear"]
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
39
|
+
"required": ["all_contact", "channel", "campaign", "none", "unclear"]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": ["model", "usage", "status", "verdict", "confidence", "probabilities"],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"inputSchema": {
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"message": { "type": "string" },
|
|
7
|
+
"context": { "type": "string" },
|
|
8
|
+
"minConfidence": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
9
|
+
},
|
|
10
|
+
"required": ["message"]
|
|
11
|
+
},
|
|
12
|
+
"resultSchema": {
|
|
13
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"model": { "type": "string" },
|
|
17
|
+
"usage": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
21
|
+
"output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
|
|
22
|
+
},
|
|
23
|
+
"required": ["input_tokens", "output_tokens"],
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
},
|
|
26
|
+
"status": { "type": "string", "enum": ["ready", "review"] },
|
|
27
|
+
"verdict": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["now", "later", "after_event", "not_requested", "declined", "unclear"]
|
|
30
|
+
},
|
|
31
|
+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
32
|
+
"probabilities": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"propertyNames": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["now", "later", "after_event", "not_requested", "declined", "unclear"]
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
39
|
+
"required": ["now", "later", "after_event", "not_requested", "declined", "unclear"]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": ["model", "usage", "status", "verdict", "confidence", "probabilities"],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -3,101 +3,17 @@
|
|
|
3
3
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
|
-
"gameState": {
|
|
7
|
-
|
|
8
|
-
"$ref": "#/$defs/__schema0"
|
|
9
|
-
},
|
|
10
|
-
"playerState": {
|
|
11
|
-
"description": "Information about the player making this decision.",
|
|
12
|
-
"$ref": "#/$defs/__schema1"
|
|
13
|
-
},
|
|
6
|
+
"gameState": { "description": "The current game information available for this decision." },
|
|
7
|
+
"playerState": { "description": "Information about the player making this decision." },
|
|
14
8
|
"legalActions": {
|
|
15
9
|
"type": "array",
|
|
16
|
-
"items": {
|
|
10
|
+
"items": {},
|
|
17
11
|
"description": "The available actions the player can choose from."
|
|
18
12
|
},
|
|
19
|
-
"rules": {
|
|
20
|
-
|
|
21
|
-
"$ref": "#/$defs/__schema3"
|
|
22
|
-
},
|
|
23
|
-
"objective": {
|
|
24
|
-
"description": "What the player is trying to accomplish.",
|
|
25
|
-
"$ref": "#/$defs/__schema4"
|
|
26
|
-
}
|
|
13
|
+
"rules": { "description": "Game rules and explanations of game-specific information." },
|
|
14
|
+
"objective": { "description": "What the player is trying to accomplish." }
|
|
27
15
|
},
|
|
28
|
-
"required": ["gameState", "playerState", "legalActions"]
|
|
29
|
-
"$defs": {
|
|
30
|
-
"__schema0": {
|
|
31
|
-
"anyOf": [
|
|
32
|
-
{ "type": "string" },
|
|
33
|
-
{ "type": "number" },
|
|
34
|
-
{ "type": "boolean" },
|
|
35
|
-
{ "type": "null" },
|
|
36
|
-
{ "type": "array", "items": { "$ref": "#/$defs/__schema0" } },
|
|
37
|
-
{
|
|
38
|
-
"type": "object",
|
|
39
|
-
"propertyNames": { "type": "string" },
|
|
40
|
-
"additionalProperties": { "$ref": "#/$defs/__schema0" }
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
"__schema1": {
|
|
45
|
-
"anyOf": [
|
|
46
|
-
{ "type": "string" },
|
|
47
|
-
{ "type": "number" },
|
|
48
|
-
{ "type": "boolean" },
|
|
49
|
-
{ "type": "null" },
|
|
50
|
-
{ "type": "array", "items": { "$ref": "#/$defs/__schema1" } },
|
|
51
|
-
{
|
|
52
|
-
"type": "object",
|
|
53
|
-
"propertyNames": { "type": "string" },
|
|
54
|
-
"additionalProperties": { "$ref": "#/$defs/__schema1" }
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
"__schema2": {
|
|
59
|
-
"anyOf": [
|
|
60
|
-
{ "type": "string" },
|
|
61
|
-
{ "type": "number" },
|
|
62
|
-
{ "type": "boolean" },
|
|
63
|
-
{ "type": "null" },
|
|
64
|
-
{ "type": "array", "items": { "$ref": "#/$defs/__schema2" } },
|
|
65
|
-
{
|
|
66
|
-
"type": "object",
|
|
67
|
-
"propertyNames": { "type": "string" },
|
|
68
|
-
"additionalProperties": { "$ref": "#/$defs/__schema2" }
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
"__schema3": {
|
|
73
|
-
"anyOf": [
|
|
74
|
-
{ "type": "string" },
|
|
75
|
-
{ "type": "number" },
|
|
76
|
-
{ "type": "boolean" },
|
|
77
|
-
{ "type": "null" },
|
|
78
|
-
{ "type": "array", "items": { "$ref": "#/$defs/__schema3" } },
|
|
79
|
-
{
|
|
80
|
-
"type": "object",
|
|
81
|
-
"propertyNames": { "type": "string" },
|
|
82
|
-
"additionalProperties": { "$ref": "#/$defs/__schema3" }
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
},
|
|
86
|
-
"__schema4": {
|
|
87
|
-
"anyOf": [
|
|
88
|
-
{ "type": "string" },
|
|
89
|
-
{ "type": "number" },
|
|
90
|
-
{ "type": "boolean" },
|
|
91
|
-
{ "type": "null" },
|
|
92
|
-
{ "type": "array", "items": { "$ref": "#/$defs/__schema4" } },
|
|
93
|
-
{
|
|
94
|
-
"type": "object",
|
|
95
|
-
"propertyNames": { "type": "string" },
|
|
96
|
-
"additionalProperties": { "$ref": "#/$defs/__schema4" }
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
}
|
|
16
|
+
"required": ["gameState", "playerState", "legalActions"]
|
|
101
17
|
},
|
|
102
18
|
"resultSchema": {
|
|
103
19
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -120,8 +36,7 @@
|
|
|
120
36
|
"description": "The internal Choice label associated with the selected action."
|
|
121
37
|
},
|
|
122
38
|
"action": {
|
|
123
|
-
"description": "The original selected action, preserving any existing game ID."
|
|
124
|
-
"$ref": "#/$defs/__schema0"
|
|
39
|
+
"description": "The original selected action, preserving any existing game ID."
|
|
125
40
|
},
|
|
126
41
|
"confidence": {
|
|
127
42
|
"type": "number",
|
|
@@ -140,22 +55,6 @@
|
|
|
140
55
|
"additionalProperties": false
|
|
141
56
|
},
|
|
142
57
|
{ "type": "null" }
|
|
143
|
-
]
|
|
144
|
-
"$defs": {
|
|
145
|
-
"__schema0": {
|
|
146
|
-
"anyOf": [
|
|
147
|
-
{ "type": "string" },
|
|
148
|
-
{ "type": "number" },
|
|
149
|
-
{ "type": "boolean" },
|
|
150
|
-
{ "type": "null" },
|
|
151
|
-
{ "type": "array", "items": { "$ref": "#/$defs/__schema0" } },
|
|
152
|
-
{
|
|
153
|
-
"type": "object",
|
|
154
|
-
"propertyNames": { "type": "string" },
|
|
155
|
-
"additionalProperties": { "$ref": "#/$defs/__schema0" }
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
}
|
|
58
|
+
]
|
|
160
59
|
}
|
|
161
60
|
}
|
|
@@ -24,6 +24,7 @@ export const recipeLoaders = {
|
|
|
24
24
|
'bug-report-completeness': () => import('../../recipes/bug-report-completeness/index.js').then((recipe) => (input, options) => recipe.bugReportCompleteness(recipe.bugReportCompletenessInputSchema.parse(input), options)),
|
|
25
25
|
'buying-intent': () => import('../../recipes/buying-intent/index.js').then((recipe) => (input, options) => recipe.buyingIntent(recipe.buyingIntentInputSchema.parse(input), options)),
|
|
26
26
|
'cache-match': () => import('../../recipes/cache-match/index.js').then((recipe) => (input, options) => recipe.cacheMatch(recipe.cacheMatchInputSchema.parse(input), options)),
|
|
27
|
+
'callback-responsibility': () => import('../../recipes/callback-responsibility/index.js').then((recipe) => (input, options) => recipe.callbackResponsibility(recipe.callbackResponsibilityInputSchema.parse(input), options)),
|
|
27
28
|
'cancellation-check': () => import('../../recipes/cancellation-check/index.js').then((recipe) => (input, options) => recipe.cancellationCheck(recipe.cancellationCheckInputSchema.parse(input), options)),
|
|
28
29
|
'care-urgency-wording': () => import('../../recipes/care-urgency-wording/index.js').then((recipe) => (input, options) => recipe.careUrgencyWording(recipe.careUrgencyWordingInputSchema.parse(input), options)),
|
|
29
30
|
'category-fit': () => import('../../recipes/category-fit/index.js').then((recipe) => (input, options) => recipe.categoryFit(recipe.categoryFitInputSchema.parse(input), options)),
|
|
@@ -51,6 +52,7 @@ export const recipeLoaders = {
|
|
|
51
52
|
'consent-request': () => import('../../recipes/consent-request/index.js').then((recipe) => (input, options) => recipe.consentRequest(recipe.consentRequestInputSchema.parse(input), options)),
|
|
52
53
|
'consent-scope-fit': () => import('../../recipes/consent-scope-fit/index.js').then((recipe) => (input, options) => recipe.consentScopeFit(recipe.consentScopeFitInputSchema.parse(input), options)),
|
|
53
54
|
'constraint-strength': () => import('../../recipes/constraint-strength/index.js').then((recipe) => (input, options) => recipe.constraintStrength(recipe.constraintStrengthInputSchema.parse(input), options)),
|
|
55
|
+
'contact-opt-out': () => import('../../recipes/contact-opt-out/index.js').then((recipe) => (input, options) => recipe.contactOptOut(recipe.contactOptOutInputSchema.parse(input), options)),
|
|
54
56
|
'content-facets': () => import('../../recipes/content-facets/index.js').then((recipe) => (input, options) => recipe.contentFacets(recipe.contentFacetsInputSchema.parse(input), options)),
|
|
55
57
|
'content-freshness-signal': () => import('../../recipes/content-freshness-signal/index.js').then((recipe) => (input, options) => recipe.contentFreshnessSignal(recipe.contentFreshnessSignalInputSchema.parse(input), options)),
|
|
56
58
|
'context-prune': () => import('../../recipes/context-prune/index.js').then((recipe) => (input, options) => recipe.contextPrune(recipe.contextPruneInputSchema.parse(input), options)),
|
|
@@ -91,6 +93,7 @@ export const recipeLoaders = {
|
|
|
91
93
|
'financial-advice-signal': () => import('../../recipes/financial-advice-signal/index.js').then((recipe) => (input, options) => recipe.financialAdviceSignal(recipe.financialAdviceSignalInputSchema.parse(input), options)),
|
|
92
94
|
'finger-actions': () => import('../../recipes/finger-actions/index.js').then((recipe) => (input, options) => recipe.fingerActions(recipe.fingerActionsInputSchema.parse(input), options)),
|
|
93
95
|
'followup-link': () => import('../../recipes/followup-link/index.js').then((recipe) => (input, options) => recipe.followupLink(recipe.followupLinkInputSchema.parse(input), options)),
|
|
96
|
+
'followup-timing': () => import('../../recipes/followup-timing/index.js').then((recipe) => (input, options) => recipe.followupTiming(recipe.followupTimingInputSchema.parse(input), options)),
|
|
94
97
|
'forecast-confidence-wording': () => import('../../recipes/forecast-confidence-wording/index.js').then((recipe) => (input, options) => recipe.forecastConfidenceWording(recipe.forecastConfidenceWordingInputSchema.parse(input), options)),
|
|
95
98
|
'format-fit': () => import('../../recipes/format-fit/index.js').then((recipe) => (input, options) => recipe.formatFit(recipe.formatFitInputSchema.parse(input), options)),
|
|
96
99
|
'freshness-needed': () => import('../../recipes/freshness-needed/index.js').then((recipe) => (input, options) => recipe.freshnessNeeded(recipe.freshnessNeededInputSchema.parse(input), options)),
|
|
@@ -523,6 +523,30 @@ export const recipeMetadata = [
|
|
|
523
523
|
},
|
|
524
524
|
],
|
|
525
525
|
},
|
|
526
|
+
{
|
|
527
|
+
id: 'callback-responsibility',
|
|
528
|
+
title: 'Identify who should initiate a callback',
|
|
529
|
+
description: 'Which party is expected to initiate the next call?',
|
|
530
|
+
category: 'conversation',
|
|
531
|
+
tags: ['conversation', 'callback', 'ownership', 'handover'],
|
|
532
|
+
limitations: [
|
|
533
|
+
'Requires speaker roles. Does not infer identities from names or assume every agent speaks for the business.',
|
|
534
|
+
'Only identifies initiation of a future call, including a conditional call. Does not assign general task ownership or verify the call occurred.',
|
|
535
|
+
'An unaccepted suggestion, contradictory exchange, or unresolved pronoun requires review.',
|
|
536
|
+
],
|
|
537
|
+
useWhen: 'You need to decide whether the business or customer is expected to initiate the next call.',
|
|
538
|
+
related: [
|
|
539
|
+
{
|
|
540
|
+
id: 'promise-check',
|
|
541
|
+
reason: 'Use promise-check to check whether a draft introduces an unsupported commitment.',
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
id: 'commitment-strength',
|
|
545
|
+
reason: 'Use commitment-strength to grade how firmly a statement commits its speaker.',
|
|
546
|
+
},
|
|
547
|
+
{ id: 'followup-timing', reason: 'Use followup-timing for when another contact is wanted.' },
|
|
548
|
+
],
|
|
549
|
+
},
|
|
526
550
|
{
|
|
527
551
|
id: 'cancellation-check',
|
|
528
552
|
title: 'Check cancellation intent',
|
|
@@ -1161,6 +1185,33 @@ export const recipeMetadata = [
|
|
|
1161
1185
|
},
|
|
1162
1186
|
],
|
|
1163
1187
|
},
|
|
1188
|
+
{
|
|
1189
|
+
id: 'contact-opt-out',
|
|
1190
|
+
title: 'Recognize a contact opt-out',
|
|
1191
|
+
description: 'What scope of future contact does the sender ask to stop?',
|
|
1192
|
+
category: 'conversation',
|
|
1193
|
+
tags: ['conversation', 'contact', 'opt-out', 'preferences'],
|
|
1194
|
+
limitations: [
|
|
1195
|
+
'Reports the expressed scope category, not legal consent or permission to contact. A none result never grants consent.',
|
|
1196
|
+
'Does not resolve channel or campaign identifiers or change subscription settings. Applications own those mappings and prior preferences.',
|
|
1197
|
+
'Mixed channel and campaign restrictions, conflicting requests, and missing references require review.',
|
|
1198
|
+
],
|
|
1199
|
+
useWhen: 'You need to distinguish stopping all contact from stopping a channel or campaign.',
|
|
1200
|
+
related: [
|
|
1201
|
+
{
|
|
1202
|
+
id: 'cancellation-check',
|
|
1203
|
+
reason: 'Use cancellation-check for cancelling a product or service, rather than future contact.',
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
id: 'buying-intent',
|
|
1207
|
+
reason: 'Use buying-intent for purchase interest. Declining an offer alone does not establish an opt-out.',
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
id: 'followup-timing',
|
|
1211
|
+
reason: 'Use followup-timing for a requested delay or condition for future contact.',
|
|
1212
|
+
},
|
|
1213
|
+
],
|
|
1214
|
+
},
|
|
1164
1215
|
{
|
|
1165
1216
|
id: 'content-facets',
|
|
1166
1217
|
title: 'Label article facets',
|
|
@@ -2047,6 +2098,33 @@ export const recipeMetadata = [
|
|
|
2047
2098
|
},
|
|
2048
2099
|
],
|
|
2049
2100
|
},
|
|
2101
|
+
{
|
|
2102
|
+
id: 'followup-timing',
|
|
2103
|
+
title: 'Recognize requested follow-up timing',
|
|
2104
|
+
description: 'When does the sender want another contact, if any?',
|
|
2105
|
+
category: 'conversation',
|
|
2106
|
+
tags: ['conversation', 'followup', 'timing', 'scheduling'],
|
|
2107
|
+
limitations: [
|
|
2108
|
+
'Does not extract dates, time zones, or event identifiers and does not schedule contact.',
|
|
2109
|
+
'A timing request does not override stored contact preferences or establish permission to contact.',
|
|
2110
|
+
'Missing references, unresolved alternatives, and conflicting timing instructions require review.',
|
|
2111
|
+
],
|
|
2112
|
+
useWhen: 'You need to distinguish immediate contact, a later time, an event condition, and no follow-up request.',
|
|
2113
|
+
related: [
|
|
2114
|
+
{
|
|
2115
|
+
id: 'response-needed',
|
|
2116
|
+
reason: 'Use response-needed to decide whether the current message needs a reply.',
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
id: 'contact-opt-out',
|
|
2120
|
+
reason: 'Use contact-opt-out for the scope of a request to stop future contact.',
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
id: 'callback-responsibility',
|
|
2124
|
+
reason: 'Use callback-responsibility to identify who should initiate a call.',
|
|
2125
|
+
},
|
|
2126
|
+
],
|
|
2127
|
+
},
|
|
2050
2128
|
{
|
|
2051
2129
|
id: 'forecast-confidence-wording',
|
|
2052
2130
|
title: 'Grade the certainty of a financial projection',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const recipeNames: readonly ["action-compare", "action-effects", "action-reversibility", "action-scope", "age-appropriateness", "alert-actionability", "answer-consistency", "answer-coverage", "answer-disclosures", "answer-grade", "answer-invalidation", "answer-relevance", "answerability", "appeal-grounds-kind", "appointment-request-kind", "argument-fit", "attempted-step", "attribution-match", "audience-fit", "breaking-change-signal", "budget-fit", "budget-narrative-fit", "bug-report-completeness", "buying-intent", "cache-match", "cancellation-check", "care-urgency-wording", "category-fit", "causal-attribution", "causal-language-strength", "certainty-match", "change-meaning", "change-risk", "change-window-fit", "checkers-move", "choose-action", "citation-match", "citation-needed", "claim-facets", "claim-stance", "clarify", "clause-conflict", "clause-kind", "clickbait-level", "commit-message-fit", "commitment-strength", "comparable-fit", "completion-gate", "confirmation-match", "consent-request", "consent-scope-fit", "constraint-strength", "content-facets", "content-freshness-signal", "context-prune", "context-role", "continuation-compare", "correction-target", "corrective-action-fit", "daw-request-kind", "deadline-risk", "defect-report-facets", "delegation-fit", "diff-hazards", "disclosure-facets", "dispute-kind", "document-role", "draft-compare", "dynamic-change", "eligibility-facets", "emotion-kind", "entity-match", "error-acknowledgment", "escalation-wording", "evaluation-mention", "evidence-conflict", "evidence-independence", "evidence-novelty", "evidence-strength", "exercise-select", "expense-category", "explanation-level", "extraction-fidelity", "fact-stability", "failure-kind", "fair-housing-wording", "feedback-actionability", "feedback-kind", "field-select", "financial-advice-signal", "finger-actions", "followup-link", "forecast-confidence-wording", "format-fit", "freshness-needed", "frustration-signal", "funder-fit", "game-action", "game-phase", "goal-drift", "grounding-level", "guest-request-facets", "handoff", "handoff-completeness", "headline-fit", "incident-match", "incident-severity-wording", "injection-signal", "instruction-clarity", "instruction-conflict", "instruction-fit", "instruction-priority", "instruction-readability", "instrument-issue-kind", "instrument-report-facets", "intake-question-fit", "intent-change", "invoice-facets", "issue-impact", "issue-recurrence", "itinerary-feasibility", "job-post-facets", "length-fit", "listener-request-kind", "listing-compare", "listing-fact-consistency", "log-line-kind", "loss-cause-kind", "lyric-mood-fit", "maintenance-hazard-wording", "medication-mention", "memory-relation", "memory-scope", "memory-subject", "memory-value", "message-facets", "methods-facets", "model-route", "modulation-moment", "mood-match", "mood-request", "motivation-source", "move-explanation-fit", "narrative-consistency", "next-chord", "next-duration", "next-note", "notice-facets", "novelty-claim-level", "objection-kind", "objective-fit", "offer-terms-facets", "outcome-framing", "passage-compare", "passage-difficulty", "passage-duplicate", "passage-mood", "passage-standalone", "performance-feedback-facets", "persuasion-technique", "phrase-complete", "pii-presence", "plan-completeness", "policy-compliance", "policy-severity", "politeness-level", "postmortem-facets", "preference-kind", "priority-compare", "privacy-notice-facets", "product-match", "progress-stall", "promise-check", "proposal-facets", "qualification-evidence", "query-equivalence", "query-specificity", "question-assumption", "question-leading", "question-relevance", "reconciliation-match", "reference-resolve", "repeated-attempt", "repetition-level", "reply-template-match", "report-facets", "requirement-testability", "rerank", "resolution-check", "response-needed", "response-refusal", "result-outcome", "result-plausibility", "result-usefulness", "retrieval-needed", "retry-worthwhile", "review-comment-kind", "review-facets", "review-recommendation-kind", "review-response-fit", "rollback-signal", "root-cause-depth", "route", "route-many", "rule-compliance", "runbook-fit", "safety-incident-kind", "satisfaction-signal", "search-intent-kind", "sentiment-shift", "settlement-offer-facets", "shipment-issue-kind", "slot-fit", "sound-match", "source-applicability", "spam-signal", "stage-evidence", "step-complete", "step-progress", "style-kind", "summary-coverage", "symptom-facets", "take-turn", "task-complexity", "task-dependency", "task-duplicate", "task-overlap", "tempo-change", "tension-level", "ticket-match", "tone-check", "tool-call-gate", "tool-compare", "tool-fit", "topic-shift", "trip-purpose-kind", "troubleshooting-fit", "turn-intent", "uncertainty-expression", "urgency-signal", "verify", "wake-gate", "workaround-fit"];
|
|
1
|
+
export declare const recipeNames: readonly ["action-compare", "action-effects", "action-reversibility", "action-scope", "age-appropriateness", "alert-actionability", "answer-consistency", "answer-coverage", "answer-disclosures", "answer-grade", "answer-invalidation", "answer-relevance", "answerability", "appeal-grounds-kind", "appointment-request-kind", "argument-fit", "attempted-step", "attribution-match", "audience-fit", "breaking-change-signal", "budget-fit", "budget-narrative-fit", "bug-report-completeness", "buying-intent", "cache-match", "callback-responsibility", "cancellation-check", "care-urgency-wording", "category-fit", "causal-attribution", "causal-language-strength", "certainty-match", "change-meaning", "change-risk", "change-window-fit", "checkers-move", "choose-action", "citation-match", "citation-needed", "claim-facets", "claim-stance", "clarify", "clause-conflict", "clause-kind", "clickbait-level", "commit-message-fit", "commitment-strength", "comparable-fit", "completion-gate", "confirmation-match", "consent-request", "consent-scope-fit", "constraint-strength", "contact-opt-out", "content-facets", "content-freshness-signal", "context-prune", "context-role", "continuation-compare", "correction-target", "corrective-action-fit", "daw-request-kind", "deadline-risk", "defect-report-facets", "delegation-fit", "diff-hazards", "disclosure-facets", "dispute-kind", "document-role", "draft-compare", "dynamic-change", "eligibility-facets", "emotion-kind", "entity-match", "error-acknowledgment", "escalation-wording", "evaluation-mention", "evidence-conflict", "evidence-independence", "evidence-novelty", "evidence-strength", "exercise-select", "expense-category", "explanation-level", "extraction-fidelity", "fact-stability", "failure-kind", "fair-housing-wording", "feedback-actionability", "feedback-kind", "field-select", "financial-advice-signal", "finger-actions", "followup-link", "followup-timing", "forecast-confidence-wording", "format-fit", "freshness-needed", "frustration-signal", "funder-fit", "game-action", "game-phase", "goal-drift", "grounding-level", "guest-request-facets", "handoff", "handoff-completeness", "headline-fit", "incident-match", "incident-severity-wording", "injection-signal", "instruction-clarity", "instruction-conflict", "instruction-fit", "instruction-priority", "instruction-readability", "instrument-issue-kind", "instrument-report-facets", "intake-question-fit", "intent-change", "invoice-facets", "issue-impact", "issue-recurrence", "itinerary-feasibility", "job-post-facets", "length-fit", "listener-request-kind", "listing-compare", "listing-fact-consistency", "log-line-kind", "loss-cause-kind", "lyric-mood-fit", "maintenance-hazard-wording", "medication-mention", "memory-relation", "memory-scope", "memory-subject", "memory-value", "message-facets", "methods-facets", "model-route", "modulation-moment", "mood-match", "mood-request", "motivation-source", "move-explanation-fit", "narrative-consistency", "next-chord", "next-duration", "next-note", "notice-facets", "novelty-claim-level", "objection-kind", "objective-fit", "offer-terms-facets", "outcome-framing", "passage-compare", "passage-difficulty", "passage-duplicate", "passage-mood", "passage-standalone", "performance-feedback-facets", "persuasion-technique", "phrase-complete", "pii-presence", "plan-completeness", "policy-compliance", "policy-severity", "politeness-level", "postmortem-facets", "preference-kind", "priority-compare", "privacy-notice-facets", "product-match", "progress-stall", "promise-check", "proposal-facets", "qualification-evidence", "query-equivalence", "query-specificity", "question-assumption", "question-leading", "question-relevance", "reconciliation-match", "reference-resolve", "repeated-attempt", "repetition-level", "reply-template-match", "report-facets", "requirement-testability", "rerank", "resolution-check", "response-needed", "response-refusal", "result-outcome", "result-plausibility", "result-usefulness", "retrieval-needed", "retry-worthwhile", "review-comment-kind", "review-facets", "review-recommendation-kind", "review-response-fit", "rollback-signal", "root-cause-depth", "route", "route-many", "rule-compliance", "runbook-fit", "safety-incident-kind", "satisfaction-signal", "search-intent-kind", "sentiment-shift", "settlement-offer-facets", "shipment-issue-kind", "slot-fit", "sound-match", "source-applicability", "spam-signal", "stage-evidence", "step-complete", "step-progress", "style-kind", "summary-coverage", "symptom-facets", "take-turn", "task-complexity", "task-dependency", "task-duplicate", "task-overlap", "tempo-change", "tension-level", "ticket-match", "tone-check", "tool-call-gate", "tool-compare", "tool-fit", "topic-shift", "trip-purpose-kind", "troubleshooting-fit", "turn-intent", "uncertainty-expression", "urgency-signal", "verify", "wake-gate", "workaround-fit"];
|
|
@@ -25,6 +25,7 @@ export const recipeNames = [
|
|
|
25
25
|
'bug-report-completeness',
|
|
26
26
|
'buying-intent',
|
|
27
27
|
'cache-match',
|
|
28
|
+
'callback-responsibility',
|
|
28
29
|
'cancellation-check',
|
|
29
30
|
'care-urgency-wording',
|
|
30
31
|
'category-fit',
|
|
@@ -52,6 +53,7 @@ export const recipeNames = [
|
|
|
52
53
|
'consent-request',
|
|
53
54
|
'consent-scope-fit',
|
|
54
55
|
'constraint-strength',
|
|
56
|
+
'contact-opt-out',
|
|
55
57
|
'content-facets',
|
|
56
58
|
'content-freshness-signal',
|
|
57
59
|
'context-prune',
|
|
@@ -92,6 +94,7 @@ export const recipeNames = [
|
|
|
92
94
|
'financial-advice-signal',
|
|
93
95
|
'finger-actions',
|
|
94
96
|
'followup-link',
|
|
97
|
+
'followup-timing',
|
|
95
98
|
'forecast-confidence-wording',
|
|
96
99
|
'format-fit',
|
|
97
100
|
'freshness-needed',
|
package/dist/catalog/schema.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare const recipeNameSchema: z.ZodEnum<{
|
|
|
25
25
|
"bug-report-completeness": "bug-report-completeness";
|
|
26
26
|
"buying-intent": "buying-intent";
|
|
27
27
|
"cache-match": "cache-match";
|
|
28
|
+
"callback-responsibility": "callback-responsibility";
|
|
28
29
|
"cancellation-check": "cancellation-check";
|
|
29
30
|
"care-urgency-wording": "care-urgency-wording";
|
|
30
31
|
"category-fit": "category-fit";
|
|
@@ -52,6 +53,7 @@ export declare const recipeNameSchema: z.ZodEnum<{
|
|
|
52
53
|
"consent-request": "consent-request";
|
|
53
54
|
"consent-scope-fit": "consent-scope-fit";
|
|
54
55
|
"constraint-strength": "constraint-strength";
|
|
56
|
+
"contact-opt-out": "contact-opt-out";
|
|
55
57
|
"content-facets": "content-facets";
|
|
56
58
|
"content-freshness-signal": "content-freshness-signal";
|
|
57
59
|
"context-prune": "context-prune";
|
|
@@ -92,6 +94,7 @@ export declare const recipeNameSchema: z.ZodEnum<{
|
|
|
92
94
|
"financial-advice-signal": "financial-advice-signal";
|
|
93
95
|
"finger-actions": "finger-actions";
|
|
94
96
|
"followup-link": "followup-link";
|
|
97
|
+
"followup-timing": "followup-timing";
|
|
95
98
|
"forecast-confidence-wording": "forecast-confidence-wording";
|
|
96
99
|
"format-fit": "format-fit";
|
|
97
100
|
"freshness-needed": "freshness-needed";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runEvaluationCommand(args: string[]): Promise<unknown>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import { compare, evaluate, readEvaluationCases, readRun, replay } from '../evaluation/index.js';
|
|
4
|
+
import { evaluationPolicySchema, priceSchema } from '../evaluation/schema.js';
|
|
5
|
+
export async function runEvaluationCommand(args) {
|
|
6
|
+
const command = args[0];
|
|
7
|
+
if (command === 'evaluate')
|
|
8
|
+
return evaluateFromFile(args.slice(1));
|
|
9
|
+
if (command === 'replay')
|
|
10
|
+
return replayArchive(args.slice(1));
|
|
11
|
+
if (command === 'compare' && args.length === 3)
|
|
12
|
+
return compare(await readRun(args[1]), await readRun(args[2]));
|
|
13
|
+
throw new Error('Invalid evaluation command. Run jev-recipes --help for usage.');
|
|
14
|
+
}
|
|
15
|
+
async function evaluateFromFile(args) {
|
|
16
|
+
const { values, positionals } = parseArgs({
|
|
17
|
+
args,
|
|
18
|
+
allowPositionals: true,
|
|
19
|
+
options: {
|
|
20
|
+
cases: { type: 'string' },
|
|
21
|
+
out: { type: 'string' },
|
|
22
|
+
model: { type: 'string' },
|
|
23
|
+
concurrency: { type: 'string' },
|
|
24
|
+
'max-cases': { type: 'string' },
|
|
25
|
+
'max-requests': { type: 'string' },
|
|
26
|
+
'min-confidence': { type: 'string' },
|
|
27
|
+
split: { type: 'string' },
|
|
28
|
+
policy: { type: 'string' },
|
|
29
|
+
prices: { type: 'string' },
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
if (positionals.length !== 1 || !values.cases || !values.out)
|
|
33
|
+
throw new Error('Usage: jev-recipes evaluate <recipe> --cases <file.jsonl> --out <new-directory>');
|
|
34
|
+
if (values.policy && values['min-confidence'] !== undefined)
|
|
35
|
+
throw new Error('Use --policy or --min-confidence, not both.');
|
|
36
|
+
const policy = values.policy
|
|
37
|
+
? evaluationPolicySchema.parse(JSON.parse(await readFile(values.policy, 'utf8')))
|
|
38
|
+
: values['min-confidence'] === undefined
|
|
39
|
+
? {}
|
|
40
|
+
: { minConfidence: Number(values['min-confidence']) };
|
|
41
|
+
const price = values.prices
|
|
42
|
+
? priceSchema.parse(JSON.parse(await readFile(values.prices, 'utf8')))
|
|
43
|
+
: undefined;
|
|
44
|
+
if (!process.env.TYPESAFE_API_KEY?.trim())
|
|
45
|
+
throw new Error('Set TYPESAFE_API_KEY before live evaluation. Replay and compare work offline.');
|
|
46
|
+
const run = await evaluate(positionals[0], await readEvaluationCases(values.cases), {
|
|
47
|
+
out: values.out,
|
|
48
|
+
policy,
|
|
49
|
+
...(values.model === undefined ? {} : { model: values.model }),
|
|
50
|
+
...(price === undefined ? {} : { price }),
|
|
51
|
+
...(values.split === undefined ? {} : { split: values.split }),
|
|
52
|
+
...(values.concurrency === undefined ? {} : { concurrency: Number(values.concurrency) }),
|
|
53
|
+
...(values['max-cases'] === undefined ? {} : { maxCases: Number(values['max-cases']) }),
|
|
54
|
+
...(values['max-requests'] === undefined
|
|
55
|
+
? {}
|
|
56
|
+
: { maxRequests: Number(values['max-requests']) }),
|
|
57
|
+
});
|
|
58
|
+
return { archive: values.out, runId: run.runId, report: run.report };
|
|
59
|
+
}
|
|
60
|
+
async function replayArchive(args) {
|
|
61
|
+
const { values, positionals } = parseArgs({
|
|
62
|
+
args,
|
|
63
|
+
allowPositionals: true,
|
|
64
|
+
options: {
|
|
65
|
+
'min-confidence': { type: 'string' },
|
|
66
|
+
out: { type: 'string' },
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
if (positionals.length !== 1)
|
|
70
|
+
throw new Error('Usage: jev-recipes replay <archive> [--min-confidence <number>] [--out <new-directory>]');
|
|
71
|
+
const source = await readRun(positionals[0]);
|
|
72
|
+
const policy = values['min-confidence'] === undefined
|
|
73
|
+
? source.policy
|
|
74
|
+
: { minConfidence: Number(values['min-confidence']) };
|
|
75
|
+
const run = await replay(source, policy, values.out);
|
|
76
|
+
return {
|
|
77
|
+
...(values.out ? { archive: values.out } : {}),
|
|
78
|
+
sourceRun: source.runId,
|
|
79
|
+
policy: run.policy,
|
|
80
|
+
report: run.report,
|
|
81
|
+
};
|
|
82
|
+
}
|
package/dist/cli/index.js
CHANGED
|
@@ -6,6 +6,10 @@ import { loadRecipe } from '../catalog/runner.js';
|
|
|
6
6
|
import { listRecipes, describeRecipe, recipeCategorySchema } from '../catalog/index.js';
|
|
7
7
|
import { commandArgumentsSchema, demoFixtureSchema } from './schema.js';
|
|
8
8
|
async function main() {
|
|
9
|
+
if (['evaluate', 'replay', 'compare'].includes(process.argv[2] ?? '')) {
|
|
10
|
+
const { runEvaluationCommand } = await import('./evaluation.js');
|
|
11
|
+
return printJson(await runEvaluationCommand(process.argv.slice(2)));
|
|
12
|
+
}
|
|
9
13
|
const command = parseCommandArguments(process.argv.slice(2));
|
|
10
14
|
switch (command[0]) {
|
|
11
15
|
case '--help':
|
|
@@ -40,6 +44,15 @@ function printHelp() {
|
|
|
40
44
|
jev-recipes demo <recipe|all> Run offline fixtures (no model calls)
|
|
41
45
|
jev-recipes example <recipe> Print example input as JSON
|
|
42
46
|
jev-recipes run <recipe> <file|-> Run live with a JSON file or stdin
|
|
47
|
+
jev-recipes evaluate <recipe> --cases <file.jsonl> --out <new-directory>
|
|
48
|
+
Record a live evaluation and every response
|
|
49
|
+
[--concurrency 4] [--max-cases 1000] [--max-requests 1000] [--model <model>]
|
|
50
|
+
[--split development|held-out] [--min-confidence <number> | --policy <policy.json>]
|
|
51
|
+
[--prices <prices.json>]
|
|
52
|
+
jev-recipes replay <archive> [--min-confidence <number>] [--out <new-directory>]
|
|
53
|
+
Replay recorded responses without network calls
|
|
54
|
+
jev-recipes compare <baseline> <candidate>
|
|
55
|
+
Compare archives with matching data and labels
|
|
43
56
|
jev-recipes --version
|
|
44
57
|
|
|
45
58
|
Categories: ${recipeCategorySchema.options.join(', ')}. Quote multi-word search queries.
|