[Enhancement]: llm_classifier capability mode: derive capability_boundary from primary_rule instead of rejecting the verdict

Aperta
#1,334 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@fede-kamel ci sta già lavorando.

Dal 18/11/2026.

  • #1343 di @fede-kamel — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start with TaskClassifierVerdict::is_valid in crates/libsy/src/algorithms/llm_class.rs and trace how capability mode handles invalid verdicts and builds the judge JSON schema. Choose whether to derive or constrain capability_boundary, or improve the error evidence; the issue lists these alternatives but does not choose one. Done means mismatched rule and boundary labels follow the selected behavior while unknown labels, empty crux, and out-of-range p_solve remain invalid.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

TaskClassifierVerdict::is_valid (crates/libsy/src/algorithms/llm_class.rs) rejects a verdict whenever primary_rule and capability_boundary disagree (for example LIM-1 with uncertain) and the route fails open to the strong target with reason_code=invalid_verdict. The boundary is fully determined by the rule label (SUP-* → supported, UNC-* → uncertain, LIM-* → unsupported, none → unmatched), so the second field adds no information but gives the judge a second way to be wrong.

Measured through the NeMo Relay Switchyard plugin 0.3.2 against OCI Generative AI (2026-11-17), capability mode, default prompt from the OCI recipe, on an agent-style request ("list files under scripts/, then read relay/plugins.toml.in and report every route id and target"):

Judge model Verdicts rejected as invalid p50 judge latency
meta.llama-4-maverick-17b-128e-instruct-fp8 5 of 6 0.36 s
meta.llama-4-scout-17b-16e-instruct 0 of 6 in the comparison, 1 of 2 in a later captured agent run 0.5 s
openai.gpt-oss-120b 0 of 8 (mixed prompts) 2.7 s
google.gemini-2.5-flash 0 of 8 (mixed prompts) 2.4 s

Every rejected verdict routed the request to the capable model, so a judge that is "wrong" about a label (not about the task) silently turns the task route into the capable-only policy for that turn. In a routed agent run the task route ended up as expensive as passthrough to the capable model because of this.

Suggestion

One of:

  1. Make capability_boundary optional and derive it from primary_rule when absent or inconsistent, keeping invalid_verdict for an unknown rule label, an empty crux, or p_solve outside [0, 1].
  2. Keep the field but constrain it in the JSON schema sent to the judge (oneOf per rule family), so schema-following models cannot produce the mismatch.
  3. At minimum, include the rejected raw verdict (or the mismatching pair) in the switchyard.routing.error / decision evidence so operators can see which label was wrong without re-running the judge.
Environment

NeMo Relay 0.11.1 gateway + switchyard-plugin-0.3.2 (NeMo-Relay-Plugins), OCI Generative AI OpenAI-compatible endpoint, us-chicago-1. Route configuration and the measurement scripts are in the sample under review at NVIDIA/nvidia-oci-samples#19 (relay/plugins.toml.in, scripts/adk_demo.py).

Lingua principale
Rust
Stelle
3.7k
Fork
386
Merge medio
1g 16h
PR unite (30g)
113

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA-NeMo/Switchyard

Tutte le issue di NVIDIA-NeMo/Switchyard

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.