Who it is forAn operations lead who wants several structured answers about each customer message in a single local call.
The problemSeparate checks for team, urgency and intent are repetitive to write and run one at a time.
The outcomeOne predict call returns a choice, a rubric score and a P(true) value for the same message.
What you need first
- An Apple Silicon Mac running macOS 14 or later
- Python 3.11 or later
- Internet access for the first checkpoint download, after which inference is fully local
Steps
- Install the package:
pip install laya-mlx - Load the checkpoint in Python with
agent = laya.load("aac6fef/laya-mlx"). - Build a question dictionary with a choice question for department, a score question for urgency and a noul question for refund intent, following the Python API example.
- Call
agent.predictwith the message and the dictionary. - Print
result["answers"]and read each field: choice probabilities, expected score and P(true).
Prompt for your agent
In the laya-mlx repo (github.com/mizorewww/laya-mlx), write a script that loads aac6fef/laya-mlx and asks three questions about the message in <message_file>: a choice for department, a score for urgency with three rubric levels, and a noul for whether the customer asks for money back. Print the answers. Verify that the urgency value falls between 0 and 2.
Caveat. Probabilities can differ slightly across FP16 and FP32 even when the selected label agrees, so check the dtype you choose.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mizorewww/laya-mlx and "Answer several typed questions about one message"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer