Confidence scores
Every value Knowtation proposes (a unit, a role, a description…) gets a confidence between 0 and 1, computed by a confidence policy: versioned parameters you can change, re-run and compare. Each run records the policy id, version and hash.
The default policy is packages/core/src/knowtation_core/builtin/policies/default.yaml. Scoring is one function, knowtation_core.confidence.score(proposals, policy).
How a score is computed
Proposals are grouped by target and property, for example the unit of discharge_m3s. Within a group:
- Each source gives a score.
- A rule gives its own weight, or
rules.default_weightif it has none. - The LLM gives the confidence it reports, capped at
llm.capand multiplied byllm.weightfor its model (ordefault). - Recognisers (GTFS, labels and attributes stored in files, documentation files such as CITATION.cff and READMEs) and the profiler give the score they were created with.
- Sources agreeing on the same value combine. With
combine: noisy_or, scores s₁…sₙ give 1 − ∏(1 − sᵢ): a rule at 0.6 and an LLM at 0.3 give 0.72. Withcombine: max, the highest single score wins. - Rival values reduce each other. Each value is multiplied by (1 −
conflict_penalty× the strongest rival's combined score). - Overrides change any parameter for one property, for example
unit: {llm.cap: 0.8}.
The highest-confidence value in each group is chosen. Ties go to the more deterministic source (human, then recogniser, rule, profiler, LLM), then alphabetically, so results are reproducible.
Built-in policies
| Policy | Use |
|---|---|
default |
The starting policy |
lookups |
default, with links to lookup tables (references) and their code lists capped at 0.95 (rules.cap) and less penalised by rival values (conflict_penalty: 0.2). Choose it on Advanced and compare the two runs on Runs & versions |
Bands
| Band | Confidence | Dashboard colour |
|---|---|---|
| High | ≥ bands.high (0.8) |
green |
| Medium | ≥ bands.medium (0.5) |
amber |
| Low | below that | red |
A dictionary version shows the bands of the policy its run used; versions made without a run use default.
Review
A value a reviewer accepts or edits is marked human-verified. That is shown next to the score, not folded into it, so you can always see what the machine thought.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
llm.cap |
0.9 | Highest score an LLM can contribute |
llm.weight.<model> |
default: 1.0 |
Multiplier per model, for example ollama:llama3.2: 0.7 |
rules.default_weight |
0.6 | Weight for rules that don't set one |
combine |
noisy_or |
How agreeing sources combine: noisy_or or max |
conflict_penalty |
0.5 | How strongly rival values reduce each other (0 turns it off) |
overrides.<property>.<parameter> |
unit: {llm.cap: 0.8} |
Any parameter, for one property |
overrides.<property>.rules.cap |
none (1.0) | Highest score a rule can contribute for that property; only as an override |
bands.high, bands.medium |
0.8, 0.5 | Band thresholds |
How this relates to other methods
Rules vote like labelling functions in weak supervision; the policy is a weighted vote. See rules-and-labelling.md for what that means, how conflicts are reported, and the alternatives.
Later: calibration
The scores aren't calibrated yet. Once benchmark data dictionaries exist for enough datasets, we will check whether values scored 0.8 are right about 80 % of the time, and tune the parameters.