If your workflow only needs to choose Billing or Support, a paragraph is extra work for your software. A decision model takes the context and a specific question, then returns structured values your code can use.
Jev is TypeSafe's hosted System One model. Laya is a separate decision-model project with Apache 2.0 code and weights, available for self-hosting. Neither should be described as a general chatbot replacement. TypeSafe introduction, Laya repository.
This guide is the Laya companion to my existing Jev explainer. It focuses on choosing the right route and testing a real workflow.
Three kinds of question
| Type | Useful question | Shape of result |
|---|---|---|
| Choice | Which department owns this? | An option and its distribution |
| Score | How urgent is this on our rubric? | A level or score and distribution |
| Noul | Does this statement appear true? | A value between zero and one |
These are supported decision types in the cited docs. A probability is a model estimate. It is not proof that the decision is correct on your company's data. TypeSafe primitives.
Laya versus hosted Jev
| Question | Laya | Jev |
|---|---|---|
| Where does it run? | A self-hosted model/runtime | TypeSafe's hosted API |
| What do you operate? | Hardware, dependencies and serving | Your integration and API usage |
| What should you compare? | Quality on your labels and deployment | Quality on the same labels and task |
Laya also documents a Jev-compatible HTTP interface. Compatible request shapes do not guarantee identical decisions. Recheck downstream behavior when changing the provider. Laya serving documentation.
Do not compare local GPU inference with an end-to-end hosted API number and call that a universal speed winner. Different prompts, label counts, hardware and networking can change the comparison.
An illustrative support-ticket example
Install the Laya package in a suitable Python environment:
pip install laya
The structured-output docs show this API pattern:
import laya
model = laya.load("convaiinnovations/laya")
schema = {
"type": "object",
"properties": {
"department": {
"type": "string",
"enum": ["billing", "support", "sales"],
"description": "Which team should handle this?"
},
"needs_human": {"type": "boolean"}
}
}
decision = model.decide("I was charged twice.", schema=schema)
print(decision)
This is a source-based API example, not an executed result. The docs describe a supported subset of JSON Schema, rather than arbitrary structured generation. Check the current schema requirements before adding fields. Structured decisions.
Test the cases that could go wrong
Create a small labelled set from representative, permission-cleared messages. Include clear cases, ambiguous cases, spelling mistakes and the languages your users actually write.
Case ID:
Input and language:
Allowed labels:
Human-labelled answer:
Model-selected answer:
Confidence/distribution:
Time measured, including what stages:
Hardware or hosted API:
Correct / incorrect / ambiguous:
Fallback action:
Review wrong answers with high confidence. Test the fallback route too. For an uncertain support ticket, a useful outcome might be a review queue rather than automatically routing a real customer's message.
A routing decision should not itself authorize a refund, account deletion or another consequential action. Keep that permission in the surrounding workflow.
Evidence from a real builder
Hang Huang reports using self-hosted Laya to categorize more than 600 desktop files. That is an attributed demonstration from the builder, not a result I reproduced. It illustrates a decision-shaped workflow; it does not establish general accuracy or zero operating cost. Builder's post.
FAQ
Does Laya replace Claude or ChatGPT?
Use it for the bounded decisions it supports. Open-ended explanation, writing and long reasoning are different requirements.
Is self-hosting free?
The license and model availability are separate from hardware, deployment and maintenance costs.
Can I swap a compatible API without testing?
Retest the outputs and fallback behavior. Software compatibility is only the first check.
Sources
- Laya repository and license.
- Laya structured-output documentation.
- TypeSafe's Jev introduction.
- Self-hosted file-organizing demonstration.
Checked 1 October 2026. The worksheet and support scenario are illustrative; no comparative benchmark was run for this guide.
