DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to route support tickets to teams with probabilities with Laya

Send each ticket to a team, an urgency level and a churn-risk flag in one model call.

Who it is forA support operations engineer whose help desk receives mixed tickets and needs automatic routing to billing, support or sales.

The problemManual triage is slow, and rule-based routing misses tickets that mention several topics at once.

The outcomeEach 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.

What you need first

  • 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

Steps

  1. Run npm install @receptron/laya in your Node.js project.
  2. Run node -e 'import("@receptron/laya").then((m) => m.ensureBundle())' to fetch the weights before the first ticket arrives.
  3. Call Laya.load(), then pass the ticket subject and body as the state with your department, urgency and churn_risk questions to systemOne.
  4. Read result.answers.department.choice, result.answers.urgency.score and result.answers.churn_risk.noul and write them to your ticket record.
  5. Call laya.close() when the worker shuts down.

Prompt for your agent

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.

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.

Share: X LinkedIn Hacker News Email Copy link

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 [email protected] and we will look at it promptly. Full disclaimer page