Skip to content

feat(core): structured intent classification via Extractor #550

@bug-ops

Description

@bug-ops

Problem

Skill matching currently uses embedding similarity + text heuristics to classify user intent. When multiple skills have close similarity scores, the choice can be unreliable.

Solution

Use Extractor<T> with a typed IntentClassification struct to get deterministic skill selection from the LLM:

#[derive(Deserialize, JsonSchema)]
struct IntentClassification {
    skill_name: String,
    confidence: f32,
    params: HashMap<String, String>,
}

When embedding similarity is ambiguous (top-2 delta < threshold), fall back to Extractor for disambiguation. This adds an LLM call only when needed.

Acceptance criteria

  • IntentClassification struct with JsonSchema derive
  • Integration point in skill matcher when top candidates are close
  • Unit test with MockProvider verifying disambiguation
  • No regression in existing skill matching tests

Part of Epic #549

Metadata

Metadata

Assignees

No one assigned

    Labels

    M28Milestone 28: VectorStore AbstractioncorellmLLM provider related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions