Skip to main content
Knowledge Engine · Layer 01

Confidence Scoring

Every query result carries a deterministic confidence score. Base 100, with ten specific deduction rules. No silent aggregation — every penalty appears individually in penalties[].

Design rule

Below confidence 60, suggested_next only recommends human actions — never automated steps. Below 20, the system refuses to proceed entirely.


Penalty Matrix​

ConditionDeductionRationale
LSP unavailable for queried language−25Symbol resolution unreliable
Index 1+ commits behind HEAD−20Structural data may be stale
Unresolved cross-layer conflict−20Two sources disagree on verifiable facts
Recursive CTE hit hub_node cap−15Blast radius truncated
Summary-only evidence (no structural backing)−15Evidence is lossy, not authoritative
ctags fallback active−10Reduced parsing precision
Vector dormant but NEEDS_EXPLORE triggered−10Semantic search unavailable
Graph truncated at depth limit−10Deeper dependencies unexplored
Dirty working tree−10Index reflects last commit, not current edits
Tier 3/4 degradation−30Multiple sources materially degraded

score = 100 − sum(deductions)


Confidence Labels​

80–100
HIGH

May suggest automated next step.

60–79
MEDIUM

Suggest narrower query or reindex.

40–59
LOW

Suggest human verification only.

ScoreLabelBehavior
80–100HighMay suggest automated next step
60–79MediumSuggest narrower query or reindex
40–59LowHuman verification only
20–39UnreliableSuggest stopping automated work
0–19Insufficient evidenceCannot answer. Manual investigation required
N/AUnknownCannot classify this query. Please rephrase

Governance Rules​

  • Every penalty fires individually — zero silent aggregation
  • penalties[] array contains each: {rule, deduction, detail}
  • New penalties require a 30-day trace review before being added
  • Monthly calibration via dev replay --all --since 30d tunes penalty weights