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.

4.7 KB
Raw Blame
{
  "name": "long_dict",
  "state": {
    "notes": "Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. ",
    "message": "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": {
    "topic": {
      "type": "choice",
      "instructions": "What is the request about?",
      "criteria": {
        "refund": "money back, duplicate charge",
        "technical": "bugs and outages",
        "other": null
      }
    },
    "urgency": {
      "type": "score",
      "instructions": "How urgent is this request?",
      "criteria": [
        "not urgent",
        "this week",
        "today"
      ]
    },
    "cancel": {
      "type": "noul",
      "instructions": "The customer threatens to cancel the account."
    }
  },
  "options": {
    "window": 96
  },
  "state_tokens": 157,
  "effective_window": 96,
  "effective_stride": 48,
  "effective_room": 990,
  "windows": [
    {
      "token_start": 0,
      "token_end": 96,
      "text": " {\"notes\": \"Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. \", \"message\":"
    },
    {
      "token_start": 48,
      "token_end": 144,
      "text": " Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. Routine checks completed. \", \"message\": \"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."
    },
    {
      "token_start": 96,
      "token_end": 157,
      "text": " \"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.\"}"
    }
  ],
  "result": {
    "model": "laya-rl-agent-onnx",
    "answers": {
      "topic": {
        "type": "choice",
        "choice": "refund",
        "probabilities": {
          "refund": 0.7892,
          "technical": 0.0078,
          "other": 0.2029
        },
        "confidence": 0.5008,
        "answer_confidence": 0.7892,
        "action": {
          "act_probability": 1.0
        },
        "window": {
          "index": 1,
          "token_start": 48,
          "token_end": 144,
          "count": 3
        }
      },
      "urgency": {
        "type": "score",
        "score": 1.2335,
        "legend": {
          "0": "not urgent",
          "1": "this week",
          "2": "today"
        },
        "probabilities": {
          "0": 0.0218,
          "1": 0.7229,
          "2": 0.2553
        },
        "confidence": 0.3933,
        "answer_confidence": 0.7229,
        "action": {
          "act_probability": 1.0
        },
        "window": {
          "index": 2,
          "token_start": 96,
          "token_end": 157,
          "count": 3
        }
      },
      "cancel": {
        "type": "noul",
        "noul": 0.0739,
        "confidence": 0.9261,
        "answer_confidence": 0.9261,
        "action": {
          "act_probability": 1.0
        },
        "window": {
          "index": 2,
          "token_start": 96,
          "token_end": 157,
          "count": 3
        }
      }
    },
    "usage": {
      "input_tokens": 1047,
      "output_tokens": 0,
      "state_tokens": 253,
      "state_tokens_dropped": 0,
      "truncated": 0,
      "truncated_questions": [],
      "windows": 3
    }
  }
}