Skip to main content

Scorer

Trait Scorer 

Source
pub trait Scorer: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn score(
        &self,
        cmd: &ProposedCommand,
        class: Class,
        rule: &str,
    ) -> ModelOutput;
}
Expand description

A Tier-2 scorer. Kept warm in the daemon and shared across requests.

Required Methods§

Source

fn name(&self) -> &str

A stable identifier for the backend ("heuristic", "llama:qwen2.5-3b", …).

Source

fn score(&self, cmd: &ProposedCommand, class: Class, rule: &str) -> ModelOutput

Explain and score a command. rule is the Tier-1 rule id that fired, used for a faithful summary. The score is only consulted for the ambiguous band.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§