Laya is a free, open source AI (Apache 2.0, 29K+ stars on GitHub) that answers three kinds of questions about any message: pick one option, give a score, or say yes/no. It answers in about 33 ms and works in 100+ languages. It does the same job as Jev, the paid decision API, and once it's trained on your own examples it scored higher on the public benchmark (76.6% vs 72.7%).
Below are the 5 jobs we'd set up first, each with a copy-paste prompt for Claude Code.
Before you start (5 minutes)
Install Claude Code (or open it in your editor).
Make a new folder for the project and open it in Claude Code.
Paste this prompt:
Set up Laya (github.com/NandhaKishorM/laya) in this folder for the user. Install it with pip install laya, load it with the Router so it picks the right checkpoint per message, and create a file called sort.py with one function that takes a message and a question set and returns the answers with their confidence. Test it on one sample email and show the user the output. Explain each step in plain language.One honest rule: keep each question to 20 options or fewer. Laya is strong on short option lists and weaker on very long ones.
Job 01 · Inbox triage
Question: should this email get a reply now, a reply later, or nothing?
Using sort.py, create a question set called inbox_triage for the user. Choice question "What should happen with this email?" with options: reply_now (a customer or partner waiting on us), reply_later (useful but not urgent), ignore (newsletters, promos, cold pitches). Add a score question "How urgent is this?" with options not urgent, soon, blocking. Run it on the 20 emails in the inbox_samples folder and print a table of subject, decision and confidence.Job 02 · Lead scoring
Question: is this lead hot, warm or cold?
Using sort.py, create a question set called lead_score for the user. Choice question "How ready is this lead to buy?" with options: hot (asks about price, timing or a call), warm (interested but no timeline), cold (just browsing or not a fit). Add a yes/no question "Does this lead mention a budget?" Run it on the leads.csv file and add two new columns with the answers, sorted hot first.Job 03 · Review alerts
Question: is this an angry review that needs a human today?
Using sort.py, create a question set called review_alert for the user. Yes/no question "Is the customer angry or threatening to leave?" and a score question "How serious is the complaint?" with options minor, real problem, urgent. Run it on reviews.csv and print only the reviews where the answer is yes, most serious first.Job 04 · Support routing
Question: which team should take this ticket?
Using sort.py, create a question set called support_route for the user, based on the Laya README example. Choice question "Which department should handle this?" with options: billing (invoices, payments, refunds), technical (bugs, outages, system errors), sales (pricing, new contracts), other (everything else). Add a yes/no question "Does the user threaten to cancel or leave?" Run it on tickets.csv and save a routed_tickets.csv file.Job 05 · DM filter
Question: is this DM a buyer, a fan or spam?
Using sort.py, create a question set called dm_filter for the user. Choice question "What kind of message is this?" with options: buyer (asks about a product, price or how to work with us), fan (compliment or general comment), collab (brand or creator partnership), spam (bots, scams, links). Run it on dms.csv and print the buyers first so the user can answer them today.Make it beat the paid one: train it on your own examples
Out of the box Laya is fair. Trained on your own decisions, it beat the paid API on the public benchmark (36.2% before training, 76.6% after, against 72.7% for Jev).
The official fine tuning notebook runs on Kaggle's free 2x T4 GPUs: build the dataset, train, fit calibration, evaluate, and push the result to Hugging Face.
The user has a CSV of past messages with the correct label for each one (column "text" and column "label"). Prepare it for the Laya fine tuning notebook on Kaggle: clean it, balance the labels, split it into train and test, and write a short checklist for the user explaining how to upload it to Kaggle and run the notebook on the free T4 GPUs. Aim for at least a few thousand labeled examples.Links
Laya on GitHub: github.com/NandhaKishorM/laya
Benchmarks: the "Laya (with routing) vs Jev" table in the README
Stay sharp with The AI Leverage. One useful AI move every week, so you keep getting sharper than the people still doing it by hand.
by bestapps.ai on instagram


