Decision Models

Decision models like Jev, Nimble, and Tev1 are specialized “System One” AI models designed to output typed, probabilistic decisions (such as choice selections, scores, or yes/no probabilities) instead of free-form natural language text.

This notebook shows how to run decision models locally on modest hardware.

STEP 1: Download and Run a Decision Model

We will use Ollama and the Tev1 model.

ollama run tev1

STEP 2: Use the Decision Pipeline

from onprem.pipelines import Decider
d = Decider(base_url="http://localhost:11434", api_key="ollama", model="tev1")
d.choice("My payment website isn't working.",
          "Which team should handle this?",
          ["billing", "technical", "other"])
{'billing': 0.156240347585171,
 'technical': 0.7472571703371035,
 'other': 0.09650248207772555}
d.choice("My last payment isn't showing up on the website.",
          "Which team should handle this?",
          ["billing", "technical", "other"])
{'billing': 0.700373741450641,
 'technical': 0.23050369909271493,
 'other': 0.069122559456644}
d.classify("My last payment isn't showing up on the website.",
           ["billing", "technical", "other"])
'billing'
d.score("I was charged twice. Please refund immediately.",
         "How urgent is this ticket?",
         ["Routine", "Soon", "Urgent"])
# scores from 0 to 2
1.8772847275672537
d.noul("I was charged twice. Please refund.",
        "Does the customer ask for a refund?")
0.9899980134150086
d.noul("How do I unsubscribe?",
        "Does the customer ask for a refund?")
0.015134594308848217