Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.
Python calibrationclassificationdecision-modelhuggingfacejevmodernbertmultilingualnlppythonpytorchroutingtyped-decisionszero-shot
{
"name": "sample_app_english",
"state": {
"from": "[email protected]",
"subject": "Duplicate charge on invoice #4411",
"body": "Hi, we were billed twice for March. Please refund the duplicate today or we will cancel our plan."
},
"serialized_state": "{\"from\": \"[email protected]\", \"subject\": \"Duplicate charge on invoice #4411\", \"body\": \"Hi, we were billed twice for March. Please refund the duplicate today or we will cancel our plan.\"}",
"questions": {
"department": {
"type": "choice",
"instructions": "Which department should handle this request?",
"criteria": {
"billing": "invoices, payments, refunds",
"technical": "bugs, outages, system errors",
"sales": "pricing, new contracts",
"other": "everything else"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this request?",
"criteria": [
"not urgent",
"soon",
"critical deadline or blocking issue"
]
},
"churn_risk": {
"type": "noul",
"instructions": "Does the user threaten to cancel or leave?"
},
"refund_requested": {
"type": "noul",
"instructions": "Does the user explicitly request a refund?"
}
},
"per_question": [
{
"id": "department",
"type": "choice",
"qtype": 0,
"instructions": "Which department should handle this request?",
"head_text": "choice question: Which department should handle this request?",
"options": [
"billing: invoices, payments, refunds",
"technical: bugs, outages, system errors",
"sales: pricing, new contracts",
"other: everything else"
],
"input_ids": [
2,
6241,
2872,
235292,
12236,
9888,
1412,
6589,
736,
3853,
235336,
1,
4,
54972,
235292,
88220,
235269,
15598,
235269,
85869,
4,
9838,
235292,
30608,
235269,
142788,
235269,
1812,
10266,
4,
7108,
235292,
25063,
235269,
888,
20078,
4,
1156,
235292,
4553,
1354,
1,
19946,
2273,
1192,
664,
1645,
235348,
200194,
235265,
872,
824,
664,
15029,
1192,
664,
71925,
6256,
611,
42529,
1700,
235310,
235310,
235274,
235274,
824,
664,
2168,
1192,
664,
2151,
235269,
783,
1049,
100159,
11594,
604,
4482,
235265,
5651,
19745,
573,
38294,
3646,
689,
783,
877,
12459,
1167,
1780,
1464,
235270,
1
],
"markers": [
12,
20,
29,
36
]
},
{
"id": "urgency",
"type": "score",
"qtype": 1,
"instructions": "How urgent is this request?",
"head_text": "score question: How urgent is this request?",
"options": [
"level 0: not urgent",
"level 1: soon",
"level 2: critical deadline or blocking issue"
],
"input_ids": [
2,
7716,
2872,
235292,
2250,
34722,
603,
736,
3853,
235336,
1,
4,
2403,
235248,
235276,
235292,
780,
34722,
4,
2403,
235248,
235274,
235292,
4445,
4,
2403,
235248,
235284,
235292,
9523,
30699,
689,
35578,
4295,
1,
19946,
2273,
1192,
664,
1645,
235348,
200194,
235265,
872,
824,
664,
15029,
1192,
664,
71925,
6256,
611,
42529,
1700,
235310,
235310,
235274,
235274,
824,
664,
2168,
1192,
664,
2151,
235269,
783,
1049,
100159,
11594,
604,
4482,
235265,
5651,
19745,
573,
38294,
3646,
689,
783,
877,
12459,
1167,
1780,
1464,
235270,
1
],
"markers": [
11,
18,
24
]
},
{
"id": "churn_risk",
"type": "noul",
"qtype": 2,
"instructions": "Does the user threaten to cancel or leave?",
"head_text": "noul question: Does the user threaten to cancel or leave?",
"options": [
"false: no, the statement does not hold",
"true: yes, the statement holds"
],
"input_ids": [
2,
552,
6311,
2872,
235292,
11188,
573,
2425,
60399,
577,
12459,
689,
5077,
235336,
1,
4,
1566,
235292,
793,
235269,
573,
6218,
1721,
780,
3385,
4,
1382,
235292,
7778,
235269,
573,
6218,
12723,
1,
19946,
2273,
1192,
664,
1645,
235348,
200194,
235265,
872,
824,
664,
15029,
1192,
664,
71925,
6256,
611,
42529,
1700,
235310,
235310,
235274,
235274,
824,
664,
2168,
1192,
664,
2151,
235269,
783,
1049,
100159,
11594,
604,
4482,
235265,
5651,
19745,
573,
38294,
3646,
689,
783,
877,
12459,
1167,
1780,
1464,
235270,
1
],
"markers": [
15,
25
]
},
{
"id": "refund_requested",
"type": "noul",
"qtype": 2,
"instructions": "Does the user explicitly request a refund?",
"head_text": "noul question: Does the user explicitly request a refund?",
"options": [
"false: no, the statement does not hold",
"true: yes, the statement holds"
],
"input_ids": [
2,
552,
6311,
2872,
235292,
11188,
573,
2425,
34913,
3853,
476,
19745,
235336,
1,
4,
1566,
235292,
793,
235269,
573,
6218,
1721,
780,
3385,
4,
1382,
235292,
7778,
235269,
573,
6218,
12723,
1,
19946,
2273,
1192,
664,
1645,
235348,
200194,
235265,
872,
824,
664,
15029,
1192,
664,
71925,
6256,
611,
42529,
1700,
235310,
235310,
235274,
235274,
824,
664,
2168,
1192,
664,
2151,
235269,
783,
1049,
100159,
11594,
604,
4482,
235265,
5651,
19745,
573,
38294,
3646,
689,
783,
877,
12459,
1167,
1780,
1464,
235270,
1
],
"markers": [
14,
24
]
}
],
"batch": {
"input_ids": [
[
2,
6241,
2872,
235292,
12236,
9888,
1412,
6589,
736,
3853,
235336,
1,
4,
54972,
235292,
88220,
235269,
15598,
235269,
85869,
4,
9838,
235292,
30608,
235269,
142788,
235269,
1812,
10266,
4,
7108,
235292,
25063,
235269,
888,
20078,
4,
1156,
235292,
4553,
1354,
1,
19946,
2273,
1192,
664,
1645,
235348,
200194,
235265,
872,
824,
664,
15029,
1192,
664,
71925,
6256,
611,
42529,
1700,
235310,
235310,
235274,
235274,
824,
664,
2168,
1192,
664,
2151,
235269,
783,
1049,
100159,
11594,
604,
4482,
235265,
5651,
19745,
573,
38294,
3646,
689,
783,
877,
12459,
1167,
1780,
1464,
235270,
1
],
[
2,
7716,
2872,
235292,
2250,
34722,
603,
736,
3853,
235336,
1,
4,
2403,
235248,
235276,
235292,
780,
34722,
4,
2403,
235248,
235274,
235292,
4445,
4,
2403,
235248,
235284,
235292,
9523,
30699,
689,
35578,
4295,
1,
19946,
2273,
1192,
664,
1645,
235348,
200194,
235265,
872,
824,
664,
15029,
1192,
664,
71925,
6256,
611,
42529,
1700,
235310,
235310,
235274,
235274,
824,
664,
2168,
1192,
664,
2151,
235269,
783,
1049,
100159,
11594,
604,
4482,
235265,
5651,
19745,
573,
38294,
3646,
689,
783,
877,
12459,
1167,
1780,
1464,
235270,
1,
0,
0,
0,
0,
0,
0,
0
],
[
2,
552,
6311,
2872,
235292,
11188,
573,
2425,
60399,
577,
12459,
689,
5077,
235336,
1,
4,
1566,
235292,
793,
235269,
573,
6218,
1721,
780,
3385,
4,
1382,
235292,
7778,
235269,
573,
6218,
12723,
1,
19946,
2273,
1192,
664,
1645,
235348,
200194,
235265,
872,
824,
664,
15029,
1192,
664,
71925,
6256,
611,
42529,
1700,
235310,
235310,
235274,
235274,
824,
664,
2168,
1192,
664,
2151,
235269,
783,
1049,
100159,
11594,
604,
4482,
235265,
5651,
19745,
573,
38294,
3646,
689,
783,
877,
12459,
1167,
1780,
1464,
235270,
1,
0,
0,
0,
0,
0,
0,
0,
0
],
[
2,
552,
6311,
2872,
235292,
11188,
573,
2425,
34913,
3853,
476,
19745,
235336,
1,
4,
1566,
235292,
793,
235269,
573,
6218,
1721,
780,
3385,
4,
1382,
235292,
7778,
235269,
573,
6218,
12723,
1,
19946,
2273,
1192,
664,
1645,
235348,
200194,
235265,
872,
824,
664,
15029,
1192,
664,
71925,
6256,
611,
42529,
1700,
235310,
235310,
235274,
235274,
824,
664,
2168,
1192,
664,
2151,
235269,
783,
1049,
100159,
11594,
604,
4482,
235265,
5651,
19745,
573,
38294,
3646,
689,
783,
877,
12459,
1167,
1780,
1464,
235270,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
],
"attention_mask": [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0
],
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
],
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
],
"marker_pos": [
[
12,
20,
29,
36
],
[
11,
18,
24,
0
],
[
15,
25,
0,
0
],
[
14,
24,
0,
0
]
],
"marker_mask": [
[
true,
true,
true,
true
],
[
true,
true,
true,
false
],
[
true,
true,
false,
false
],
[
true,
true,
false,
false
]
],
"qtype": [
0,
1,
2,
2
]
},
"marker_axis_padded": false,
"logits": [
[
15.42226791381836,
-4.56812047958374,
-4.566651821136475,
-4.348118782043457
],
[
-3.3222527503967285,
0.3622555732727051,
2.582277297973633,
-10000.0
],
[
1.3057777881622314,
-0.556329607963562,
-10000.0,
-10000.0
],
[
-3.2935073375701904,
0.2925301194190979,
-10000.0,
-10000.0
]
],
"act_logits": [
[
1271.8935546875,
-1520.1710205078125
],
[
1579.6341552734375,
-1867.1561279296875
],
[
1175.693115234375,
-1397.988037109375
],
[
1106.8782958984375,
-1319.477783203125
]
],
"result": {
"model": "laya-rl-agent",
"answers": {
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 1.0,
"technical": 0.0,
"sales": 0.0,
"other": 0.0
},
"confidence": 1.0,
"answer_confidence": 1.0,
"action": {
"act_probability": 1.0
}
},
"urgency": {
"type": "score",
"score": 1.8974,
"legend": {
"0": "not urgent",
"1": "soon",
"2": "critical deadline or blocking issue"
},
"probabilities": {
"0": 0.0025,
"1": 0.0977,
"2": 0.8998
},
"confidence": 0.6932,
"answer_confidence": 0.8998,
"action": {
"act_probability": 1.0
}
},
"churn_risk": {
"type": "noul",
"noul": 0.1345,
"confidence": 0.8655,
"answer_confidence": 0.8655,
"action": {
"act_probability": 1.0
}
},
"refund_requested": {
"type": "noul",
"noul": 0.973,
"confidence": 0.973,
"answer_confidence": 0.973,
"action": {
"act_probability": 1.0
}
}
},
"usage": {
"input_tokens": 348,
"output_tokens": 0,
"state_tokens": 50,
"state_tokens_dropped": 0,
"truncated": false,
"truncated_questions": []
}
}
}