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

How to answer several typed questions about one message with Laya MLX

Get a team choice, an urgency score and a refund yes/no flag in one call.

Short answer: Install the package: pip install laya-mlx; then 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. All steps.

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

  1. Install the package: pip install laya-mlx
  2. Load the checkpoint in Python with agent = laya.load("aac6fef/laya-mlx").
  3. 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.
  4. Call agent.predict with the message and the dictionary.
  5. 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

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