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.7 KB
Raw Blame
{
  "name": "budget_head_false",
  "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": [
        50281,
        22122,
        1953,
        27,
        6758,
        7811,
        943,
        6016,
        436,
        50282,
        50284,
        33484,
        27,
        29838,
        50284,
        7681,
        27,
        19775,
        50284,
        2395,
        27,
        2412,
        50282,
        18961,
        27,
        18603,
        6636,
        327,
        45156,
        854,
        3507,
        1012,
        187,
        187,
        12764,
        13,
        309,
        369,
        47045,
        7019,
        436,
        1770,
        323,
        253,
        1294,
        2098,
        285,
        253,
        1273,
        4179,
        556,
        417,
        644,
        23005,
        264,
        15,
        831,
        310,
        253,
        2626,
        673,
        309,
        452,
        3542,
        275,
        15,
        1310,
        352,
        310,
        417,
        4229,
        3063,
        309,
        717,
        476,
        68,
        3485,
        253,
        2395,
        15,
        50282
      ],
      "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": [
        50281,
        18891,
        1953,
        27,
        1359,
        21007,
        310,
        436,
        2748,
        50282,
        50284,
        1268,
        470,
        27,
        50284,
        1268,
        337,
        27,
        50284,
        1268,
        374,
        27,
        50284,
        1268,
        495,
        27,
        50282,
        18961,
        27,
        18603,
        6636,
        327,
        45156,
        854,
        3507,
        1012,
        187,
        187,
        12764,
        13,
        309,
        369,
        47045,
        7019,
        436,
        1770,
        323,
        253,
        1294,
        2098,
        285,
        253,
        1273,
        4179,
        556,
        417,
        644,
        23005,
        264,
        15,
        831,
        310,
        253,
        2626,
        673,
        309,
        452,
        3542,
        275,
        15,
        1310,
        352,
        310,
        417,
        4229,
        3063,
        309,
        717,
        476,
        68,
        3485,
        253,
        2395,
        15,
        50282
      ],
      "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": [
        50281,
        79,
        3941,
        1953,
        27,
        380,
        7731,
        37654,
        281,
        50282,
        50284,
        3221,
        27,
        642,
        50284,
        2032,
        27,
        4754,
        50282,
        18961,
        27,
        18603,
        6636,
        327,
        45156,
        854,
        3507,
        1012,
        187,
        187,
        12764,
        13,
        309,
        369,
        47045,
        7019,
        436,
        1770,
        323,
        253,
        1294,
        2098,
        285,
        253,
        1273,
        4179,
        556,
        417,
        644,
        23005,
        264,
        15,
        831,
        310,
        253,
        2626,
        673,
        309,
        452,
        3542,
        275,
        15,
        1310,
        352,
        310,
        417,
        4229,
        3063,
        309,
        717,
        476,
        68,
        3485,
        253,
        2395,
        15,
        50282
      ],
      "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": [
        50281,
        79,
        3941,
        1953,
        27,
        831,
        4419,
        247,
        1966,
        50282,
        50284,
        3221,
        27,
        247,
        50284,
        2032,
        27,
        247,
        50282,
        18961,
        27,
        18603,
        6636,
        327,
        45156,
        854,
        3507,
        1012,
        187,
        187,
        12764,
        13,
        309,
        369,
        47045,
        7019,
        436,
        1770,
        323,
        253,
        1294,
        2098,
        285,
        253,
        1273,
        4179,
        556,
        417,
        644,
        23005,
        264,
        15,
        831,
        310,
        253,
        2626,
        673,
        309,
        452,
        3542,
        275,
        15,
        1310,
        352,
        310,
        417,
        4229,
        3063,
        309,
        717,
        476,
        68,
        3485,
        253,
        2395,
        15,
        50282
      ],
      "markers": [
        10,
        14
      ]
    }
  ],
  "batch": {
    "input_ids": [
      [
        50281,
        22122,
        1953,
        27,
        6758,
        7811,
        943,
        6016,
        436,
        50282,
        50284,
        33484,
        27,
        29838,
        50284,
        7681,
        27,
        19775,
        50284,
        2395,
        27,
        2412,
        50282,
        18961,
        27,
        18603,
        6636,
        327,
        45156,
        854,
        3507,
        1012,
        187,
        187,
        12764,
        13,
        309,
        369,
        47045,
        7019,
        436,
        1770,
        323,
        253,
        1294,
        2098,
        285,
        253,
        1273,
        4179,
        556,
        417,
        644,
        23005,
        264,
        15,
        831,
        310,
        253,
        2626,
        673,
        309,
        452,
        3542,
        275,
        15,
        1310,
        352,
        310,
        417,
        4229,
        3063,
        309,
        717,
        476,
        68,
        3485,
        253,
        2395,
        15,
        50282,
        50283,
        50283,
        50283,
        50283
      ],
      [
        50281,
        18891,
        1953,
        27,
        1359,
        21007,
        310,
        436,
        2748,
        50282,
        50284,
        1268,
        470,
        27,
        50284,
        1268,
        337,
        27,
        50284,
        1268,
        374,
        27,
        50284,
        1268,
        495,
        27,
        50282,
        18961,
        27,
        18603,
        6636,
        327,
        45156,
        854,
        3507,
        1012,
        187,
        187,
        12764,
        13,
        309,
        369,
        47045,
        7019,
        436,
        1770,
        323,
        253,
        1294,
        2098,
        285,
        253,
        1273,
        4179,
        556,
        417,
        644,
        23005,
        264,
        15,
        831,
        310,
        253,
        2626,
        673,
        309,
        452,
        3542,
        275,
        15,
        1310,
        352,
        310,
        417,
        4229,
        3063,
        309,
        717,
        476,
        68,
        3485,
        253,
        2395,
        15,
        50282
      ],
      [
        50281,
        79,
        3941,
        1953,
        27,
        380,
        7731,
        37654,
        281,
        50282,
        50284,
        3221,
        27,
        642,
        50284,
        2032,
        27,
        4754,
        50282,
        18961,
        27,
        18603,
        6636,
        327,
        45156,
        854,
        3507,
        1012,
        187,
        187,
        12764,
        13,
        309,
        369,
        47045,
        7019,
        436,
        1770,
        323,
        253,
        1294,
        2098,
        285,
        253,
        1273,
        4179,
        556,
        417,
        644,
        23005,
        264,
        15,
        831,
        310,
        253,
        2626,
        673,
        309,
        452,
        3542,
        275,
        15,
        1310,
        352,
        310,
        417,
        4229,
        3063,
        309,
        717,
        476,
        68,
        3485,
        253,
        2395,
        15,
        50282,
        50283,
        50283,
        50283,
        50283,
        50283,
        50283,
        50283,
        50283
      ],
      [
        50281,
        79,
        3941,
        1953,
        27,
        831,
        4419,
        247,
        1966,
        50282,
        50284,
        3221,
        27,
        247,
        50284,
        2032,
        27,
        247,
        50282,
        18961,
        27,
        18603,
        6636,
        327,
        45156,
        854,
        3507,
        1012,
        187,
        187,
        12764,
        13,
        309,
        369,
        47045,
        7019,
        436,
        1770,
        323,
        253,
        1294,
        2098,
        285,
        253,
        1273,
        4179,
        556,
        417,
        644,
        23005,
        264,
        15,
        831,
        310,
        253,
        2626,
        673,
        309,
        452,
        3542,
        275,
        15,
        1310,
        352,
        310,
        417,
        4229,
        3063,
        309,
        717,
        476,
        68,
        3485,
        253,
        2395,
        15,
        50282,
        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,
        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,
        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,
        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": [
    [
      3.624075412750244,
      -2.3750534057617188,
      -0.1521185338497162,
      -10000.0
    ],
    [
      1.5569745302200317,
      1.8704313039779663,
      0.009184330701828003,
      -0.044576674699783325
    ],
    [
      -0.9298000335693359,
      1.8127309083938599,
      -10000.0,
      -10000.0
    ],
    [
      -0.3670514225959778,
      0.20023643970489502,
      -10000.0,
      -10000.0
    ]
  ],
  "act_logits": [
    [
      3985.66748046875,
      -3259.279296875
    ],
    [
      3971.926513671875,
      -3257.3427734375
    ],
    [
      4791.419921875,
      -3925.36279296875
    ],
    [
      4446.1748046875,
      -3642.591796875
    ]
  ],
  "result": {
    "model": "laya-rl-agent",
    "answers": {
      "department": {
        "type": "choice",
        "choice": "billing",
        "probabilities": {
          "billing": 0.8695,
          "technical": 0.0288,
          "account": 0.1017
        },
        "confidence": 0.5847,
        "answer_confidence": 0.8695,
        "action": {
          "act_probability": 1.0
        }
      },
      "urgency": {
        "type": "score",
        "score": 0.9462,
        "legend": {
          "0": "not urgent",
          "1": "this week",
          "2": "today",
          "3": "drop everything"
        },
        "probabilities": {
          "0": 0.3505,
          "1": 0.4503,
          "2": 0.1018,
          "3": 0.0975
        },
        "confidence": 0.1443,
        "answer_confidence": 0.4503,
        "action": {
          "act_probability": 1.0
        }
      },
      "churn_risk": {
        "type": "noul",
        "noul": 0.7994,
        "confidence": 0.7994,
        "answer_confidence": 0.7994,
        "action": {
          "act_probability": 1.0
        }
      },
      "needs_human": {
        "type": "noul",
        "noul": 0.571,
        "confidence": 0.571,
        "answer_confidence": 0.571,
        "action": {
          "act_probability": 1.0
        }
      }
    },
    "usage": {
      "input_tokens": 320,
      "output_tokens": 0,
      "state_tokens": 57,
      "state_tokens_dropped": 0,
      "truncated": false,
      "truncated_questions": []
    }
  },
  "options": {
    "head_max_len": false
  }
}