jev-recipes 0.5.1 → 0.5.3
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 +7 -5
- package/dist/catalog/generated/details/causal-attribution.json +55 -0
- package/dist/catalog/generated/details/checkers-move.json +1 -2
- package/dist/catalog/generated/details/choose-action.json +1 -2
- package/dist/catalog/generated/details/game-action.json +161 -0
- package/dist/catalog/generated/details/issue-recurrence.json +46 -0
- package/dist/catalog/generated/details/memory-subject.json +49 -0
- package/dist/catalog/generated/details/motivation-source.json +55 -0
- package/dist/catalog/generated/details/outcome-framing.json +49 -0
- package/dist/catalog/generated/details/question-assumption.json +49 -0
- package/dist/catalog/generated/loaders.js +7 -0
- package/dist/catalog/generated/metadata.js +260 -1
- package/dist/catalog/generated/names.d.ts +1 -1
- package/dist/catalog/generated/names.js +7 -0
- package/dist/catalog/schema.d.ts +7 -0
- package/dist/cli/schema.d.ts +21 -0
- package/dist/recipes/causal-attribution/demo.json +27 -0
- package/dist/recipes/causal-attribution/index.d.ts +5 -0
- package/dist/recipes/causal-attribution/index.js +17 -0
- package/dist/recipes/causal-attribution/schema.d.ts +43 -0
- package/dist/recipes/causal-attribution/schema.js +23 -0
- package/dist/recipes/checkers-move/schema.js +1 -2
- package/dist/recipes/choose-action/schema.js +6 -2
- package/dist/recipes/claim-stance/schema.d.ts +3 -3
- package/dist/recipes/game-action/demo.json +24 -0
- package/dist/recipes/game-action/index.d.ts +5 -0
- package/dist/recipes/game-action/index.js +30 -0
- package/dist/recipes/game-action/schema.d.ts +21 -0
- package/dist/recipes/game-action/schema.js +21 -0
- package/dist/recipes/issue-recurrence/demo.json +27 -0
- package/dist/recipes/issue-recurrence/index.d.ts +5 -0
- package/dist/recipes/issue-recurrence/index.js +16 -0
- package/dist/recipes/issue-recurrence/schema.d.ts +40 -0
- package/dist/recipes/issue-recurrence/schema.js +17 -0
- package/dist/recipes/memory-subject/demo.json +26 -0
- package/dist/recipes/memory-subject/index.d.ts +5 -0
- package/dist/recipes/memory-subject/index.js +16 -0
- package/dist/recipes/memory-subject/schema.d.ts +40 -0
- package/dist/recipes/memory-subject/schema.js +17 -0
- package/dist/recipes/motivation-source/demo.json +27 -0
- package/dist/recipes/motivation-source/index.d.ts +5 -0
- package/dist/recipes/motivation-source/index.js +17 -0
- package/dist/recipes/motivation-source/schema.d.ts +43 -0
- package/dist/recipes/motivation-source/schema.js +23 -0
- package/dist/recipes/outcome-framing/demo.json +27 -0
- package/dist/recipes/outcome-framing/index.d.ts +5 -0
- package/dist/recipes/outcome-framing/index.js +17 -0
- package/dist/recipes/outcome-framing/schema.d.ts +43 -0
- package/dist/recipes/outcome-framing/schema.js +17 -0
- package/dist/recipes/question-assumption/demo.json +25 -0
- package/dist/recipes/question-assumption/index.d.ts +5 -0
- package/dist/recipes/question-assumption/index.js +15 -0
- package/dist/recipes/question-assumption/schema.d.ts +37 -0
- package/dist/recipes/question-assumption/schema.js +17 -0
- package/dist/recipes/question-leading/schema.d.ts +3 -3
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.js +7 -0
- package/package.json +29 -2
- package/CHANGELOG.md +0 -45
|
@@ -158,6 +158,10 @@ export const recipeMetadata = [
|
|
|
158
158
|
],
|
|
159
159
|
useWhen: 'You need to check who said a statement in a transcript or source excerpt, separately from whether it is true.',
|
|
160
160
|
related: [
|
|
161
|
+
{
|
|
162
|
+
id: 'causal-attribution',
|
|
163
|
+
reason: 'Use causal-attribution to classify the kind of cause in an explanation, rather than who made it.',
|
|
164
|
+
},
|
|
161
165
|
{
|
|
162
166
|
id: 'citation-match',
|
|
163
167
|
reason: 'Use citation-match to check which passages support a claim, rather than who made it.',
|
|
@@ -220,6 +224,42 @@ export const recipeMetadata = [
|
|
|
220
224
|
},
|
|
221
225
|
],
|
|
222
226
|
},
|
|
227
|
+
{
|
|
228
|
+
id: 'causal-attribution',
|
|
229
|
+
title: 'Identify personal and situational explanations',
|
|
230
|
+
description: 'Label whether an explanation attributes a specified behavior to the person, circumstances, both, or gives no cause.',
|
|
231
|
+
category: 'conversation',
|
|
232
|
+
tags: [
|
|
233
|
+
'psychology',
|
|
234
|
+
'behavior',
|
|
235
|
+
'causal attribution',
|
|
236
|
+
'personal cause',
|
|
237
|
+
'situational cause',
|
|
238
|
+
'dispositional',
|
|
239
|
+
'annotation',
|
|
240
|
+
'alignment-research',
|
|
241
|
+
],
|
|
242
|
+
limitations: [
|
|
243
|
+
'Labels the supplied explanation, not the actual cause, blame, or a psychological trait of the actor.',
|
|
244
|
+
'Personal and situational refer to the focal actor, not the speaker or whoever is named in a cause.',
|
|
245
|
+
'A personal attribution alone does not establish bias or a fundamental attribution error.',
|
|
246
|
+
],
|
|
247
|
+
useWhen: 'You need to label whether an explanation points to the person, the situation, or both.',
|
|
248
|
+
related: [
|
|
249
|
+
{
|
|
250
|
+
id: 'attribution-match',
|
|
251
|
+
reason: 'Use attribution-match to check who made or endorsed a statement, rather than what kind of cause it gives.',
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
id: 'motivation-source',
|
|
255
|
+
reason: 'Use motivation-source to distinguish enjoyment of an activity from pursuing a separate outcome in a stated reason.',
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
id: 'verify',
|
|
259
|
+
reason: 'Use verify to assess supplied evidence for a causal claim; causal-attribution does not establish causation.',
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
},
|
|
223
263
|
{
|
|
224
264
|
id: 'certainty-match',
|
|
225
265
|
title: 'Check certainty wording',
|
|
@@ -353,6 +393,7 @@ export const recipeMetadata = [
|
|
|
353
393
|
description: 'Label whether a response affirms, denies, mixes positions on, or does not address a supplied claim.',
|
|
354
394
|
category: 'answer-quality',
|
|
355
395
|
tags: [
|
|
396
|
+
'psychology',
|
|
356
397
|
'claim',
|
|
357
398
|
'stance',
|
|
358
399
|
'agreement',
|
|
@@ -731,7 +772,7 @@ export const recipeMetadata = [
|
|
|
731
772
|
title: 'Detect expressed frustration',
|
|
732
773
|
description: 'Does message express frustration or dissatisfaction in its wording?',
|
|
733
774
|
category: 'support',
|
|
734
|
-
tags: ['support', 'frustration', 'signal'],
|
|
775
|
+
tags: ['psychology', 'support', 'frustration', 'signal'],
|
|
735
776
|
limitations: [
|
|
736
777
|
'Classifies expressed language only. It does not diagnose emotions or determine customer importance or entitlement.',
|
|
737
778
|
],
|
|
@@ -743,6 +784,29 @@ export const recipeMetadata = [
|
|
|
743
784
|
},
|
|
744
785
|
],
|
|
745
786
|
},
|
|
787
|
+
{
|
|
788
|
+
id: 'game-action',
|
|
789
|
+
title: 'Choose a game action from JSON',
|
|
790
|
+
description: 'Send game state, player state, and available actions as JSON; receive the original selected action with Jev confidence and probabilities.',
|
|
791
|
+
category: 'workflow',
|
|
792
|
+
tags: ['gameplay', 'game', 'agnostic', 'JSON', 'actions', 'automatic IDs', 'simulation'],
|
|
793
|
+
limitations: [
|
|
794
|
+
'Confidence and probabilities describe the Jev decision, not a measured probability of winning.',
|
|
795
|
+
'The full action list is sent in one logical request. Provider request limits still apply.',
|
|
796
|
+
'Internal action labels belong to the current call; existing game IDs remain in the returned action.',
|
|
797
|
+
],
|
|
798
|
+
useWhen: 'Your game already supplies JSON state and actions, and you want Jev to choose an action without formatting descriptions or assigning IDs.',
|
|
799
|
+
related: [
|
|
800
|
+
{
|
|
801
|
+
id: 'choose-action',
|
|
802
|
+
reason: 'Use choose-action for text-based rules and state, caller-named actions, and confidence-based review handling.',
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
id: 'checkers-move',
|
|
806
|
+
reason: 'Use checkers-move for its American/English checkers board format and built-in checkers instructions.',
|
|
807
|
+
},
|
|
808
|
+
],
|
|
809
|
+
},
|
|
746
810
|
{
|
|
747
811
|
id: 'handoff',
|
|
748
812
|
title: 'Check handoff rules',
|
|
@@ -844,6 +908,40 @@ export const recipeMetadata = [
|
|
|
844
908
|
},
|
|
845
909
|
],
|
|
846
910
|
},
|
|
911
|
+
{
|
|
912
|
+
id: 'issue-recurrence',
|
|
913
|
+
title: 'Check whether an issue returned',
|
|
914
|
+
description: 'Label a reported issue as new, ongoing without resolution, or returned after reported recovery.',
|
|
915
|
+
category: 'support',
|
|
916
|
+
tags: [
|
|
917
|
+
'support',
|
|
918
|
+
'issue came back',
|
|
919
|
+
'recurring issue',
|
|
920
|
+
'reopened ticket',
|
|
921
|
+
'never fixed',
|
|
922
|
+
'reported recovery',
|
|
923
|
+
],
|
|
924
|
+
limitations: [
|
|
925
|
+
'Classifies the supplied customer reports; it does not verify system health or prove a common root cause.',
|
|
926
|
+
'Missing history does not mean new, and a ticket closure or attempted fix does not prove recovery.',
|
|
927
|
+
'Callers supply chronology and issue identity; the recipe does not fetch history or update tickets.',
|
|
928
|
+
],
|
|
929
|
+
useWhen: 'You need to distinguish a new problem, one that never stopped, and an issue that came back after recovery.',
|
|
930
|
+
related: [
|
|
931
|
+
{
|
|
932
|
+
id: 'resolution-check',
|
|
933
|
+
reason: 'Use resolution-check to check whether the current message reports resolution.',
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
id: 'ticket-match',
|
|
937
|
+
reason: 'Use ticket-match to compare whether two reports concern the same underlying issue.',
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
id: 'repeated-attempt',
|
|
941
|
+
reason: 'Use repeated-attempt to check whether a proposed troubleshooting step repeats an earlier attempt.',
|
|
942
|
+
},
|
|
943
|
+
],
|
|
944
|
+
},
|
|
847
945
|
{
|
|
848
946
|
id: 'memory-relation',
|
|
849
947
|
title: 'Compare a new fact with memory',
|
|
@@ -872,12 +970,50 @@ export const recipeMetadata = [
|
|
|
872
970
|
],
|
|
873
971
|
useWhen: 'You need to identify the narrowest supported scope of a fact or preference.',
|
|
874
972
|
related: [
|
|
973
|
+
{
|
|
974
|
+
id: 'memory-subject',
|
|
975
|
+
reason: 'Use memory-subject to identify whom a candidate memory describes before assessing its scope.',
|
|
976
|
+
},
|
|
875
977
|
{
|
|
876
978
|
id: 'preference-kind',
|
|
877
979
|
reason: 'Use preference-kind to distinguish ongoing preferences from temporary instructions.',
|
|
878
980
|
},
|
|
879
981
|
],
|
|
880
982
|
},
|
|
983
|
+
{
|
|
984
|
+
id: 'memory-subject',
|
|
985
|
+
title: 'Identify whom a memory describes',
|
|
986
|
+
description: 'Label whether one candidate memory describes the user, someone else, or a group including the user.',
|
|
987
|
+
category: 'memory',
|
|
988
|
+
tags: [
|
|
989
|
+
'memory',
|
|
990
|
+
'whose memory',
|
|
991
|
+
'someone else',
|
|
992
|
+
'subject attribution',
|
|
993
|
+
'personalization',
|
|
994
|
+
'quoted speaker',
|
|
995
|
+
],
|
|
996
|
+
limitations: [
|
|
997
|
+
'Requires an identified user and enough speaker context to resolve references; it does not infer a user from an account or session.',
|
|
998
|
+
'Subject attribution does not establish truth, actuality, permanence, consent, or permission to store a memory.',
|
|
999
|
+
'Classifies one atomic statement; it does not extract, split, rewrite, or persist memories.',
|
|
1000
|
+
],
|
|
1001
|
+
useWhen: 'You need to avoid treating a fact about someone else as a fact about the user.',
|
|
1002
|
+
related: [
|
|
1003
|
+
{
|
|
1004
|
+
id: 'memory-scope',
|
|
1005
|
+
reason: 'Use memory-scope to identify where a fact applies after identifying whom it describes.',
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
id: 'attribution-match',
|
|
1009
|
+
reason: 'Use attribution-match to check who said or endorsed a statement, rather than whom the statement describes.',
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
id: 'preference-kind',
|
|
1013
|
+
reason: 'Use preference-kind to distinguish a lasting preference from a temporary instruction.',
|
|
1014
|
+
},
|
|
1015
|
+
],
|
|
1016
|
+
},
|
|
881
1017
|
{
|
|
882
1018
|
id: 'memory-value',
|
|
883
1019
|
title: 'Assess a candidate memory',
|
|
@@ -892,6 +1028,78 @@ export const recipeMetadata = [
|
|
|
892
1028
|
{ id: 'memory-scope', reason: 'Use memory-scope to determine where a fact applies.' },
|
|
893
1029
|
],
|
|
894
1030
|
},
|
|
1031
|
+
{
|
|
1032
|
+
id: 'motivation-source',
|
|
1033
|
+
title: 'Identify a stated source of motivation',
|
|
1034
|
+
description: 'Label a stated reason for an activity as intrinsic enjoyment, a separate outcome, both, or not stated.',
|
|
1035
|
+
category: 'conversation',
|
|
1036
|
+
tags: [
|
|
1037
|
+
'psychology',
|
|
1038
|
+
'behavior',
|
|
1039
|
+
'motivation',
|
|
1040
|
+
'intrinsic',
|
|
1041
|
+
'extrinsic',
|
|
1042
|
+
'stated reason',
|
|
1043
|
+
'self-determination',
|
|
1044
|
+
'annotation',
|
|
1045
|
+
'alignment-research',
|
|
1046
|
+
],
|
|
1047
|
+
limitations: [
|
|
1048
|
+
'Labels expressed or reported reasons, not hidden motives, sincerity, or a psychological profile.',
|
|
1049
|
+
'Extrinsic reasons can be internalized and freely chosen; this label does not measure autonomy or distinguish its subtypes.',
|
|
1050
|
+
'An AI response describing a motive does not establish that the model has that motive.',
|
|
1051
|
+
],
|
|
1052
|
+
useWhen: 'You need to classify a stated reason for an activity as enjoyment of doing it or pursuit of a separate outcome.',
|
|
1053
|
+
related: [
|
|
1054
|
+
{
|
|
1055
|
+
id: 'causal-attribution',
|
|
1056
|
+
reason: 'Use causal-attribution to distinguish personal from situational explanations of behavior.',
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
id: 'preference-kind',
|
|
1060
|
+
reason: 'Use preference-kind to distinguish preferences, facts, and temporary requests rather than reasons for an activity.',
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
id: 'claim-stance',
|
|
1064
|
+
reason: 'Use claim-stance to label agreement with a specified claim instead of classifying the reason for acting.',
|
|
1065
|
+
},
|
|
1066
|
+
],
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
id: 'outcome-framing',
|
|
1070
|
+
title: 'Identify gain and loss framing',
|
|
1071
|
+
description: 'Label whether wording presents a specified outcome through gains, losses, both, or neither.',
|
|
1072
|
+
category: 'conversation',
|
|
1073
|
+
tags: [
|
|
1074
|
+
'psychology',
|
|
1075
|
+
'behavior',
|
|
1076
|
+
'gain loss',
|
|
1077
|
+
'outcome framing',
|
|
1078
|
+
'decision framing',
|
|
1079
|
+
'annotation',
|
|
1080
|
+
'alignment-research',
|
|
1081
|
+
],
|
|
1082
|
+
limitations: [
|
|
1083
|
+
'Labels wording about one supplied outcome; it does not calculate utility or verify equivalence between descriptions.',
|
|
1084
|
+
'A frame label does not establish loss aversion, a cognitive bias, or a causal effect on choices.',
|
|
1085
|
+
'A bare amount can be neutral even when the caller knows it represents an actual gain or loss.',
|
|
1086
|
+
],
|
|
1087
|
+
useWhen: 'You need to label gain and loss wording in a decision prompt or research stimulus.',
|
|
1088
|
+
related: [
|
|
1089
|
+
{
|
|
1090
|
+
id: 'question-leading',
|
|
1091
|
+
reason: 'Use question-leading to assess pressure toward a supplied answer, rather than gain or loss framing.',
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
id: 'question-assumption',
|
|
1095
|
+
reason: 'Use question-assumption to check whether a question takes a specified claim for granted.',
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
id: 'choose-action',
|
|
1099
|
+
reason: 'Use choose-action to select among supplied eligible actions; outcome-framing only labels wording.',
|
|
1100
|
+
},
|
|
1101
|
+
],
|
|
1102
|
+
},
|
|
895
1103
|
{
|
|
896
1104
|
id: 'passage-duplicate',
|
|
897
1105
|
title: 'Compare passages for duplication',
|
|
@@ -920,6 +1128,10 @@ export const recipeMetadata = [
|
|
|
920
1128
|
],
|
|
921
1129
|
useWhen: 'You need to distinguish an ongoing preference from a fact or temporary request.',
|
|
922
1130
|
related: [
|
|
1131
|
+
{
|
|
1132
|
+
id: 'motivation-source',
|
|
1133
|
+
reason: 'Use motivation-source to classify a stated reason for an activity rather than the kind of statement.',
|
|
1134
|
+
},
|
|
923
1135
|
{
|
|
924
1136
|
id: 'memory-scope',
|
|
925
1137
|
reason: 'Use memory-scope to identify the supported scope of that preference.',
|
|
@@ -977,12 +1189,46 @@ export const recipeMetadata = [
|
|
|
977
1189
|
},
|
|
978
1190
|
],
|
|
979
1191
|
},
|
|
1192
|
+
{
|
|
1193
|
+
id: 'question-assumption',
|
|
1194
|
+
title: 'Check what a question takes for granted',
|
|
1195
|
+
description: 'Label whether a question takes a supplied claim for granted or leaves that claim open.',
|
|
1196
|
+
category: 'conversation',
|
|
1197
|
+
tags: [
|
|
1198
|
+
'psychology',
|
|
1199
|
+
'presupposition',
|
|
1200
|
+
'loaded question',
|
|
1201
|
+
'takes for granted',
|
|
1202
|
+
'question assumption',
|
|
1203
|
+
'prompt wording',
|
|
1204
|
+
'annotation',
|
|
1205
|
+
'alignment-research',
|
|
1206
|
+
],
|
|
1207
|
+
limitations: [
|
|
1208
|
+
'Labels wording relative to one supplied claim; it does not determine truth or author intent.',
|
|
1209
|
+
'Not assumed does not establish that a question is neutral or free of other assumptions.',
|
|
1210
|
+
'Effects on respondents or models require controlled comparisons; these labels alone are not causal evidence.',
|
|
1211
|
+
],
|
|
1212
|
+
useWhen: 'You need to identify a specific assumption in a question before using it in a conversation, survey, or evaluation.',
|
|
1213
|
+
related: [
|
|
1214
|
+
{
|
|
1215
|
+
id: 'question-leading',
|
|
1216
|
+
reason: 'Use question-leading to check pressure toward or away from an answer, which is different from assuming a claim.',
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
id: 'claim-stance',
|
|
1220
|
+
reason: 'Use claim-stance to label affirmation or denial of a claim in a response.',
|
|
1221
|
+
},
|
|
1222
|
+
{ id: 'verify', reason: 'Use verify to assess evidential support for the claim itself.' },
|
|
1223
|
+
],
|
|
1224
|
+
},
|
|
980
1225
|
{
|
|
981
1226
|
id: 'question-leading',
|
|
982
1227
|
title: 'Check whether a question steers an answer',
|
|
983
1228
|
description: "Label whether a question's wording favors, disfavors, or stays neutral toward a proposed answer.",
|
|
984
1229
|
category: 'conversation',
|
|
985
1230
|
tags: [
|
|
1231
|
+
'psychology',
|
|
986
1232
|
'leading question',
|
|
987
1233
|
'wording',
|
|
988
1234
|
'answer pressure',
|
|
@@ -998,6 +1244,14 @@ export const recipeMetadata = [
|
|
|
998
1244
|
],
|
|
999
1245
|
useWhen: 'You need to check leading questions or answer pressure in a survey, interview, or evaluation prompt.',
|
|
1000
1246
|
related: [
|
|
1247
|
+
{
|
|
1248
|
+
id: 'outcome-framing',
|
|
1249
|
+
reason: 'Use outcome-framing to label gains and losses in wording about a specified outcome.',
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
id: 'question-assumption',
|
|
1253
|
+
reason: 'Use question-assumption to check whether a question takes a specific claim for granted.',
|
|
1254
|
+
},
|
|
1001
1255
|
{
|
|
1002
1256
|
id: 'query-specificity',
|
|
1003
1257
|
reason: 'Use query-specificity to check whether an information need is focused and unambiguous.',
|
|
@@ -1122,6 +1376,10 @@ export const recipeMetadata = [
|
|
|
1122
1376
|
],
|
|
1123
1377
|
useWhen: 'You need to know whether the customer reports that an issue is resolved.',
|
|
1124
1378
|
related: [
|
|
1379
|
+
{
|
|
1380
|
+
id: 'issue-recurrence',
|
|
1381
|
+
reason: 'Use issue-recurrence to distinguish a first occurrence, an ongoing issue, and a return after reported recovery.',
|
|
1382
|
+
},
|
|
1125
1383
|
{
|
|
1126
1384
|
id: 'step-complete',
|
|
1127
1385
|
reason: 'Use step-complete to assess evidence against a supplied completion condition.',
|
|
@@ -1512,6 +1770,7 @@ export const recipeMetadata = [
|
|
|
1512
1770
|
description: 'Label categorical, qualified, or unresolved wording about a supplied claim without inferring internal confidence.',
|
|
1513
1771
|
category: 'answer-quality',
|
|
1514
1772
|
tags: [
|
|
1773
|
+
'psychology',
|
|
1515
1774
|
'uncertainty',
|
|
1516
1775
|
'certainty',
|
|
1517
1776
|
'hedging',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const recipeNames: readonly ["action-scope", "answer-consistency", "answer-coverage", "answer-invalidation", "answer-relevance", "answerability", "argument-fit", "attempted-step", "attribution-match", "audience-fit", "cache-match", "cancellation-check", "certainty-match", "change-meaning", "checkers-move", "choose-action", "citation-match", "citation-needed", "claim-stance", "clarify", "confirmation-match", "constraint-strength", "context-role", "correction-target", "document-role", "draft-compare", "evaluation-mention", "evidence-conflict", "evidence-independence", "evidence-novelty", "fact-stability", "failure-kind", "feedback-kind", "field-select", "followup-link", "freshness-needed", "frustration-signal", "handoff", "incident-match", "instruction-conflict", "instruction-fit", "intent-change", "issue-impact", "memory-relation", "memory-scope", "memory-value", "passage-duplicate", "preference-kind", "promise-check", "query-equivalence", "query-specificity", "question-leading", "reference-resolve", "repeated-attempt", "reply-template-match", "requirement-testability", "rerank", "resolution-check", "response-needed", "response-refusal", "result-outcome", "result-usefulness", "retrieval-needed", "route", "source-applicability", "step-complete", "step-progress", "summary-coverage", "take-turn", "task-dependency", "task-duplicate", "ticket-match", "tone-check", "tool-fit", "topic-shift", "troubleshooting-fit", "turn-intent", "uncertainty-expression", "urgency-signal", "verify", "workaround-fit"];
|
|
1
|
+
export declare const recipeNames: readonly ["action-scope", "answer-consistency", "answer-coverage", "answer-invalidation", "answer-relevance", "answerability", "argument-fit", "attempted-step", "attribution-match", "audience-fit", "cache-match", "cancellation-check", "causal-attribution", "certainty-match", "change-meaning", "checkers-move", "choose-action", "citation-match", "citation-needed", "claim-stance", "clarify", "confirmation-match", "constraint-strength", "context-role", "correction-target", "document-role", "draft-compare", "evaluation-mention", "evidence-conflict", "evidence-independence", "evidence-novelty", "fact-stability", "failure-kind", "feedback-kind", "field-select", "followup-link", "freshness-needed", "frustration-signal", "game-action", "handoff", "incident-match", "instruction-conflict", "instruction-fit", "intent-change", "issue-impact", "issue-recurrence", "memory-relation", "memory-scope", "memory-subject", "memory-value", "motivation-source", "outcome-framing", "passage-duplicate", "preference-kind", "promise-check", "query-equivalence", "query-specificity", "question-assumption", "question-leading", "reference-resolve", "repeated-attempt", "reply-template-match", "requirement-testability", "rerank", "resolution-check", "response-needed", "response-refusal", "result-outcome", "result-usefulness", "retrieval-needed", "route", "source-applicability", "step-complete", "step-progress", "summary-coverage", "take-turn", "task-dependency", "task-duplicate", "ticket-match", "tone-check", "tool-fit", "topic-shift", "troubleshooting-fit", "turn-intent", "uncertainty-expression", "urgency-signal", "verify", "workaround-fit"];
|
|
@@ -12,6 +12,7 @@ export const recipeNames = [
|
|
|
12
12
|
'audience-fit',
|
|
13
13
|
'cache-match',
|
|
14
14
|
'cancellation-check',
|
|
15
|
+
'causal-attribution',
|
|
15
16
|
'certainty-match',
|
|
16
17
|
'change-meaning',
|
|
17
18
|
'checkers-move',
|
|
@@ -37,20 +38,26 @@ export const recipeNames = [
|
|
|
37
38
|
'followup-link',
|
|
38
39
|
'freshness-needed',
|
|
39
40
|
'frustration-signal',
|
|
41
|
+
'game-action',
|
|
40
42
|
'handoff',
|
|
41
43
|
'incident-match',
|
|
42
44
|
'instruction-conflict',
|
|
43
45
|
'instruction-fit',
|
|
44
46
|
'intent-change',
|
|
45
47
|
'issue-impact',
|
|
48
|
+
'issue-recurrence',
|
|
46
49
|
'memory-relation',
|
|
47
50
|
'memory-scope',
|
|
51
|
+
'memory-subject',
|
|
48
52
|
'memory-value',
|
|
53
|
+
'motivation-source',
|
|
54
|
+
'outcome-framing',
|
|
49
55
|
'passage-duplicate',
|
|
50
56
|
'preference-kind',
|
|
51
57
|
'promise-check',
|
|
52
58
|
'query-equivalence',
|
|
53
59
|
'query-specificity',
|
|
60
|
+
'question-assumption',
|
|
54
61
|
'question-leading',
|
|
55
62
|
'reference-resolve',
|
|
56
63
|
'repeated-attempt',
|
package/dist/catalog/schema.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare const recipeNameSchema: z.ZodEnum<{
|
|
|
12
12
|
"audience-fit": "audience-fit";
|
|
13
13
|
"cache-match": "cache-match";
|
|
14
14
|
"cancellation-check": "cancellation-check";
|
|
15
|
+
"causal-attribution": "causal-attribution";
|
|
15
16
|
"certainty-match": "certainty-match";
|
|
16
17
|
"change-meaning": "change-meaning";
|
|
17
18
|
"checkers-move": "checkers-move";
|
|
@@ -37,20 +38,26 @@ export declare const recipeNameSchema: z.ZodEnum<{
|
|
|
37
38
|
"followup-link": "followup-link";
|
|
38
39
|
"freshness-needed": "freshness-needed";
|
|
39
40
|
"frustration-signal": "frustration-signal";
|
|
41
|
+
"game-action": "game-action";
|
|
40
42
|
handoff: "handoff";
|
|
41
43
|
"incident-match": "incident-match";
|
|
42
44
|
"instruction-conflict": "instruction-conflict";
|
|
43
45
|
"instruction-fit": "instruction-fit";
|
|
44
46
|
"intent-change": "intent-change";
|
|
45
47
|
"issue-impact": "issue-impact";
|
|
48
|
+
"issue-recurrence": "issue-recurrence";
|
|
46
49
|
"memory-relation": "memory-relation";
|
|
47
50
|
"memory-scope": "memory-scope";
|
|
51
|
+
"memory-subject": "memory-subject";
|
|
48
52
|
"memory-value": "memory-value";
|
|
53
|
+
"motivation-source": "motivation-source";
|
|
54
|
+
"outcome-framing": "outcome-framing";
|
|
49
55
|
"passage-duplicate": "passage-duplicate";
|
|
50
56
|
"preference-kind": "preference-kind";
|
|
51
57
|
"promise-check": "promise-check";
|
|
52
58
|
"query-equivalence": "query-equivalence";
|
|
53
59
|
"query-specificity": "query-specificity";
|
|
60
|
+
"question-assumption": "question-assumption";
|
|
54
61
|
"question-leading": "question-leading";
|
|
55
62
|
"reference-resolve": "reference-resolve";
|
|
56
63
|
"repeated-attempt": "repeated-attempt";
|
package/dist/cli/schema.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
15
15
|
"audience-fit": "audience-fit";
|
|
16
16
|
"cache-match": "cache-match";
|
|
17
17
|
"cancellation-check": "cancellation-check";
|
|
18
|
+
"causal-attribution": "causal-attribution";
|
|
18
19
|
"certainty-match": "certainty-match";
|
|
19
20
|
"change-meaning": "change-meaning";
|
|
20
21
|
"checkers-move": "checkers-move";
|
|
@@ -40,20 +41,26 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
40
41
|
"followup-link": "followup-link";
|
|
41
42
|
"freshness-needed": "freshness-needed";
|
|
42
43
|
"frustration-signal": "frustration-signal";
|
|
44
|
+
"game-action": "game-action";
|
|
43
45
|
handoff: "handoff";
|
|
44
46
|
"incident-match": "incident-match";
|
|
45
47
|
"instruction-conflict": "instruction-conflict";
|
|
46
48
|
"instruction-fit": "instruction-fit";
|
|
47
49
|
"intent-change": "intent-change";
|
|
48
50
|
"issue-impact": "issue-impact";
|
|
51
|
+
"issue-recurrence": "issue-recurrence";
|
|
49
52
|
"memory-relation": "memory-relation";
|
|
50
53
|
"memory-scope": "memory-scope";
|
|
54
|
+
"memory-subject": "memory-subject";
|
|
51
55
|
"memory-value": "memory-value";
|
|
56
|
+
"motivation-source": "motivation-source";
|
|
57
|
+
"outcome-framing": "outcome-framing";
|
|
52
58
|
"passage-duplicate": "passage-duplicate";
|
|
53
59
|
"preference-kind": "preference-kind";
|
|
54
60
|
"promise-check": "promise-check";
|
|
55
61
|
"query-equivalence": "query-equivalence";
|
|
56
62
|
"query-specificity": "query-specificity";
|
|
63
|
+
"question-assumption": "question-assumption";
|
|
57
64
|
"question-leading": "question-leading";
|
|
58
65
|
"reference-resolve": "reference-resolve";
|
|
59
66
|
"repeated-attempt": "repeated-attempt";
|
|
@@ -100,6 +107,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
100
107
|
"audience-fit": "audience-fit";
|
|
101
108
|
"cache-match": "cache-match";
|
|
102
109
|
"cancellation-check": "cancellation-check";
|
|
110
|
+
"causal-attribution": "causal-attribution";
|
|
103
111
|
"certainty-match": "certainty-match";
|
|
104
112
|
"change-meaning": "change-meaning";
|
|
105
113
|
"checkers-move": "checkers-move";
|
|
@@ -125,20 +133,26 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
125
133
|
"followup-link": "followup-link";
|
|
126
134
|
"freshness-needed": "freshness-needed";
|
|
127
135
|
"frustration-signal": "frustration-signal";
|
|
136
|
+
"game-action": "game-action";
|
|
128
137
|
handoff: "handoff";
|
|
129
138
|
"incident-match": "incident-match";
|
|
130
139
|
"instruction-conflict": "instruction-conflict";
|
|
131
140
|
"instruction-fit": "instruction-fit";
|
|
132
141
|
"intent-change": "intent-change";
|
|
133
142
|
"issue-impact": "issue-impact";
|
|
143
|
+
"issue-recurrence": "issue-recurrence";
|
|
134
144
|
"memory-relation": "memory-relation";
|
|
135
145
|
"memory-scope": "memory-scope";
|
|
146
|
+
"memory-subject": "memory-subject";
|
|
136
147
|
"memory-value": "memory-value";
|
|
148
|
+
"motivation-source": "motivation-source";
|
|
149
|
+
"outcome-framing": "outcome-framing";
|
|
137
150
|
"passage-duplicate": "passage-duplicate";
|
|
138
151
|
"preference-kind": "preference-kind";
|
|
139
152
|
"promise-check": "promise-check";
|
|
140
153
|
"query-equivalence": "query-equivalence";
|
|
141
154
|
"query-specificity": "query-specificity";
|
|
155
|
+
"question-assumption": "question-assumption";
|
|
142
156
|
"question-leading": "question-leading";
|
|
143
157
|
"reference-resolve": "reference-resolve";
|
|
144
158
|
"repeated-attempt": "repeated-attempt";
|
|
@@ -182,6 +196,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
182
196
|
"audience-fit": "audience-fit";
|
|
183
197
|
"cache-match": "cache-match";
|
|
184
198
|
"cancellation-check": "cancellation-check";
|
|
199
|
+
"causal-attribution": "causal-attribution";
|
|
185
200
|
"certainty-match": "certainty-match";
|
|
186
201
|
"change-meaning": "change-meaning";
|
|
187
202
|
"checkers-move": "checkers-move";
|
|
@@ -207,20 +222,26 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
207
222
|
"followup-link": "followup-link";
|
|
208
223
|
"freshness-needed": "freshness-needed";
|
|
209
224
|
"frustration-signal": "frustration-signal";
|
|
225
|
+
"game-action": "game-action";
|
|
210
226
|
handoff: "handoff";
|
|
211
227
|
"incident-match": "incident-match";
|
|
212
228
|
"instruction-conflict": "instruction-conflict";
|
|
213
229
|
"instruction-fit": "instruction-fit";
|
|
214
230
|
"intent-change": "intent-change";
|
|
215
231
|
"issue-impact": "issue-impact";
|
|
232
|
+
"issue-recurrence": "issue-recurrence";
|
|
216
233
|
"memory-relation": "memory-relation";
|
|
217
234
|
"memory-scope": "memory-scope";
|
|
235
|
+
"memory-subject": "memory-subject";
|
|
218
236
|
"memory-value": "memory-value";
|
|
237
|
+
"motivation-source": "motivation-source";
|
|
238
|
+
"outcome-framing": "outcome-framing";
|
|
219
239
|
"passage-duplicate": "passage-duplicate";
|
|
220
240
|
"preference-kind": "preference-kind";
|
|
221
241
|
"promise-check": "promise-check";
|
|
222
242
|
"query-equivalence": "query-equivalence";
|
|
223
243
|
"query-specificity": "query-specificity";
|
|
244
|
+
"question-assumption": "question-assumption";
|
|
224
245
|
"question-leading": "question-leading";
|
|
225
246
|
"reference-resolve": "reference-resolve";
|
|
226
247
|
"repeated-attempt": "repeated-attempt";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"input": {
|
|
3
|
+
"behavior": "Alex arrived late to the meeting.",
|
|
4
|
+
"explanation": "Alex arrived late because the train was cancelled."
|
|
5
|
+
},
|
|
6
|
+
"response": {
|
|
7
|
+
"model": "demo-fixture",
|
|
8
|
+
"usage": {
|
|
9
|
+
"input_tokens": 0,
|
|
10
|
+
"output_tokens": 0
|
|
11
|
+
},
|
|
12
|
+
"answers": {
|
|
13
|
+
"decision": {
|
|
14
|
+
"type": "choice",
|
|
15
|
+
"choice": "situational",
|
|
16
|
+
"confidence": 0.96,
|
|
17
|
+
"probabilities": {
|
|
18
|
+
"personal": 0.01,
|
|
19
|
+
"situational": 0.96,
|
|
20
|
+
"mixed": 0.01,
|
|
21
|
+
"none": 0.01,
|
|
22
|
+
"unclear": 0.01
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RecipeOptions } from '../../src/schema.js';
|
|
2
|
+
import type { CausalAttributionInput, CausalAttributionResult } from './schema.js';
|
|
3
|
+
export declare function causalAttribution(input: CausalAttributionInput, options?: RecipeOptions): Promise<CausalAttributionResult>;
|
|
4
|
+
export { causalAttributionInputSchema, causalAttributionResultSchema, causalAttributionVerdictSchema, } from './schema.js';
|
|
5
|
+
export type { CausalAttributionInput, CausalAttributionResult, CausalAttributionVerdict, } from './schema.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { evaluateChoice } from '../../src/decisions.js';
|
|
2
|
+
import { causalAttributionInputSchema, causalAttributionResultSchema } from './schema.js';
|
|
3
|
+
export async function causalAttribution(input, options = {}) {
|
|
4
|
+
const { minConfidence = 0.8, ...state } = causalAttributionInputSchema.parse(input);
|
|
5
|
+
const decision = await evaluateChoice(state, 'How does explanation account for the specified behavior of the focal actor? Classify causes presented in the explanation, not the true cause or whether the explanation is justified. Personal attribution assigns the behavior to the focal actor\'s traits, abilities, effort, choices, motives, or internal state. Situational attribution assigns it to circumstances outside that actor, such as resources, instructions, task difficulty, chance, or other people\'s actions. Internal causes need not be permanent or controllable; external causes need not be beyond anyone\'s control. For Alex arriving late, "Alex made little effort to leave on time" is personal and "The train was cancelled" is situational. Choose mixed only when both types are offered as contributing causes. An unresolved alternative such as "either Alex forgot or the train failed" is unclear, not mixed. Do not count a negated, rejected, or merely asked-about cause as an offered explanation; classify any remaining offered cause. A quoted explanation can be classified as the attribution made by the quoted source without treating the reporter as endorsing it. Choose none when the focal behavior is identified but no cause is offered, including a description only, an admission of not knowing, or only rejected causes. Choose unclear for missing focal behavior, unresolved actors or references, incompatible claims without correction, or no separable attribution. Context resolves references but must not supply a cause absent from explanation. Do not infer blame, fault, intent, a stable personality trait, or an attribution error from the label.', {
|
|
6
|
+
personal: 'The explanation attributes the behavior to properties, choices, effort, motives, or internal states of the focal actor.',
|
|
7
|
+
situational: 'The explanation attributes the behavior to circumstances outside the focal actor.',
|
|
8
|
+
mixed: 'Both personal and situational factors are offered as contributing causes.',
|
|
9
|
+
none: 'The focal behavior is clear but the text offers no cause for it.',
|
|
10
|
+
unclear: 'Missing references, unresolved alternatives, contradictory attribution, or ambiguous scope prevents classification.',
|
|
11
|
+
}, options);
|
|
12
|
+
return causalAttributionResultSchema.parse({
|
|
13
|
+
...decision,
|
|
14
|
+
status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export { causalAttributionInputSchema, causalAttributionResultSchema, causalAttributionVerdictSchema, } from './schema.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const causalAttributionVerdictSchema: z.ZodEnum<{
|
|
3
|
+
none: "none";
|
|
4
|
+
unclear: "unclear";
|
|
5
|
+
personal: "personal";
|
|
6
|
+
situational: "situational";
|
|
7
|
+
mixed: "mixed";
|
|
8
|
+
}>;
|
|
9
|
+
export declare const causalAttributionInputSchema: z.ZodObject<{
|
|
10
|
+
behavior: z.ZodString;
|
|
11
|
+
explanation: z.ZodString;
|
|
12
|
+
context: z.ZodOptional<z.ZodString>;
|
|
13
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const causalAttributionResultSchema: z.ZodObject<{
|
|
16
|
+
model: z.ZodString;
|
|
17
|
+
usage: z.ZodObject<{
|
|
18
|
+
input_tokens: z.ZodNumber;
|
|
19
|
+
output_tokens: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
status: z.ZodEnum<{
|
|
22
|
+
ready: "ready";
|
|
23
|
+
review: "review";
|
|
24
|
+
}>;
|
|
25
|
+
verdict: z.ZodEnum<{
|
|
26
|
+
none: "none";
|
|
27
|
+
unclear: "unclear";
|
|
28
|
+
personal: "personal";
|
|
29
|
+
situational: "situational";
|
|
30
|
+
mixed: "mixed";
|
|
31
|
+
}>;
|
|
32
|
+
confidence: z.ZodNumber;
|
|
33
|
+
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
34
|
+
none: "none";
|
|
35
|
+
unclear: "unclear";
|
|
36
|
+
personal: "personal";
|
|
37
|
+
situational: "situational";
|
|
38
|
+
mixed: "mixed";
|
|
39
|
+
}>, z.ZodNumber>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type CausalAttributionInput = z.infer<typeof causalAttributionInputSchema>;
|
|
42
|
+
export type CausalAttributionResult = z.infer<typeof causalAttributionResultSchema>;
|
|
43
|
+
export type CausalAttributionVerdict = z.infer<typeof causalAttributionVerdictSchema>;
|