jev-recipes 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +4 -2
- package/dist/catalog/generated/details/causal-attribution.json +55 -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 +6 -0
- package/dist/catalog/generated/metadata.js +237 -1
- package/dist/catalog/generated/names.d.ts +1 -1
- package/dist/catalog/generated/names.js +6 -0
- package/dist/catalog/schema.d.ts +6 -0
- package/dist/cli/schema.d.ts +18 -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/claim-stance/schema.d.ts +3 -3
- 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 +12 -0
- package/dist/src/index.js +6 -0
- package/package.json +25 -1
|
@@ -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
|
],
|
|
@@ -844,6 +885,40 @@ export const recipeMetadata = [
|
|
|
844
885
|
},
|
|
845
886
|
],
|
|
846
887
|
},
|
|
888
|
+
{
|
|
889
|
+
id: 'issue-recurrence',
|
|
890
|
+
title: 'Check whether an issue returned',
|
|
891
|
+
description: 'Label a reported issue as new, ongoing without resolution, or returned after reported recovery.',
|
|
892
|
+
category: 'support',
|
|
893
|
+
tags: [
|
|
894
|
+
'support',
|
|
895
|
+
'issue came back',
|
|
896
|
+
'recurring issue',
|
|
897
|
+
'reopened ticket',
|
|
898
|
+
'never fixed',
|
|
899
|
+
'reported recovery',
|
|
900
|
+
],
|
|
901
|
+
limitations: [
|
|
902
|
+
'Classifies the supplied customer reports; it does not verify system health or prove a common root cause.',
|
|
903
|
+
'Missing history does not mean new, and a ticket closure or attempted fix does not prove recovery.',
|
|
904
|
+
'Callers supply chronology and issue identity; the recipe does not fetch history or update tickets.',
|
|
905
|
+
],
|
|
906
|
+
useWhen: 'You need to distinguish a new problem, one that never stopped, and an issue that came back after recovery.',
|
|
907
|
+
related: [
|
|
908
|
+
{
|
|
909
|
+
id: 'resolution-check',
|
|
910
|
+
reason: 'Use resolution-check to check whether the current message reports resolution.',
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
id: 'ticket-match',
|
|
914
|
+
reason: 'Use ticket-match to compare whether two reports concern the same underlying issue.',
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
id: 'repeated-attempt',
|
|
918
|
+
reason: 'Use repeated-attempt to check whether a proposed troubleshooting step repeats an earlier attempt.',
|
|
919
|
+
},
|
|
920
|
+
],
|
|
921
|
+
},
|
|
847
922
|
{
|
|
848
923
|
id: 'memory-relation',
|
|
849
924
|
title: 'Compare a new fact with memory',
|
|
@@ -872,12 +947,50 @@ export const recipeMetadata = [
|
|
|
872
947
|
],
|
|
873
948
|
useWhen: 'You need to identify the narrowest supported scope of a fact or preference.',
|
|
874
949
|
related: [
|
|
950
|
+
{
|
|
951
|
+
id: 'memory-subject',
|
|
952
|
+
reason: 'Use memory-subject to identify whom a candidate memory describes before assessing its scope.',
|
|
953
|
+
},
|
|
875
954
|
{
|
|
876
955
|
id: 'preference-kind',
|
|
877
956
|
reason: 'Use preference-kind to distinguish ongoing preferences from temporary instructions.',
|
|
878
957
|
},
|
|
879
958
|
],
|
|
880
959
|
},
|
|
960
|
+
{
|
|
961
|
+
id: 'memory-subject',
|
|
962
|
+
title: 'Identify whom a memory describes',
|
|
963
|
+
description: 'Label whether one candidate memory describes the user, someone else, or a group including the user.',
|
|
964
|
+
category: 'memory',
|
|
965
|
+
tags: [
|
|
966
|
+
'memory',
|
|
967
|
+
'whose memory',
|
|
968
|
+
'someone else',
|
|
969
|
+
'subject attribution',
|
|
970
|
+
'personalization',
|
|
971
|
+
'quoted speaker',
|
|
972
|
+
],
|
|
973
|
+
limitations: [
|
|
974
|
+
'Requires an identified user and enough speaker context to resolve references; it does not infer a user from an account or session.',
|
|
975
|
+
'Subject attribution does not establish truth, actuality, permanence, consent, or permission to store a memory.',
|
|
976
|
+
'Classifies one atomic statement; it does not extract, split, rewrite, or persist memories.',
|
|
977
|
+
],
|
|
978
|
+
useWhen: 'You need to avoid treating a fact about someone else as a fact about the user.',
|
|
979
|
+
related: [
|
|
980
|
+
{
|
|
981
|
+
id: 'memory-scope',
|
|
982
|
+
reason: 'Use memory-scope to identify where a fact applies after identifying whom it describes.',
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
id: 'attribution-match',
|
|
986
|
+
reason: 'Use attribution-match to check who said or endorsed a statement, rather than whom the statement describes.',
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
id: 'preference-kind',
|
|
990
|
+
reason: 'Use preference-kind to distinguish a lasting preference from a temporary instruction.',
|
|
991
|
+
},
|
|
992
|
+
],
|
|
993
|
+
},
|
|
881
994
|
{
|
|
882
995
|
id: 'memory-value',
|
|
883
996
|
title: 'Assess a candidate memory',
|
|
@@ -892,6 +1005,78 @@ export const recipeMetadata = [
|
|
|
892
1005
|
{ id: 'memory-scope', reason: 'Use memory-scope to determine where a fact applies.' },
|
|
893
1006
|
],
|
|
894
1007
|
},
|
|
1008
|
+
{
|
|
1009
|
+
id: 'motivation-source',
|
|
1010
|
+
title: 'Identify a stated source of motivation',
|
|
1011
|
+
description: 'Label a stated reason for an activity as intrinsic enjoyment, a separate outcome, both, or not stated.',
|
|
1012
|
+
category: 'conversation',
|
|
1013
|
+
tags: [
|
|
1014
|
+
'psychology',
|
|
1015
|
+
'behavior',
|
|
1016
|
+
'motivation',
|
|
1017
|
+
'intrinsic',
|
|
1018
|
+
'extrinsic',
|
|
1019
|
+
'stated reason',
|
|
1020
|
+
'self-determination',
|
|
1021
|
+
'annotation',
|
|
1022
|
+
'alignment-research',
|
|
1023
|
+
],
|
|
1024
|
+
limitations: [
|
|
1025
|
+
'Labels expressed or reported reasons, not hidden motives, sincerity, or a psychological profile.',
|
|
1026
|
+
'Extrinsic reasons can be internalized and freely chosen; this label does not measure autonomy or distinguish its subtypes.',
|
|
1027
|
+
'An AI response describing a motive does not establish that the model has that motive.',
|
|
1028
|
+
],
|
|
1029
|
+
useWhen: 'You need to classify a stated reason for an activity as enjoyment of doing it or pursuit of a separate outcome.',
|
|
1030
|
+
related: [
|
|
1031
|
+
{
|
|
1032
|
+
id: 'causal-attribution',
|
|
1033
|
+
reason: 'Use causal-attribution to distinguish personal from situational explanations of behavior.',
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
id: 'preference-kind',
|
|
1037
|
+
reason: 'Use preference-kind to distinguish preferences, facts, and temporary requests rather than reasons for an activity.',
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
id: 'claim-stance',
|
|
1041
|
+
reason: 'Use claim-stance to label agreement with a specified claim instead of classifying the reason for acting.',
|
|
1042
|
+
},
|
|
1043
|
+
],
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
id: 'outcome-framing',
|
|
1047
|
+
title: 'Identify gain and loss framing',
|
|
1048
|
+
description: 'Label whether wording presents a specified outcome through gains, losses, both, or neither.',
|
|
1049
|
+
category: 'conversation',
|
|
1050
|
+
tags: [
|
|
1051
|
+
'psychology',
|
|
1052
|
+
'behavior',
|
|
1053
|
+
'gain loss',
|
|
1054
|
+
'outcome framing',
|
|
1055
|
+
'decision framing',
|
|
1056
|
+
'annotation',
|
|
1057
|
+
'alignment-research',
|
|
1058
|
+
],
|
|
1059
|
+
limitations: [
|
|
1060
|
+
'Labels wording about one supplied outcome; it does not calculate utility or verify equivalence between descriptions.',
|
|
1061
|
+
'A frame label does not establish loss aversion, a cognitive bias, or a causal effect on choices.',
|
|
1062
|
+
'A bare amount can be neutral even when the caller knows it represents an actual gain or loss.',
|
|
1063
|
+
],
|
|
1064
|
+
useWhen: 'You need to label gain and loss wording in a decision prompt or research stimulus.',
|
|
1065
|
+
related: [
|
|
1066
|
+
{
|
|
1067
|
+
id: 'question-leading',
|
|
1068
|
+
reason: 'Use question-leading to assess pressure toward a supplied answer, rather than gain or loss framing.',
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
id: 'question-assumption',
|
|
1072
|
+
reason: 'Use question-assumption to check whether a question takes a specified claim for granted.',
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
id: 'choose-action',
|
|
1076
|
+
reason: 'Use choose-action to select among supplied eligible actions; outcome-framing only labels wording.',
|
|
1077
|
+
},
|
|
1078
|
+
],
|
|
1079
|
+
},
|
|
895
1080
|
{
|
|
896
1081
|
id: 'passage-duplicate',
|
|
897
1082
|
title: 'Compare passages for duplication',
|
|
@@ -920,6 +1105,10 @@ export const recipeMetadata = [
|
|
|
920
1105
|
],
|
|
921
1106
|
useWhen: 'You need to distinguish an ongoing preference from a fact or temporary request.',
|
|
922
1107
|
related: [
|
|
1108
|
+
{
|
|
1109
|
+
id: 'motivation-source',
|
|
1110
|
+
reason: 'Use motivation-source to classify a stated reason for an activity rather than the kind of statement.',
|
|
1111
|
+
},
|
|
923
1112
|
{
|
|
924
1113
|
id: 'memory-scope',
|
|
925
1114
|
reason: 'Use memory-scope to identify the supported scope of that preference.',
|
|
@@ -977,12 +1166,46 @@ export const recipeMetadata = [
|
|
|
977
1166
|
},
|
|
978
1167
|
],
|
|
979
1168
|
},
|
|
1169
|
+
{
|
|
1170
|
+
id: 'question-assumption',
|
|
1171
|
+
title: 'Check what a question takes for granted',
|
|
1172
|
+
description: 'Label whether a question takes a supplied claim for granted or leaves that claim open.',
|
|
1173
|
+
category: 'conversation',
|
|
1174
|
+
tags: [
|
|
1175
|
+
'psychology',
|
|
1176
|
+
'presupposition',
|
|
1177
|
+
'loaded question',
|
|
1178
|
+
'takes for granted',
|
|
1179
|
+
'question assumption',
|
|
1180
|
+
'prompt wording',
|
|
1181
|
+
'annotation',
|
|
1182
|
+
'alignment-research',
|
|
1183
|
+
],
|
|
1184
|
+
limitations: [
|
|
1185
|
+
'Labels wording relative to one supplied claim; it does not determine truth or author intent.',
|
|
1186
|
+
'Not assumed does not establish that a question is neutral or free of other assumptions.',
|
|
1187
|
+
'Effects on respondents or models require controlled comparisons; these labels alone are not causal evidence.',
|
|
1188
|
+
],
|
|
1189
|
+
useWhen: 'You need to identify a specific assumption in a question before using it in a conversation, survey, or evaluation.',
|
|
1190
|
+
related: [
|
|
1191
|
+
{
|
|
1192
|
+
id: 'question-leading',
|
|
1193
|
+
reason: 'Use question-leading to check pressure toward or away from an answer, which is different from assuming a claim.',
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
id: 'claim-stance',
|
|
1197
|
+
reason: 'Use claim-stance to label affirmation or denial of a claim in a response.',
|
|
1198
|
+
},
|
|
1199
|
+
{ id: 'verify', reason: 'Use verify to assess evidential support for the claim itself.' },
|
|
1200
|
+
],
|
|
1201
|
+
},
|
|
980
1202
|
{
|
|
981
1203
|
id: 'question-leading',
|
|
982
1204
|
title: 'Check whether a question steers an answer',
|
|
983
1205
|
description: "Label whether a question's wording favors, disfavors, or stays neutral toward a proposed answer.",
|
|
984
1206
|
category: 'conversation',
|
|
985
1207
|
tags: [
|
|
1208
|
+
'psychology',
|
|
986
1209
|
'leading question',
|
|
987
1210
|
'wording',
|
|
988
1211
|
'answer pressure',
|
|
@@ -998,6 +1221,14 @@ export const recipeMetadata = [
|
|
|
998
1221
|
],
|
|
999
1222
|
useWhen: 'You need to check leading questions or answer pressure in a survey, interview, or evaluation prompt.',
|
|
1000
1223
|
related: [
|
|
1224
|
+
{
|
|
1225
|
+
id: 'outcome-framing',
|
|
1226
|
+
reason: 'Use outcome-framing to label gains and losses in wording about a specified outcome.',
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
id: 'question-assumption',
|
|
1230
|
+
reason: 'Use question-assumption to check whether a question takes a specific claim for granted.',
|
|
1231
|
+
},
|
|
1001
1232
|
{
|
|
1002
1233
|
id: 'query-specificity',
|
|
1003
1234
|
reason: 'Use query-specificity to check whether an information need is focused and unambiguous.',
|
|
@@ -1122,6 +1353,10 @@ export const recipeMetadata = [
|
|
|
1122
1353
|
],
|
|
1123
1354
|
useWhen: 'You need to know whether the customer reports that an issue is resolved.',
|
|
1124
1355
|
related: [
|
|
1356
|
+
{
|
|
1357
|
+
id: 'issue-recurrence',
|
|
1358
|
+
reason: 'Use issue-recurrence to distinguish a first occurrence, an ongoing issue, and a return after reported recovery.',
|
|
1359
|
+
},
|
|
1125
1360
|
{
|
|
1126
1361
|
id: 'step-complete',
|
|
1127
1362
|
reason: 'Use step-complete to assess evidence against a supplied completion condition.',
|
|
@@ -1512,6 +1747,7 @@ export const recipeMetadata = [
|
|
|
1512
1747
|
description: 'Label categorical, qualified, or unresolved wording about a supplied claim without inferring internal confidence.',
|
|
1513
1748
|
category: 'answer-quality',
|
|
1514
1749
|
tags: [
|
|
1750
|
+
'psychology',
|
|
1515
1751
|
'uncertainty',
|
|
1516
1752
|
'certainty',
|
|
1517
1753
|
'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", "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',
|
|
@@ -43,14 +44,19 @@ export const recipeNames = [
|
|
|
43
44
|
'instruction-fit',
|
|
44
45
|
'intent-change',
|
|
45
46
|
'issue-impact',
|
|
47
|
+
'issue-recurrence',
|
|
46
48
|
'memory-relation',
|
|
47
49
|
'memory-scope',
|
|
50
|
+
'memory-subject',
|
|
48
51
|
'memory-value',
|
|
52
|
+
'motivation-source',
|
|
53
|
+
'outcome-framing',
|
|
49
54
|
'passage-duplicate',
|
|
50
55
|
'preference-kind',
|
|
51
56
|
'promise-check',
|
|
52
57
|
'query-equivalence',
|
|
53
58
|
'query-specificity',
|
|
59
|
+
'question-assumption',
|
|
54
60
|
'question-leading',
|
|
55
61
|
'reference-resolve',
|
|
56
62
|
'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";
|
|
@@ -43,14 +44,19 @@ export declare const recipeNameSchema: z.ZodEnum<{
|
|
|
43
44
|
"instruction-fit": "instruction-fit";
|
|
44
45
|
"intent-change": "intent-change";
|
|
45
46
|
"issue-impact": "issue-impact";
|
|
47
|
+
"issue-recurrence": "issue-recurrence";
|
|
46
48
|
"memory-relation": "memory-relation";
|
|
47
49
|
"memory-scope": "memory-scope";
|
|
50
|
+
"memory-subject": "memory-subject";
|
|
48
51
|
"memory-value": "memory-value";
|
|
52
|
+
"motivation-source": "motivation-source";
|
|
53
|
+
"outcome-framing": "outcome-framing";
|
|
49
54
|
"passage-duplicate": "passage-duplicate";
|
|
50
55
|
"preference-kind": "preference-kind";
|
|
51
56
|
"promise-check": "promise-check";
|
|
52
57
|
"query-equivalence": "query-equivalence";
|
|
53
58
|
"query-specificity": "query-specificity";
|
|
59
|
+
"question-assumption": "question-assumption";
|
|
54
60
|
"question-leading": "question-leading";
|
|
55
61
|
"reference-resolve": "reference-resolve";
|
|
56
62
|
"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";
|
|
@@ -46,14 +47,19 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
46
47
|
"instruction-fit": "instruction-fit";
|
|
47
48
|
"intent-change": "intent-change";
|
|
48
49
|
"issue-impact": "issue-impact";
|
|
50
|
+
"issue-recurrence": "issue-recurrence";
|
|
49
51
|
"memory-relation": "memory-relation";
|
|
50
52
|
"memory-scope": "memory-scope";
|
|
53
|
+
"memory-subject": "memory-subject";
|
|
51
54
|
"memory-value": "memory-value";
|
|
55
|
+
"motivation-source": "motivation-source";
|
|
56
|
+
"outcome-framing": "outcome-framing";
|
|
52
57
|
"passage-duplicate": "passage-duplicate";
|
|
53
58
|
"preference-kind": "preference-kind";
|
|
54
59
|
"promise-check": "promise-check";
|
|
55
60
|
"query-equivalence": "query-equivalence";
|
|
56
61
|
"query-specificity": "query-specificity";
|
|
62
|
+
"question-assumption": "question-assumption";
|
|
57
63
|
"question-leading": "question-leading";
|
|
58
64
|
"reference-resolve": "reference-resolve";
|
|
59
65
|
"repeated-attempt": "repeated-attempt";
|
|
@@ -100,6 +106,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
100
106
|
"audience-fit": "audience-fit";
|
|
101
107
|
"cache-match": "cache-match";
|
|
102
108
|
"cancellation-check": "cancellation-check";
|
|
109
|
+
"causal-attribution": "causal-attribution";
|
|
103
110
|
"certainty-match": "certainty-match";
|
|
104
111
|
"change-meaning": "change-meaning";
|
|
105
112
|
"checkers-move": "checkers-move";
|
|
@@ -131,14 +138,19 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
131
138
|
"instruction-fit": "instruction-fit";
|
|
132
139
|
"intent-change": "intent-change";
|
|
133
140
|
"issue-impact": "issue-impact";
|
|
141
|
+
"issue-recurrence": "issue-recurrence";
|
|
134
142
|
"memory-relation": "memory-relation";
|
|
135
143
|
"memory-scope": "memory-scope";
|
|
144
|
+
"memory-subject": "memory-subject";
|
|
136
145
|
"memory-value": "memory-value";
|
|
146
|
+
"motivation-source": "motivation-source";
|
|
147
|
+
"outcome-framing": "outcome-framing";
|
|
137
148
|
"passage-duplicate": "passage-duplicate";
|
|
138
149
|
"preference-kind": "preference-kind";
|
|
139
150
|
"promise-check": "promise-check";
|
|
140
151
|
"query-equivalence": "query-equivalence";
|
|
141
152
|
"query-specificity": "query-specificity";
|
|
153
|
+
"question-assumption": "question-assumption";
|
|
142
154
|
"question-leading": "question-leading";
|
|
143
155
|
"reference-resolve": "reference-resolve";
|
|
144
156
|
"repeated-attempt": "repeated-attempt";
|
|
@@ -182,6 +194,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
182
194
|
"audience-fit": "audience-fit";
|
|
183
195
|
"cache-match": "cache-match";
|
|
184
196
|
"cancellation-check": "cancellation-check";
|
|
197
|
+
"causal-attribution": "causal-attribution";
|
|
185
198
|
"certainty-match": "certainty-match";
|
|
186
199
|
"change-meaning": "change-meaning";
|
|
187
200
|
"checkers-move": "checkers-move";
|
|
@@ -213,14 +226,19 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
213
226
|
"instruction-fit": "instruction-fit";
|
|
214
227
|
"intent-change": "intent-change";
|
|
215
228
|
"issue-impact": "issue-impact";
|
|
229
|
+
"issue-recurrence": "issue-recurrence";
|
|
216
230
|
"memory-relation": "memory-relation";
|
|
217
231
|
"memory-scope": "memory-scope";
|
|
232
|
+
"memory-subject": "memory-subject";
|
|
218
233
|
"memory-value": "memory-value";
|
|
234
|
+
"motivation-source": "motivation-source";
|
|
235
|
+
"outcome-framing": "outcome-framing";
|
|
219
236
|
"passage-duplicate": "passage-duplicate";
|
|
220
237
|
"preference-kind": "preference-kind";
|
|
221
238
|
"promise-check": "promise-check";
|
|
222
239
|
"query-equivalence": "query-equivalence";
|
|
223
240
|
"query-specificity": "query-specificity";
|
|
241
|
+
"question-assumption": "question-assumption";
|
|
224
242
|
"question-leading": "question-leading";
|
|
225
243
|
"reference-resolve": "reference-resolve";
|
|
226
244
|
"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>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { nonEmptyText, probability, decisionStatusSchema, resultMetadataSchema, } from '../../src/schema.js';
|
|
3
|
+
export const causalAttributionVerdictSchema = z.enum([
|
|
4
|
+
'personal',
|
|
5
|
+
'situational',
|
|
6
|
+
'mixed',
|
|
7
|
+
'none',
|
|
8
|
+
'unclear',
|
|
9
|
+
]);
|
|
10
|
+
export const causalAttributionInputSchema = z.object({
|
|
11
|
+
behavior: nonEmptyText.describe('One focal behavior or outcome identifying the person or actor whose behavior is being explained.'),
|
|
12
|
+
explanation: nonEmptyText.describe('The supplied explanation to classify, including any quoted attribution.'),
|
|
13
|
+
context: nonEmptyText
|
|
14
|
+
.describe('Supplied identities or references needed to interpret the explanation.')
|
|
15
|
+
.optional(),
|
|
16
|
+
minConfidence: probability.optional(),
|
|
17
|
+
});
|
|
18
|
+
export const causalAttributionResultSchema = resultMetadataSchema.extend({
|
|
19
|
+
status: decisionStatusSchema,
|
|
20
|
+
verdict: causalAttributionVerdictSchema,
|
|
21
|
+
confidence: probability,
|
|
22
|
+
probabilities: z.record(causalAttributionVerdictSchema, probability),
|
|
23
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const claimStanceVerdictSchema: z.ZodEnum<{
|
|
3
3
|
unclear: "unclear";
|
|
4
|
+
mixed: "mixed";
|
|
4
5
|
affirms: "affirms";
|
|
5
6
|
denies: "denies";
|
|
6
|
-
mixed: "mixed";
|
|
7
7
|
not_addressed: "not_addressed";
|
|
8
8
|
}>;
|
|
9
9
|
export declare const claimStanceInputSchema: z.ZodObject<{
|
|
@@ -24,17 +24,17 @@ export declare const claimStanceResultSchema: z.ZodObject<{
|
|
|
24
24
|
}>;
|
|
25
25
|
verdict: z.ZodEnum<{
|
|
26
26
|
unclear: "unclear";
|
|
27
|
+
mixed: "mixed";
|
|
27
28
|
affirms: "affirms";
|
|
28
29
|
denies: "denies";
|
|
29
|
-
mixed: "mixed";
|
|
30
30
|
not_addressed: "not_addressed";
|
|
31
31
|
}>;
|
|
32
32
|
confidence: z.ZodNumber;
|
|
33
33
|
probabilities: z.ZodRecord<z.ZodEnum<{
|
|
34
34
|
unclear: "unclear";
|
|
35
|
+
mixed: "mixed";
|
|
35
36
|
affirms: "affirms";
|
|
36
37
|
denies: "denies";
|
|
37
|
-
mixed: "mixed";
|
|
38
38
|
not_addressed: "not_addressed";
|
|
39
39
|
}>, z.ZodNumber>;
|
|
40
40
|
}, z.core.$strip>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"input": {
|
|
3
|
+
"issue": "CSV export fails with error E42.",
|
|
4
|
+
"message": "The same E42 error is back when I export a CSV.",
|
|
5
|
+
"history": "Monday, customer: CSV exports fail with E42. Tuesday, customer: CSV exports work again; E42 is gone."
|
|
6
|
+
},
|
|
7
|
+
"response": {
|
|
8
|
+
"model": "demo-fixture",
|
|
9
|
+
"usage": {
|
|
10
|
+
"input_tokens": 0,
|
|
11
|
+
"output_tokens": 0
|
|
12
|
+
},
|
|
13
|
+
"answers": {
|
|
14
|
+
"decision": {
|
|
15
|
+
"type": "choice",
|
|
16
|
+
"choice": "returned",
|
|
17
|
+
"confidence": 0.97,
|
|
18
|
+
"probabilities": {
|
|
19
|
+
"new": 0.01,
|
|
20
|
+
"ongoing": 0.01,
|
|
21
|
+
"returned": 0.97,
|
|
22
|
+
"unclear": 0.01
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|