Confidence routing

lexConfidence is a lexical signal on the hits Knolo already returned. What you do with the number is application policy.

Examplets
import { query, lexConfidence, makeContextPatch } from '@knolo/core';

const hits = query(pack, question, { topK: 12 });
if (!hits.length) return 'No grounded evidence was found.';
const confidence = lexConfidence(hits);
if (confidence >= 0.72) {
  const context = makeContextPatch(hits, { budget: 'mini' });
  return smallAnswerModel.answer({ question, context });
}
return answerWithRetrievalGate(pack, question, selectorModel, largeAnswerModel);

0.72 is an illustrative application policy, not a universal constant. Calibrate thresholds on your corpus.

ConditionSuggested route
No hitsAbstain or ask for clarification
Strong lexical confidenceSmall answer model
Moderate confidenceSmall-model evidence selector
Low confidence with semantic dataOptional semantic rerank
Evidence still insufficientAbstain or escalate to human review

The selector and the answer model in that table are host adapters. Knolo does not choose them.