10 · Jev + Gemini · demo 7Smart router: Jev triages, Gemini only when needed
Message"Where is my order?"
Jev classifies~0.3 s · intent + P
0.99
simple and
P ≥ 0.50?
yes
⚡ Templatesimple intents · 0 tokens
🤖 Geminicomplex or uncertain
no
Replyin ~0.3 s
THE QUESTION FOR JEV: WHAT DOES THE CUSTOMER NEED?
const questions = {
  intent: choice("What does the customer need?", {
    greeting: "Only a greeting or thanks",
    order_status: "Only asks where an order is",
    password_reset: "Only asks how to reset the password",
    complex: "Anything else: a problem, a complaint…",
  }),
};
1 · JEV CLASSIFIES EVERY MESSAGE
const { answers } = await jev.systemOne({ state: message, questions });
const { choice: intent, probabilities } = answers.intent;
const p = probabilities[intent]; // "order_status", 0.99
2 · OUR CODE ROUTES IT
if (intent in templates && p >= threshold)
  return { route: "template", reply: templates[intent](message) };
// everything else, or when Jev isn't sure: Gemini
const { text } = await generateText({ model, prompt: message });
Simple requests get a template: Gemini only when needed.