Skip to main content

Module classifier

Module classifier 

Source
Expand description

Classifiers for routing decisions.

Two-stage pipeline:

  1. Heuristic — fast, no LLM call, based on language-agnostic structural signals.
  2. LLM (optional) — refines ambiguous cases by asking a small model.

The heuristic stage uses only quantitative/structural signals: message length, line count, code blocks, file paths, symbol density, question form, context tokens, turn count. No keyword matching.

The LLM stage is only activated when classifier_model is configured and the heuristic score falls in the ambiguous zone (0.25–0.75).

Structs§

ClassifierInput
Input for the classifier — metadata about the current request.
HeuristicClassifier
Fast classifier based entirely on language-agnostic structural signals.
LlmClassifier
LLM-based classifier for refining ambiguous heuristic scores.