Skip to main content

Module classifier

Module classifier 

Source
Expand description

question-classifier node: routes to the branch of the class chosen by a model.

The selected class id is the branch handle. Outputs: class_id, class_name, class_label, usage. An answer that names no configured class fails the node, unless fallback_class names the class to use; a fallback is marked with metadata fallback: true and raw_answer.

With model.provider: typesafe (or engine: typesafe) the node asks TypeSafe’s System One API one choice question instead of prompting a chat model. That path adds the probabilities (class id -> probability) and confidence outputs and honours min_confidence, min_probability and the optional companion_noul check; a decision below a threshold routes to fallback_class, or fails with the non-retryable low_confidence error.

Structs§

ClassConfig
One class.
ClassifierConfig
Configuration of the question-classifier node.
ClassifierNode
The question-classifier node.

Functions§

factory
Factory for the node registry.