DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

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.

Short answer: Run npm install @receptron/laya in your Node.js project; then 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. All steps.

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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for receptron/laya and "Route support tickets to teams with probabilities"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer