{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "receptron-laya--route-support-tickets-with-probabilities",
 "repo": "receptron/laya",
 "repo_url": "https://github.com/receptron/laya",
 "repo_slug": "receptron-laya",
 "title": "Route support tickets to teams with probabilities",
 "page_title": "How to route support tickets to teams with probabilities with Laya",
 "summary": "Send each ticket to a team, an urgency level and a churn-risk flag in one model call.",
 "who": "A support operations engineer whose help desk receives mixed tickets and needs automatic routing to billing, support or sales.",
 "problem": "Manual triage is slow, and rule-based routing misses tickets that mention several topics at once.",
 "outcome": "Each ticket gets a department choice with a probability per team, an expected urgency score, and a calibrated P(true) for churn risk, all from a single systemOne call.",
 "steps": [
  "Run `npm install @receptron/laya` in your Node.js project.",
  "Run `node -e 'import(\"@receptron/laya\").then((m) => m.ensureBundle())'` to fetch the weights before the first ticket arrives.",
  "Call `Laya.load()`, then pass the ticket subject and body as the state with your department, urgency and churn_risk questions to `systemOne`.",
  "Read `result.answers.department.choice`, `result.answers.urgency.score` and `result.answers.churn_risk.noul` and write them to your ticket record.",
  "Call `laya.close()` when the worker shuts down."
 ],
 "agent_prompt": "In the receptron/laya repo, write a Node.js script that loads Laya with Laya.load() and calls systemOne on the ticket in <ticket-json-file>, asking which team should handle it with choice options billing, support and sales, plus an urgency score and a churn_risk noul question. Expected output: a printed JSON object with the chosen team, its probability, the urgency score and the churn P(true). Verify that the department probabilities sum to about 1.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "Laya returns a probability for every option, but the README says the state is truncated to 512 tokens for the English checkpoint, so very long ticket threads lose their oldest text unless the state is a list.",
 "category": "Work and operations",
 "tags": [
  "Work and operations"
 ],
 "lang": "typescript",
 "requirements": [
  "Node.js 20 or newer",
  "About 2 GB of RAM for the loaded model, plus a few hundred MB per batch of questions",
  "About 1.7 GB of free disk space for the ONNX weights cached under ~/.cache/receptron-laya",
  "Network access to Hugging Face for the first download"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/receptron-laya/route-support-tickets-with-probabilities/",
 "md": "https://dedupedai.com/use-cases/receptron-laya/route-support-tickets-with-probabilities/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/receptron-laya--route-support-tickets-with-probabilities.json",
 "api_version": "v1"
}
