Skip to main content

Appendix B โ€” AI Tuning Parameters

Complete reference for all parameters that affect AI-driven matching, enrichment, and URA generation. Parameters that default to off or to their legacy values do not change behaviour until explicitly adjusted.


Matching weightsโ€‹

Stored in the project's matcher_profile. All three must sum to 100%.

ParameterDefaultEffect when increased
Leaf weight55%More emphasis on the item's own description words
Ancestor weight25%More emphasis on the heading hierarchy
Spec weight20%More emphasis on extracted numeric specs (grades, dimensions)

Scoring flagsโ€‹

Stored in the project's matcher_profile. All default to off.

FlagDefaultWhen to enable
fold_keywords (Keyword enrichment)OFFFlat or template-derived rate tables; BOQ has grade/element in headings
overlap_leaf (Overlap scorer)OFFCombine with Keyword enrichment; when token-count asymmetry is large
reweight_thin_ancestors (Reweight flat tables)OFFFlat rate tables; safe to leave on for all table types
use_facets (Facet matching)OFFAfter sandbox validation confirms facets are populated on both sides

AI tiebreaker thresholdsโ€‹

Hard-coded. Require a code change to adjust.

ParameterDefaultCondition that fires the tiebreaker
Score gap threshold0.15Top two candidates within this gap
Confidence threshold0.55Top score below this value

Increasing the score gap makes the tiebreaker fire more often (more AI calls, more conservative). Decreasing the confidence threshold raises the bar for auto-acceptance.


Template generation thresholdsโ€‹

Stored in the settings table. Editable in Settings without a code change.

KeyDefaultTier boundary
template_match_threshold0.65Baseline vs Starting-point
template_reference_floor0.30Starting-point vs Cold
Jaccard score โ‰ฅ 0.65 โ†’ Baseline: AI adjusts quantities only
0.30 โ‰ค score < 0.65 โ†’ Starting point: AI modifies the recipe
score < 0.30 โ†’ Cold: AI generates from scratch
score = 1.0 (provenance) โ†’ Definitive: template adopted verbatim (no AI)

Coverage thresholdsโ€‹

Hard-coded. Require a code change to adjust.

SignalMethodThreshold
Cluster category name vs template nameJaccard0.45
Representative BOQ description vs template keywords + nameOverlap coefficient0.55

A cluster is covered if either signal exceeds its threshold. Raising either threshold produces more "needs template" rows (stricter coverage).


Parameter storage summaryโ€‹

ParameterLocationDefaultEdit via
Leaf / Ancestor / Spec weightsProject profile55 / 25 / 20%Matcher Weight Tuning panel
fold_keywordsProject profileOFFMatcher Weight Tuning panel
overlap_leafProject profileOFFMatcher Weight Tuning panel
reweight_thin_ancestorsProject profileOFFMatcher Weight Tuning panel
use_facetsProject profileOFFMatcher Weight Tuning panel (greyed; test in sandbox first)
Tiebreaker score gapCode0.15Code change
Tiebreaker confidenceCode0.55Code change
template_match_thresholdSettings table0.65Settings page
template_reference_floorSettings table0.30Settings page
Coverage Jaccard thresholdCode0.45Code change
Coverage overlap thresholdCode0.55Code change