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": [
50281,
22122,
1953,
27,
6758,
7811,
943,
6016,
436,
2748,
32,
50282,
50284,
33484,
27,
29838,
1271,
13,
10762,
13,
1275,
41748,
50284,
7681,
27,
19775,
13,
562,
1131,
13,
985,
6332,
50284,
6224,
27,
20910,
13,
747,
12712,
50284,
643,
27,
3253,
2010,
50282,
9819,
4064,
1381,
346,
4537,
33,
317,
1405,
15,
681,
995,
346,
19091,
1381,
346,
24900,
21821,
4179,
327,
45156,
1852,
2031,
883,
995,
346,
2915,
1381,
346,
12764,
13,
359,
497,
47045,
7019,
323,
3919,
15,
7764,
23005,
253,
21036,
3063,
390,
359,
588,
14002,
776,
2098,
449,
94,
50282
],
"markers": [
12,
22,
32,
39
]
},
{
"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": [
50281,
18891,
1953,
27,
1359,
21007,
310,
436,
2748,
32,
50282,
50284,
1268,
470,
27,
417,
21007,
50284,
1268,
337,
27,
3517,
50284,
1268,
374,
27,
4619,
20639,
390,
14589,
2523,
50282,
9819,
4064,
1381,
346,
4537,
33,
317,
1405,
15,
681,
995,
346,
19091,
1381,
346,
24900,
21821,
4179,
327,
45156,
1852,
2031,
883,
995,
346,
2915,
1381,
346,
12764,
13,
359,
497,
47045,
7019,
323,
3919,
15,
7764,
23005,
253,
21036,
3063,
390,
359,
588,
14002,
776,
2098,
449,
94,
50282
],
"markers": [
11,
17,
22
]
},
{
"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": [
50281,
79,
3941,
1953,
27,
9876,
253,
2608,
29138,
281,
14002,
390,
3553,
32,
50282,
50284,
3221,
27,
642,
13,
253,
3908,
1057,
417,
2186,
50284,
2032,
27,
4754,
13,
253,
3908,
6556,
50282,
9819,
4064,
1381,
346,
4537,
33,
317,
1405,
15,
681,
995,
346,
19091,
1381,
346,
24900,
21821,
4179,
327,
45156,
1852,
2031,
883,
995,
346,
2915,
1381,
346,
12764,
13,
359,
497,
47045,
7019,
323,
3919,
15,
7764,
23005,
253,
21036,
3063,
390,
359,
588,
14002,
776,
2098,
449,
94,
50282
],
"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": [
50281,
79,
3941,
1953,
27,
9876,
253,
2608,
11120,
2748,
247,
23005,
32,
50282,
50284,
3221,
27,
642,
13,
253,
3908,
1057,
417,
2186,
50284,
2032,
27,
4754,
13,
253,
3908,
6556,
50282,
9819,
4064,
1381,
346,
4537,
33,
317,
1405,
15,
681,
995,
346,
19091,
1381,
346,
24900,
21821,
4179,
327,
45156,
1852,
2031,
883,
995,
346,
2915,
1381,
346,
12764,
13,
359,
497,
47045,
7019,
323,
3919,
15,
7764,
23005,
253,
21036,
3063,
390,
359,
588,
14002,
776,
2098,
449,
94,
50282
],
"markers": [
14,
24
]
}
],
"batch": {
"input_ids": [
[
50281,
22122,
1953,
27,
6758,
7811,
943,
6016,
436,
2748,
32,
50282,
50284,
33484,
27,
29838,
1271,
13,
10762,
13,
1275,
41748,
50284,
7681,
27,
19775,
13,
562,
1131,
13,
985,
6332,
50284,
6224,
27,
20910,
13,
747,
12712,
50284,
643,
27,
3253,
2010,
50282,
9819,
4064,
1381,
346,
4537,
33,
317,
1405,
15,
681,
995,
346,
19091,
1381,
346,
24900,
21821,
4179,
327,
45156,
1852,
2031,
883,
995,
346,
2915,
1381,
346,
12764,
13,
359,
497,
47045,
7019,
323,
3919,
15,
7764,
23005,
253,
21036,
3063,
390,
359,
588,
14002,
776,
2098,
449,
94,
50282
],
[
50281,
18891,
1953,
27,
1359,
21007,
310,
436,
2748,
32,
50282,
50284,
1268,
470,
27,
417,
21007,
50284,
1268,
337,
27,
3517,
50284,
1268,
374,
27,
4619,
20639,
390,
14589,
2523,
50282,
9819,
4064,
1381,
346,
4537,
33,
317,
1405,
15,
681,
995,
346,
19091,
1381,
346,
24900,
21821,
4179,
327,
45156,
1852,
2031,
883,
995,
346,
2915,
1381,
346,
12764,
13,
359,
497,
47045,
7019,
323,
3919,
15,
7764,
23005,
253,
21036,
3063,
390,
359,
588,
14002,
776,
2098,
449,
94,
50282,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283
],
[
50281,
79,
3941,
1953,
27,
9876,
253,
2608,
29138,
281,
14002,
390,
3553,
32,
50282,
50284,
3221,
27,
642,
13,
253,
3908,
1057,
417,
2186,
50284,
2032,
27,
4754,
13,
253,
3908,
6556,
50282,
9819,
4064,
1381,
346,
4537,
33,
317,
1405,
15,
681,
995,
346,
19091,
1381,
346,
24900,
21821,
4179,
327,
45156,
1852,
2031,
883,
995,
346,
2915,
1381,
346,
12764,
13,
359,
497,
47045,
7019,
323,
3919,
15,
7764,
23005,
253,
21036,
3063,
390,
359,
588,
14002,
776,
2098,
449,
94,
50282,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283
],
[
50281,
79,
3941,
1953,
27,
9876,
253,
2608,
11120,
2748,
247,
23005,
32,
50282,
50284,
3221,
27,
642,
13,
253,
3908,
1057,
417,
2186,
50284,
2032,
27,
4754,
13,
253,
3908,
6556,
50282,
9819,
4064,
1381,
346,
4537,
33,
317,
1405,
15,
681,
995,
346,
19091,
1381,
346,
24900,
21821,
4179,
327,
45156,
1852,
2031,
883,
995,
346,
2915,
1381,
346,
12764,
13,
359,
497,
47045,
7019,
323,
3919,
15,
7764,
23005,
253,
21036,
3063,
390,
359,
588,
14002,
776,
2098,
449,
94,
50282,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283,
50283
]
],
"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,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marker_axis_padded": false,
"logits": [
[
4.6798810958862305,
-2.7772486209869385,
-3.344090223312378,
-3.2511980533599854
],
[
0.3843739926815033,
1.6769473552703857,
2.341966152191162,
-10000.0
],
[
-1.9876132011413574,
1.0849405527114868,
-10000.0,
-10000.0
],
[
-2.256652355194092,
1.076602816581726,
-10000.0,
-10000.0
]
],
"act_logits": [
[
4204.26220703125,
-3440.0751953125
],
[
4087.649169921875,
-3356.36865234375
],
[
4645.5791015625,
-3803.9736328125
],
[
4762.5341796875,
-3903.2978515625
]
],
"result": {
"model": "laya-rl-agent",
"answers": {
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 0.9653,
"technical": 0.014,
"sales": 0.0101,
"other": 0.0107
},
"confidence": 0.864,
"answer_confidence": 0.9653,
"action": {
"act_probability": 1.0
}
},
"urgency": {
"type": "score",
"score": 1.44,
"legend": {
"0": "not urgent",
"1": "soon",
"2": "critical deadline or blocking issue"
},
"probabilities": {
"0": 0.1164,
"1": 0.3271,
"2": 0.5565
},
"confidence": 0.1425,
"answer_confidence": 0.5565,
"action": {
"act_probability": 1.0
}
},
"churn_risk": {
"type": "noul",
"noul": 0.8248,
"confidence": 0.8248,
"answer_confidence": 0.8248,
"action": {
"act_probability": 1.0
}
},
"refund_requested": {
"type": "noul",
"noul": 0.843,
"confidence": 0.843,
"answer_confidence": 0.843,
"action": {
"act_probability": 1.0
}
}
},
"usage": {
"input_tokens": 348,
"output_tokens": 0,
"state_tokens": 50,
"state_tokens_dropped": 0,
"truncated": false,
"truncated_questions": []
}
}
}