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.

14.9 KB
Raw Blame
{
  "checkpoint": "multilingual",
  "graph": "laya.onnx",
  "cases": [
    {
      "name": "banking-default-group",
      "state": "My new card still has not arrived after two weeks.",
      "group_size": null,
      "questions": {
        "intent": {
          "type": "choice",
          "instructions": "What does the customer want?",
          "criteria": [
            "activate_my_card",
            "age_limit",
            "apple_pay_or_google_pay",
            "atm_support",
            "automatic_top_up",
            "balance_not_updated_after_bank_transfer",
            "beneficiary_not_allowed",
            "cancel_transfer",
            "card_about_to_expire",
            "card_acceptance",
            "card_arrival",
            "card_delivery_estimate",
            "card_linking",
            "card_not_working",
            "card_payment_fee_charged",
            "card_payment_not_recognised",
            "card_swallowed",
            "cash_withdrawal_charge",
            "change_pin",
            "compromised_card",
            "contactless_not_working",
            "country_support",
            "declined_card_payment",
            "declined_cash_withdrawal",
            "declined_transfer",
            "edit_personal_details",
            "exchange_charge",
            "exchange_rate",
            "failed_transfer",
            "fiat_currency_support",
            "get_physical_card",
            "lost_or_stolen_card",
            "lost_or_stolen_phone",
            "order_physical_card",
            "passcode_forgotten",
            "pending_card_payment",
            "refund_not_showing_up",
            "request_refund",
            "terminate_account",
            "top_up_failed"
          ]
        }
      },
      "calls": [
        {
          "asked": {
            "0": {
              "type": "choice",
              "instructions": "What does the customer want?",
              "labels": [
                "activate_my_card",
                "age_limit",
                "apple_pay_or_google_pay",
                "atm_support",
                "automatic_top_up",
                "balance_not_updated_after_bank_transfer",
                "beneficiary_not_allowed",
                "cancel_transfer",
                "card_about_to_expire",
                "card_acceptance",
                "card_arrival",
                "card_delivery_estimate",
                "card_linking"
              ]
            },
            "1": {
              "type": "choice",
              "instructions": "What does the customer want?",
              "labels": [
                "card_not_working",
                "card_payment_fee_charged",
                "card_payment_not_recognised",
                "card_swallowed",
                "cash_withdrawal_charge",
                "change_pin",
                "compromised_card",
                "contactless_not_working",
                "country_support",
                "declined_card_payment",
                "declined_cash_withdrawal",
                "declined_transfer",
                "edit_personal_details"
              ]
            },
            "2": {
              "type": "choice",
              "instructions": "What does the customer want?",
              "labels": [
                "exchange_charge",
                "exchange_rate",
                "failed_transfer",
                "fiat_currency_support",
                "get_physical_card",
                "lost_or_stolen_card",
                "lost_or_stolen_phone",
                "order_physical_card",
                "passcode_forgotten",
                "pending_card_payment",
                "refund_not_showing_up",
                "request_refund",
                "terminate_account",
                "top_up_failed"
              ]
            }
          },
          "answers": {
            "0": {
              "type": "choice",
              "choice": "card_about_to_expire",
              "probabilities": {
                "activate_my_card": 0.0049,
                "age_limit": 0.0001,
                "apple_pay_or_google_pay": 0.0001,
                "atm_support": 0.0001,
                "automatic_top_up": 0.0002,
                "balance_not_updated_after_bank_transfer": 0.0004,
                "beneficiary_not_allowed": 0.0001,
                "cancel_transfer": 0.0001,
                "card_about_to_expire": 0.8734,
                "card_acceptance": 0.0036,
                "card_arrival": 0.1124,
                "card_delivery_estimate": 0.0041,
                "card_linking": 0.0006
              },
              "confidence": 0.8264,
              "answer_confidence": 0.8734,
              "action": {
                "act_probability": 1.0
              }
            },
            "1": {
              "type": "choice",
              "choice": "card_not_working",
              "probabilities": {
                "card_not_working": 0.9967,
                "card_payment_fee_charged": 0.0,
                "card_payment_not_recognised": 0.0001,
                "card_swallowed": 0.0009,
                "cash_withdrawal_charge": 0.0,
                "change_pin": 0.0,
                "compromised_card": 0.0016,
                "contactless_not_working": 0.0005,
                "country_support": 0.0,
                "declined_card_payment": 0.0,
                "declined_cash_withdrawal": 0.0,
                "declined_transfer": 0.0,
                "edit_personal_details": 0.0
              },
              "confidence": 0.9898,
              "answer_confidence": 0.9967,
              "action": {
                "act_probability": 1.0
              }
            },
            "2": {
              "type": "choice",
              "choice": "lost_or_stolen_card",
              "probabilities": {
                "exchange_charge": 0.0001,
                "exchange_rate": 0.0002,
                "failed_transfer": 0.0929,
                "fiat_currency_support": 0.0003,
                "get_physical_card": 0.0002,
                "lost_or_stolen_card": 0.7004,
                "lost_or_stolen_phone": 0.017,
                "order_physical_card": 0.003,
                "passcode_forgotten": 0.016,
                "pending_card_payment": 0.1542,
                "refund_not_showing_up": 0.0015,
                "request_refund": 0.0001,
                "terminate_account": 0.0027,
                "top_up_failed": 0.0116
              },
              "confidence": 0.6228,
              "answer_confidence": 0.7004,
              "action": {
                "act_probability": 1.0
              }
            }
          },
          "usage": {
            "input_tokens": 303,
            "output_tokens": 0,
            "state_tokens": 11,
            "state_tokens_dropped": 0,
            "truncated": false,
            "truncated_questions": []
          }
        },
        {
          "asked": {
            "intent": {
              "type": "choice",
              "instructions": "What does the customer want?",
              "labels": [
                "card_about_to_expire",
                "card_not_working",
                "lost_or_stolen_card"
              ]
            }
          },
          "answers": {
            "intent": {
              "type": "choice",
              "choice": "card_about_to_expire",
              "probabilities": {
                "card_about_to_expire": 0.9919,
                "card_not_working": 0.0032,
                "lost_or_stolen_card": 0.0049
              },
              "confidence": 0.9523,
              "answer_confidence": 0.9919,
              "action": {
                "act_probability": 1.0
              }
            }
          },
          "usage": {
            "input_tokens": 46,
            "output_tokens": 0,
            "state_tokens": 11,
            "state_tokens_dropped": 0,
            "truncated": false,
            "truncated_questions": []
          }
        }
      ],
      "model": "laya-rl-agent-onnx",
      "tournament": {
        "intent": {
          "labels": [
            "card_about_to_expire",
            "card_not_working",
            "lost_or_stolen_card"
          ],
          "n": 40,
          "rounds": 1
        }
      }
    },
    {
      "name": "mixed-group-8",
      "state": "We were billed twice for March and want a refund today.",
      "group_size": 8,
      "questions": {
        "dept": {
          "type": "choice",
          "instructions": "Which team owns this?",
          "criteria": {
            "billing": "invoices and charges",
            "refunds": "money sent back",
            "fraud": "unauthorised activity",
            "cards": "card problems",
            "transfers": "bank transfers",
            "loans": "credit and loans",
            "savings": "savings products",
            "kyc": "identity checks",
            "support": "general help",
            "legal": "complaints and law",
            "sales": "new products",
            "tech": "app bugs"
          }
        },
        "urgent": {
          "type": "noul",
          "instructions": "This needs a human today."
        }
      },
      "calls": [
        {
          "asked": {
            "0": {
              "type": "choice",
              "instructions": "Which team owns this?",
              "labels": [
                "billing",
                "refunds",
                "fraud",
                "cards",
                "transfers",
                "loans"
              ],
              "criteria": {
                "billing": "invoices and charges",
                "refunds": "money sent back",
                "fraud": "unauthorised activity",
                "cards": "card problems",
                "transfers": "bank transfers",
                "loans": "credit and loans"
              }
            },
            "1": {
              "type": "choice",
              "instructions": "Which team owns this?",
              "labels": [
                "savings",
                "kyc",
                "support",
                "legal",
                "sales",
                "tech"
              ],
              "criteria": {
                "savings": "savings products",
                "kyc": "identity checks",
                "support": "general help",
                "legal": "complaints and law",
                "sales": "new products",
                "tech": "app bugs"
              }
            }
          },
          "answers": {
            "0": {
              "type": "choice",
              "choice": "refunds",
              "probabilities": {
                "billing": 0.0011,
                "refunds": 0.9988,
                "fraud": 0.0,
                "cards": 0.0,
                "transfers": 0.0,
                "loans": 0.0
              },
              "confidence": 0.9949,
              "answer_confidence": 0.9988,
              "action": {
                "act_probability": 1.0
              }
            },
            "1": {
              "type": "choice",
              "choice": "sales",
              "probabilities": {
                "savings": 0.3114,
                "kyc": 0.1803,
                "support": 0.0423,
                "legal": 0.0523,
                "sales": 0.3787,
                "tech": 0.0351
              },
              "confidence": 0.1933,
              "answer_confidence": 0.3787,
              "action": {
                "act_probability": 1.0
              }
            }
          },
          "usage": {
            "input_tokens": 113,
            "output_tokens": 0,
            "state_tokens": 12,
            "state_tokens_dropped": 0,
            "truncated": false,
            "truncated_questions": []
          }
        },
        {
          "asked": {
            "dept": {
              "type": "choice",
              "instructions": "Which team owns this?",
              "labels": [
                "refunds",
                "sales"
              ],
              "criteria": {
                "refunds": "money sent back",
                "sales": "new products"
              }
            },
            "urgent": {
              "type": "noul",
              "instructions": "This needs a human today."
            }
          },
          "answers": {
            "dept": {
              "type": "choice",
              "choice": "refunds",
              "probabilities": {
                "refunds": 1.0,
                "sales": 0.0
              },
              "confidence": 0.9997,
              "answer_confidence": 1.0,
              "action": {
                "act_probability": 1.0
              }
            },
            "urgent": {
              "type": "noul",
              "noul": 0.0283,
              "confidence": 0.9717,
              "answer_confidence": 0.9717,
              "action": {
                "act_probability": 1.0
              }
            }
          },
          "usage": {
            "input_tokens": 79,
            "output_tokens": 0,
            "state_tokens": 12,
            "state_tokens_dropped": 0,
            "truncated": false,
            "truncated_questions": []
          }
        }
      ],
      "model": "laya-rl-agent-onnx",
      "tournament": {
        "dept": {
          "labels": [
            "refunds",
            "sales"
          ],
          "n": 12,
          "rounds": 1
        }
      }
    },
    {
      "name": "nothing-to-narrow",
      "state": "The app crashes when I open statements.",
      "group_size": null,
      "questions": {
        "intent": {
          "type": "choice",
          "instructions": "What is wrong?",
          "criteria": {
            "bug": "the app fails",
            "billing": "a charge",
            "other": "else"
          }
        }
      },
      "calls": [
        {
          "asked": {
            "intent": {
              "type": "choice",
              "instructions": "What is wrong?",
              "labels": [
                "bug",
                "billing",
                "other"
              ],
              "criteria": {
                "bug": "the app fails",
                "billing": "a charge",
                "other": "else"
              }
            }
          },
          "answers": {
            "intent": {
              "type": "choice",
              "choice": "bug",
              "probabilities": {
                "bug": 0.9925,
                "billing": 0.0015,
                "other": 0.006
              },
              "confidence": 0.9563,
              "answer_confidence": 0.9925,
              "action": {
                "act_probability": 1.0
              }
            }
          },
          "usage": {
            "input_tokens": 34,
            "output_tokens": 0,
            "state_tokens": 8,
            "state_tokens_dropped": 0,
            "truncated": false,
            "truncated_questions": []
          }
        }
      ],
      "model": "laya-rl-agent-onnx",
      "tournament": {
        "intent": {
          "labels": [
            "bug",
            "billing",
            "other"
          ],
          "n": 3,
          "rounds": 0
        }
      }
    }
  ]
}