Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.
Python calibrationclassificationdecision-modelhuggingfacejevmodernbertmultilingualnlppythonpytorchroutingtyped-decisionszero-shot
docs(integrations): `min_confidence` flags the answer; the selector still returns the argmax
Adeshina Lasisi7bf21e30f6d0
diff --git a/docs/crewai.md b/docs/crewai.mdindex 54726c59..a7fa74ad 100644--- a/docs/crewai.md+++ b/docs/crewai.md@@ -183,8 +183,13 @@ inference. The two budgets do travel to a remote node, in the request body, up t`lang` pins the language the task is routed and answered in -- selecting the answeringcheckpoint's per-language calibration instead of relying on built-in detection -- and-`min_confidence` is core's abstention gate: a decision under it comes back as an abstention rather-than a forced delegation. Both are read by `Agent.predict` and `Router.predict` alike and accepted by+`min_confidence` is core's abstention gate, and that gate marks rather than withholds: an answer+under it comes back carrying `low_confidence: true`, `abstention: "abstained"` and+`abstention_threshold` on the raw decision kept in `last_decision`, while the agent this router+returns is still the argmax. Which agent is delegated to is changed by `confidence_threshold`, with+`fallback_agent_index` or `raise_on_low_confidence`; a `min_confidence` on its own reports the+abstention and delegates anyway.+Both are read by `Agent.predict` and `Router.predict` alike and accepted by`laya-serve` in the request body, so a router or guard forwards them on the local and the remotepath. An unset one is omitted, not sent as `None`, so it cannot shadow the deployment's own default;`min_confidence=0.0` and `lang=""` are real values and are forwarded as given.@@ -193,6 +198,6 @@ path. An unset one is omitted, not sent as `None`, so it cannot shadow the deplorouter = LayaCrewRouter(confidence_threshold=0.80,lang="fr", # route a French-language crew in French- min_confidence=0.3, # abstain on a delegation the model is not sure about+ min_confidence=0.3, # report an abstention below 0.3; the delegation is still made)```diff --git a/docs/langchain.md b/docs/langchain.mdindex 7dfd251e..a572ca37 100644--- a/docs/langchain.md+++ b/docs/langchain.md@@ -388,8 +388,12 @@ default); a larger value comes back as a 422.Every runnable also takes `lang` and `min_confidence`, the two per-request controls `Agent.predict`and `Router.predict` both read and `laya-serve` both accepts in the body. `lang` pins the languagethe state is routed and answered in -- select the answering checkpoint's per-language calibration-rather than relying on built-in detection -- and `min_confidence` is core's abstention gate: a-decision under it comes back as an abstention instead of a forced choice. Both are forwarded on the+rather than relying on built-in detection -- and `min_confidence` is core's abstention gate, which+marks rather than withholds: an answer under it comes back carrying `low_confidence: true`,+`abstention: "abstained"` and `abstention_threshold` on the raw decision kept in `last_decision`,+while the branch label the runnable returns is still the argmax. The label is changed by+`confidence_threshold` and its `fallback`, not by the gate; a `min_confidence` on its own reports+the abstention and routes anyway. Both are forwarded on thelocal and the remote path, and an unset one is omitted rather than sent as `None` so it cannotshadow a checkpoint's own default. `min_confidence=0.0` and `lang=""` are real values, not absences,and are forwarded as given.@@ -398,7 +402,7 @@ and are forwarded as given.router = LayaRouter(criteria={"billing": "invoices", "tech": "bugs"},lang="es", # route and answer in Spanish- min_confidence=0.3, # abstain below a 0.3 calibrated confidence+ min_confidence=0.3, # report an abstention below 0.3; the branch is still chosen)```diff --git a/docs/llamaindex.md b/docs/llamaindex.mdindex d543dd12..1c37c96c 100644--- a/docs/llamaindex.md+++ b/docs/llamaindex.md@@ -191,8 +191,13 @@ inference. The two budgets do travel to a remote node, in the request body, up t`lang` pins the language the query is routed and answered in -- selecting the answeringcheckpoint's per-language calibration instead of relying on built-in detection -- and-`min_confidence` is core's abstention gate: a decision under it comes back as an abstention rather-than a forced selection. Both are read by `Agent.predict` and `Router.predict` alike and accepted by+`min_confidence` is core's abstention gate, and that gate marks rather than withholds: an answer+under it comes back carrying `low_confidence: true`, `abstention: "abstained"` and+`abstention_threshold` on the raw decision kept in `last_decision`, while the `ToolSelection` this+selector returns is still the argmax. What gets selected is changed by `confidence_threshold` and+the knobs in [Confidence Threshold Gating](#4-confidence-threshold-gating); a `min_confidence` on+its own reports the abstention and selects anyway.+Both are read by `Agent.predict` and `Router.predict` alike and accepted by`laya-serve` in the request body, so a selector forwards them on the local and the remote path. Anunset one is omitted, not sent as `None`, so it cannot shadow the deployment's own default;`min_confidence=0.0` and `lang=""` are real values and are forwarded as given.@@ -201,6 +206,6 @@ unset one is omitted, not sent as `None`, so it cannot shadow the deployment's oselector = LayaSingleSelector(instructions="Which tool or query engine is best suited to answer this query?",lang="de", # answer German queries in German- min_confidence=0.3, # abstain when no tool clears a 0.3 confidence+ min_confidence=0.3, # report an abstention below 0.3; the selection is still made)```