MVP Router β RoBERTa (Text-Only)
A high-precision text routing model built on RoBERTa for Q/A applications.
This model classifies a userβs question into a single routing label based only on the text, and supports abstention (NEEDS_CLARIFICATION) when confidence is below a learned threshold.
π― Purpose
This model is not a chatbot.
It is designed to act as a router that determines where a question should go inside an application, especially when different user roles exist.
Incorrect routing β particularly for Admin or Parent queries β is treated as a failure case.
π·οΈ Labels
The model predicts exactly one of the following:
| Label | Description |
|---|---|
| CIC | Internal organization member (check-ins, meetings, processes) |
| Admin | Organization controller (permissions, audits, data correction) |
| Request | End-user feature requests (recaps, MVT points, stories, coaching) |
| Parent | Guardian asking about a childβs activity |
| Other | Out-of-scope or unrelated questions |
π§ Key Features
- Text-only inference (no metadata, headers, or auth context)
- Calibrated probabilities (temperature scaling)
- Per-label confidence thresholds
- Abstention support
β returnsNEEDS_CLARIFICATIONwhen confidence is too low - Safety-first routing (Admin & Parent precision prioritized)
π¦ Files in This Repo
| File | Purpose |
|---|---|
pytorch_model.bin / model.safetensors |
Trained RoBERTa weights |
config.json |
Model configuration |
tokenizer.json / vocab files |
Tokenizer |
thresholds.json |
Learned confidence thresholds per label |
label_map.json (if present) |
Explicit label β id mapping |
README.md |
This file |
π Quick Inference Example
import json
import torch
import torch.nn.functional as F
from transformers import AutoTokenizer, AutoModelForSequenceClassification
MODEL_ID = "ethnmcl/mvp-router-roberta"
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForSequenceClassification.from_pretrained(MODEL_ID).to(DEVICE)
model.eval()
with open("thresholds.json", "r") as f:
thresholds = json.load(f)
id2label = model.config.id2label
def route(text: str):
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True).to(DEVICE)
with torch.no_grad():
logits = model(**inputs).logits
probs = F.softmax(logits, dim=-1).squeeze()
pred_id = int(torch.argmax(probs))
pred_label = id2label[pred_id]
confidence = float(probs[pred_id])
if confidence < thresholds[pred_label]:
return "NEEDS_CLARIFICATION", confidence
return pred_label, confidence
print(route("Show me my MVT points from yesterday."))
- Downloads last month
- 18