Noul (yes/no), Score (ordered levels), and Choice (pick from fixed options) types in dspy.experimental. The same signature runs on a JSON-capable LLM such as gemini-3.8-flash through Neosantara today and moves to Jev without changing the task definition.
Setup
How It Works
triageanswers three closed questions in one request: escalate or not, how severe, and which team handles it. The model returns probabilities for each answer.- DSPy derives results from the probabilities.
escalate.valueisTruewhenprobability >= threshold.severity.levelis selected bycuts.team.valueis the option with the highestprobability * weight. - Python decides the next step. Escalated tickets go straight to the agent queue with no generation tokens spent.
drafterruns only for tickets that can be answered automatically.muse-spark-1.3-contributor(0.2 per 1M tokens) is a reasoning model, so give it enoughmax_tokensfor both reasoning and the answer.
threshold of 0.3 makes tickets escalate more readily. A weights value of 1.2 for pembayaran favors the payments team when the model is unsure, because a misrouted money ticket costs more.
Decision Types
Every decision output needs a
desc phrased as a question. DSPy rejects signatures without one before sending the request. Choice always picks an option, even when none fits. Add a separate Noul when code needs to reject tickets outside every option.
Division of Work
Calibrate with ReAnchor
ReAnchor fits threshold, cuts, and weights to your metric. Probabilities for each example are computed once and cached. The settings search that follows sends no new requests. Instructions, descriptions, and demos stay unchanged.
ReAnchor tends to lower the threshold. ReAnchor keeps a new setting only when it scores better and passes a fold check, which reduces the risk of overfitting to a small slice of the data.
Switch to Jev
Jev is available on Neosantara as model IDjev. Point the TypeSafe client at the Neosantara base URL and use the same NEOSANTARA_API_KEY. The signature, calibrated settings, and Python code stay the same. Swap the client on the triage predictor.
ReAnchor after switching because Jev’s probability distribution differs from an LLM’s. drafter stays on muse-spark-1.3-contributor because Jev does not generate text.
Call the endpoint directly without DSPy: