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.

10.2 KB
Raw Blame
{
  "name": "criterion_shapes",
  "state": "The request mentions a security vulnerability in the login flow.",
  "serialized_state": "The request mentions a security vulnerability in the login flow.",
  "questions": {
    "route": {
      "type": "choice",
      "instructions": "Route this report.",
      "criteria": {
        "security": {
          "desc": "vulnerabilities",
          "sla_hours": 4,
          "escalate": true
        },
        "eng": [
          "bugs",
          "regressions",
          3
        ],
        "zero": 0,
        "falsey": false,
        "blank": "",
        "nothing": null,
        "plain": "anything else"
      }
    },
    "severity": {
      "type": "score",
      "instructions": "Severity of the report.",
      "criteria": [
        {
          "label": "info",
          "cvss": 0.0
        },
        {
          "label": "high",
          "cvss": 7.5
        },
        "critical"
      ]
    }
  },
  "per_question": [
    {
      "id": "route",
      "type": "choice",
      "qtype": 0,
      "instructions": "Route this report.",
      "head_text": "choice question: Route this report.",
      "options": [
        "security: {\"desc\": \"vulnerabilities\", \"sla_hours\": 4, \"escalate\": true}",
        "eng: [\"bugs\", \"regressions\", 3]",
        "zero: 0",
        "falsey: false",
        "blank",
        "nothing",
        "plain: anything else"
      ],
      "input_ids": [
        2,
        6241,
        2872,
        235292,
        20716,
        736,
        3484,
        235265,
        1,
        4,
        6206,
        235292,
        19946,
        11622,
        1192,
        664,
        50625,
        1158,
        19772,
        824,
        664,
        34995,
        235298,
        28068,
        1192,
        235248,
        235310,
        235269,
        664,
        70694,
        607,
        1192,
        1382,
        235270,
        4,
        2941,
        235292,
        10890,
        69305,
        824,
        664,
        1798,
        12982,
        824,
        235248,
        235304,
        235307,
        4,
        8199,
        235292,
        235248,
        235276,
        4,
        1566,
        235267,
        235292,
        1566,
        4,
        15601,
        4,
        4285,
        4,
        7528,
        235292,
        4341,
        1354,
        1,
        714,
        3853,
        41986,
        476,
        6206,
        55632,
        575,
        573,
        12138,
        3781,
        235265,
        1
      ],
      "markers": [
        9,
        34,
        47,
        52,
        57,
        59,
        61
      ]
    },
    {
      "id": "severity",
      "type": "score",
      "qtype": 1,
      "instructions": "Severity of the report.",
      "head_text": "score question: Severity of the report.",
      "options": [
        "level 0: {\"label\": \"info\", \"cvss\": 0.0}",
        "level 1: {\"label\": \"high\", \"cvss\": 7.5}",
        "level 2: critical"
      ],
      "input_ids": [
        2,
        7716,
        2872,
        235292,
        126907,
        576,
        573,
        3484,
        235265,
        1,
        4,
        2403,
        235248,
        235276,
        235292,
        19946,
        2097,
        1192,
        664,
        3296,
        824,
        664,
        11921,
        564,
        1192,
        235248,
        235276,
        235265,
        235276,
        235270,
        4,
        2403,
        235248,
        235274,
        235292,
        19946,
        2097,
        1192,
        664,
        8538,
        824,
        664,
        11921,
        564,
        1192,
        235248,
        235324,
        235265,
        235308,
        235270,
        4,
        2403,
        235248,
        235284,
        235292,
        9523,
        1,
        714,
        3853,
        41986,
        476,
        6206,
        55632,
        575,
        573,
        12138,
        3781,
        235265,
        1
      ],
      "markers": [
        10,
        30,
        50
      ]
    }
  ],
  "batch": {
    "input_ids": [
      [
        2,
        6241,
        2872,
        235292,
        20716,
        736,
        3484,
        235265,
        1,
        4,
        6206,
        235292,
        19946,
        11622,
        1192,
        664,
        50625,
        1158,
        19772,
        824,
        664,
        34995,
        235298,
        28068,
        1192,
        235248,
        235310,
        235269,
        664,
        70694,
        607,
        1192,
        1382,
        235270,
        4,
        2941,
        235292,
        10890,
        69305,
        824,
        664,
        1798,
        12982,
        824,
        235248,
        235304,
        235307,
        4,
        8199,
        235292,
        235248,
        235276,
        4,
        1566,
        235267,
        235292,
        1566,
        4,
        15601,
        4,
        4285,
        4,
        7528,
        235292,
        4341,
        1354,
        1,
        714,
        3853,
        41986,
        476,
        6206,
        55632,
        575,
        573,
        12138,
        3781,
        235265,
        1
      ],
      [
        2,
        7716,
        2872,
        235292,
        126907,
        576,
        573,
        3484,
        235265,
        1,
        4,
        2403,
        235248,
        235276,
        235292,
        19946,
        2097,
        1192,
        664,
        3296,
        824,
        664,
        11921,
        564,
        1192,
        235248,
        235276,
        235265,
        235276,
        235270,
        4,
        2403,
        235248,
        235274,
        235292,
        19946,
        2097,
        1192,
        664,
        8538,
        824,
        664,
        11921,
        564,
        1192,
        235248,
        235324,
        235265,
        235308,
        235270,
        4,
        2403,
        235248,
        235284,
        235292,
        9523,
        1,
        714,
        3853,
        41986,
        476,
        6206,
        55632,
        575,
        573,
        12138,
        3781,
        235265,
        1,
        0,
        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,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ]
    ],
    "marker_pos": [
      [
        9,
        34,
        47,
        52,
        57,
        59,
        61
      ],
      [
        10,
        30,
        50,
        0,
        0,
        0,
        0
      ]
    ],
    "marker_mask": [
      [
        true,
        true,
        true,
        true,
        true,
        true,
        true
      ],
      [
        true,
        true,
        true,
        false,
        false,
        false,
        false
      ]
    ],
    "qtype": [
      0,
      1
    ]
  },
  "marker_axis_padded": false,
  "logits": [
    [
      3.2422256469726562,
      -0.5191883444786072,
      -3.4588751792907715,
      -2.4333722591400146,
      -0.7255568504333496,
      -2.5488669872283936,
      -1.5521641969680786
    ],
    [
      -3.170797348022461,
      -3.0326786041259766,
      -1.6353217363357544,
      -10000.0,
      -10000.0,
      -10000.0,
      -10000.0
    ]
  ],
  "act_logits": [
    [
      1270.6845703125,
      -1515.99755859375
    ],
    [
      1517.0338134765625,
      -1794.2879638671875
    ]
  ],
  "result": {
    "model": "laya-rl-agent",
    "answers": {
      "route": {
        "type": "choice",
        "choice": "security",
        "probabilities": {
          "security": 0.945,
          "eng": 0.022,
          "zero": 0.0012,
          "falsey": 0.0032,
          "blank": 0.0179,
          "nothing": 0.0029,
          "plain": 0.0078
        },
        "confidence": 0.8507,
        "answer_confidence": 0.945,
        "action": {
          "act_probability": 1.0
        }
      },
      "severity": {
        "type": "score",
        "score": 1.5365,
        "legend": {
          "0": "{\"label\": \"info\", \"cvss\": 0.0}",
          "1": "{\"label\": \"high\", \"cvss\": 7.5}",
          "2": "critical"
        },
        "probabilities": {
          "0": 0.1472,
          "1": 0.169,
          "2": 0.6837
        },
        "confidence": 0.2331,
        "answer_confidence": 0.6837,
        "action": {
          "act_probability": 1.0
        }
      }
    },
    "usage": {
      "input_tokens": 148,
      "output_tokens": 0,
      "state_tokens": 11,
      "state_tokens_dropped": 0,
      "truncated": false,
      "truncated_questions": []
    }
  }
}