Skip to content

armgit / laya

Public Imported from GitHub
0

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.

18.8 KB
Raw Blame
{
  "name": "budget_head_zero",
  "state": "Subject: Double charged on invoice 88213\n\nHi, I was billed twice this month for the Pro plan and the second charge has not been refunded. This is the third time I have written in. If it is not fixed today I am cancelling the account.",
  "serialized_state": "Subject: Double charged on invoice 88213\n\nHi, I was billed twice this month for the Pro plan and the second charge has not been refunded. This is the third time I have written in. If it is not fixed today I am cancelling the account.",
  "questions": {
    "department": {
      "type": "choice",
      "instructions": "Which department should handle this?",
      "criteria": {
        "billing": "invoices, payments, double charges, refunds",
        "technical": "bugs, outages, integration errors",
        "account": "logins, seats, plan changes"
      }
    },
    "urgency": {
      "type": "score",
      "instructions": "How urgent is this request?",
      "criteria": [
        "not urgent",
        "this week",
        "today",
        "drop everything"
      ]
    },
    "churn_risk": {
      "type": "noul",
      "instructions": "The customer threatens to cancel the account."
    },
    "needs_human": {
      "type": "noul",
      "instructions": "This requires a human agent rather than an automated reply.",
      "criteria": {
        "false": "a template reply resolves it",
        "true": "a person must intervene"
      }
    }
  },
  "per_question": [
    {
      "id": "department",
      "type": "choice",
      "qtype": 0,
      "instructions": "Which department should handle this?",
      "head_text": "choice question: Which department should handle this?",
      "options": [
        "billing: invoices, payments, double charges, refunds",
        "technical: bugs, outages, integration errors",
        "account: logins, seats, plan changes"
      ],
      "input_ids": [
        2,
        6241,
        2872,
        235292,
        12236,
        9888,
        1412,
        6589,
        736,
        1,
        4,
        54972,
        235292,
        88220,
        4,
        9838,
        235292,
        30608,
        4,
        3185,
        235292,
        12138,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      "markers": [
        10,
        14,
        18
      ]
    },
    {
      "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: this week",
        "level 2: today",
        "level 3: drop everything"
      ],
      "input_ids": [
        2,
        7716,
        2872,
        235292,
        2250,
        34722,
        603,
        736,
        3853,
        1,
        4,
        2403,
        235248,
        235276,
        4,
        2403,
        235248,
        235274,
        4,
        2403,
        235248,
        235284,
        4,
        2403,
        235248,
        235304,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      "markers": [
        10,
        14,
        18,
        22
      ]
    },
    {
      "id": "churn_risk",
      "type": "noul",
      "qtype": 2,
      "instructions": "The customer threatens to cancel the account.",
      "head_text": "noul question: The customer threatens to cancel the account.",
      "options": [
        "false: no, the statement does not hold",
        "true: yes, the statement holds"
      ],
      "input_ids": [
        2,
        552,
        6311,
        2872,
        235292,
        714,
        6650,
        80670,
        577,
        1,
        4,
        1566,
        235292,
        793,
        4,
        1382,
        235292,
        7778,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      "markers": [
        10,
        14
      ]
    },
    {
      "id": "needs_human",
      "type": "noul",
      "qtype": 2,
      "instructions": "This requires a human agent rather than an automated reply.",
      "head_text": "noul question: This requires a human agent rather than an automated reply.",
      "options": [
        "false: a template reply resolves it",
        "true: a person must intervene"
      ],
      "input_ids": [
        2,
        552,
        6311,
        2872,
        235292,
        1417,
        9286,
        476,
        3515,
        1,
        4,
        1566,
        235292,
        476,
        4,
        1382,
        235292,
        476,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      "markers": [
        10,
        14
      ]
    }
  ],
  "batch": {
    "input_ids": [
      [
        2,
        6241,
        2872,
        235292,
        12236,
        9888,
        1412,
        6589,
        736,
        1,
        4,
        54972,
        235292,
        88220,
        4,
        9838,
        235292,
        30608,
        4,
        3185,
        235292,
        12138,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1,
        0,
        0,
        0,
        0
      ],
      [
        2,
        7716,
        2872,
        235292,
        2250,
        34722,
        603,
        736,
        3853,
        1,
        4,
        2403,
        235248,
        235276,
        4,
        2403,
        235248,
        235274,
        4,
        2403,
        235248,
        235284,
        4,
        2403,
        235248,
        235304,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      [
        2,
        552,
        6311,
        2872,
        235292,
        714,
        6650,
        80670,
        577,
        1,
        4,
        1566,
        235292,
        793,
        4,
        1382,
        235292,
        7778,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      [
        2,
        552,
        6311,
        2872,
        235292,
        1417,
        9286,
        476,
        3515,
        1,
        4,
        1566,
        235292,
        476,
        4,
        1382,
        235292,
        476,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1,
        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,
        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,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        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,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ]
    ],
    "marker_pos": [
      [
        10,
        14,
        18,
        0
      ],
      [
        10,
        14,
        18,
        22
      ],
      [
        10,
        14,
        0,
        0
      ],
      [
        10,
        14,
        0,
        0
      ]
    ],
    "marker_mask": [
      [
        true,
        true,
        true,
        false
      ],
      [
        true,
        true,
        true,
        true
      ],
      [
        true,
        true,
        false,
        false
      ],
      [
        true,
        true,
        false,
        false
      ]
    ],
    "qtype": [
      0,
      1,
      2,
      2
    ]
  },
  "marker_axis_padded": false,
  "logits": [
    [
      11.367841720581055,
      -4.558438301086426,
      -1.6942071914672852,
      -10000.0
    ],
    [
      -4.573573112487793,
      -4.5767436027526855,
      -4.451260089874268,
      -1.2994320392608643
    ],
    [
      5.623868942260742,
      -0.22243505716323853,
      -10000.0,
      -10000.0
    ],
    [
      2.1552329063415527,
      -0.12518632411956787,
      -10000.0,
      -10000.0
    ]
  ],
  "act_logits": [
    [
      1319.3858642578125,
      -1575.1580810546875
    ],
    [
      1571.8448486328125,
      -1858.7113037109375
    ],
    [
      1329.6971435546875,
      -1581.10107421875
    ],
    [
      1198.6884765625,
      -1427.0087890625
    ]
  ],
  "result": {
    "model": "laya-rl-agent",
    "answers": {
      "department": {
        "type": "choice",
        "choice": "billing",
        "probabilities": {
          "billing": 1.0,
          "technical": 0.0,
          "account": 0.0
        },
        "confidence": 1.0,
        "answer_confidence": 1.0,
        "action": {
          "act_probability": 1.0
        }
      },
      "urgency": {
        "type": "score",
        "score": 2.7927,
        "legend": {
          "0": "not urgent",
          "1": "this week",
          "2": "today",
          "3": "drop everything"
        },
        "probabilities": {
          "0": 0.0338,
          "1": 0.0337,
          "2": 0.0382,
          "3": 0.8942
        },
        "confidence": 0.6727,
        "answer_confidence": 0.8942,
        "action": {
          "act_probability": 1.0
        }
      },
      "churn_risk": {
        "type": "noul",
        "noul": 0.0029,
        "confidence": 0.9971,
        "answer_confidence": 0.9971,
        "action": {
          "act_probability": 1.0
        }
      },
      "needs_human": {
        "type": "noul",
        "noul": 0.0928,
        "confidence": 0.9072,
        "answer_confidence": 0.9072,
        "action": {
          "act_probability": 1.0
        }
      }
    },
    "usage": {
      "input_tokens": 316,
      "output_tokens": 0,
      "state_tokens": 56,
      "state_tokens_dropped": 0,
      "truncated": false,
      "truncated_questions": []
    }
  },
  "options": {
    "head_max_len": 0
  }
}