Skip to main content

Module intent_classifier

Module intent_classifier 

Source
Expand description

§Intent Classifier

Rule-based classifier that infers the user’s intent from prompt text. Produces an IntentCategory variant and optional confidence scores.

§Quick Start

use tokio_prompt_orchestrator::intent_classifier::{IntentClassifier, IntentCategory};

let classifier = IntentClassifier::new();
let category = classifier.classify("How do I implement a binary search in Rust?");
assert_eq!(category, IntentCategory::CodeRequest);

Structs§

IntentClassifier
Rule-based intent classifier.
IntentFeatures
Lightweight surface-level features extracted from a prompt.

Enums§

IntentCategory
The inferred category of a user’s prompt.