Vibeleaderboard
← All Intel
Intel / article

Jev in action – task classifier and auto model router in Keen Code

Source
mochow13.github.io
Author
mochow13
Date

Context

Keen Code, a coding built by a solo developer, uses a decision model to judge how hard each request is and can switch to a stronger or cheaper chat model based on that judgment (Keen Code docs). A decision model, such as TypeSafe's Jev, takes an input and a set of questions and returns probabilities instead of writing text. Keen sends it the recent conversation, user and assistant text only, capped at 80 KiB, and asks three questions in one request: whether the task is simple, standard or complex; how likely a wrong or incomplete result is to affect production, credentials, permissions or billing; and how likely the latest message starts a new task unrelated to the last one. The classification runs alongside the normal response, and the rubric tells the model to treat the conversation as data and ignore any instructions in it.

The article keeps classification and routing separate. Classification only produces these signals. An optional router switches to the model configured for a category only if that category's probability is above 0.5 and either the message looks like a new task, with probability at least 0.6, or the category is above 0.8 and the target is a higher tier than the current model. The confidence rule only escalates, and the consequentiality score does not appear in the switching rules. If the classifier fails, times out or returns invalid answers, Keen keeps the current model and continues. The feature is opt-in and sends the selected conversation, working directory and Git branch to an external provider. The article describes the design but reports no figures on cost, speed or how well the routing works.

Terms in this piece · Glossary
  • AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
Read the source mochow13.github.io
Recommended reads
Comments

Checking sign-in…

Loading comments…