I made a DuckDB extension where you can use @typesafeai 's Jev to do quick classification of rows in any csv/parquet file or duckdb table about 10sec for 1k rows ~ better than using an LLM, way more ergonomic than a classifier game-changing for data analysis!
Pattern: Intent Routing
Classify intent with a Choice and complexity with a Score, then send each branch to deterministic code, a specialist model, or a person, with a 0.5 intent-confidence floor.
- Category
- Practices & Patterns
- Published by
- TypeSafe AI
- Author
- —
- Added
- 2026-09-20
Tagsofficialpatternsroutingclassificationconfidence
Highlights
- One request asks Choice intent over order status, product questions, returns, and complaints, plus Score complexity.
- Intent confidence below 0.5 routes to a human agent.
- order_status goes to deterministic code with no LLM involved.
- Complaints escalate when complexity exceeds level 1 or its confidence falls below 0.5.
Quickstart
python
if intent.confidence < 0.5:
return route_to_human_agent(ticket_id)
if intent.choice == "order_status":
handle_order_status(ticket_id)
elif intent.choice == "product_question":
handle_with_llm(ticket_id, PRODUCT_SPECIALIST)
elif intent.choice == "return_exchange":
handle_with_llm(ticket_id, RETURNS_SPECIALIST)Watch out
Route on the pair of answer and confidence, not either alone, or confidently-misrouted tickets slip past review.
More like this
Use the answer to decide what to do and confidence to decide whether to act: the voice-banking example routes below 0.6 to a human and needs 0.85 or more to auto-approve a transfer.
Practices & Patterns#official#patterns#confidence
Official
Ask everything the system might need in one request, then let code throw away what it does not use. The ticket-triage example sends a category plus four speculative questions in parallel.
Practices & Patterns#official#patterns#batching
Official
Pick one option from a set you define. Returns the option, the full probability distribution, and 0-1 confidence, with up to 255 options and parallel questions that barely add latency.
Practices & Patterns#official#primitives#choice
Official
From the community
Posts from builders shipping with Jev right now.
Classifying rows in DuckDB
The launch post
After co-inventing ChatGPT, I kept asking myself: why have superhuman chat models not led to AGI? I’ve spent the last 2 years in stealth building a new way to train models (RLCD), and a new type of frontier AI model that we are releasing today: Jev • 20-200x faster • 40-400x Show more
