Interface ClassificationResult

Result of classifying a user query into a complexity tier. Produced by the QueryClassifier.

interface ClassificationResult {
    tier: QueryTier;
    strategy: RetrievalStrategy;
    confidence: number;
    reasoning: string;
    internalKnowledgeSufficient: boolean;
    suggestedSources: ("vector" | "graph" | "research")[];
    toolsNeeded: string[];
}

Properties

tier: QueryTier

The assigned complexity tier.

See

QueryTier

strategy: RetrievalStrategy

Retrieval strategy recommendation from the LLM-as-judge classifier.

When the classifier operates in strategy-aware mode, this field is populated directly from the LLM's structured output. When the classifier runs in legacy tier-only mode, the strategy is inferred from the tier via TIER_TO_STRATEGY.

See

RetrievalStrategy

confidence: number

Confidence score for the classification (0 to 1). A score below the configured threshold may trigger fallback behaviour.

reasoning: string

Human-readable reasoning explaining why this tier was chosen. Useful for debugging and audit trails.

internalKnowledgeSufficient: boolean

Whether the agent's internal knowledge is likely sufficient to answer without any retrieval. When true and tier is 0, the router may skip retrieval entirely.

suggestedSources: ("vector" | "graph" | "research")[]

Suggested source types to consult for this query.

Example

['vector', 'graph']
toolsNeeded: string[]

Tool names the classifier believes are needed to answer this query. Empty array if no tools are required.