the flagging threshold in [0, 1]. Defaults to DecisionReasoningProvider.DEFAULT_UNCERTAIN_ABOVE.
ReadonlyUncertainA candidate at or above this probability is Uncertain (flagged for a person); below it, NotDuplicate.
Static ReadonlyDEFAULT_The seeded decision prompt whose model bindings choose the decision model.
Static ReadonlyDEFAULT_The flagging threshold used when none is passed, as it is when the class factory builds the provider, on calibrated probabilities. A flag asks a person to look, so it favours precision: a missed duplicate is only today's behaviour, and needless flags teach people to ignore them. At a calibrated 0.7, scored out of fold, Jev flagged the true source at 96.6% precision, caught 70% of duplicates, and flagged 2.5% of new records; LLM Decision scored 74%, 36% and 12.5%. The vector threshold alone flagged every candidate. (Duplicate-check measurement, plan Task 3.8, 2026-09-29, re-scored 2026-09-30.)
Static ReadonlyPRE_The threshold for the decision stage of DecisionThenPrompt, on calibrated probabilities. There
the decision only drops implausible candidates before the prompt reasons over the rest, so it
keeps recall: at a calibrated 0.3, scored out of fold, Jev kept 98.8% of true duplicates and passed
14.8% of candidates.
Band one candidate's probability into Uncertain or NotDuplicate, carrying the probability as its confidence.
ProtectedBuildProtectedBuildThe decision's state: the fields the prompt provider renders, from the same helper (DuplicateReasoningProvider.buildPromptData), serialized as compact JSON.
ProtectedbuildBuilds the Nunjucks/template data context for the shared "Duplicate Resolution" instruction set. Both providers feed the prompt the exact same shape, so this lives on the base class. Keys match the seeded template's variable names verbatim.
ProtectedBuildThe statement the model judges for one candidate. It names both records by label and record id, because the model reads only the instructions and the state, and duplicates often share a label.
ProtectedBuildOne Likelihood per candidate, keyed by QuestionKey.
ProtectedCalibrationThe calibration for the exact model that answered (the MJ decision model and the model the driver reports behind it), or null when it has none. Defaults to DUPLICATE_DECISION_CALIBRATION; override to calibrate another model.
ProtectedcoerceCoerces a JSON string or object into a plain record, else null.
Run the decision for a matched set: one AIDecisionRunner call, with one Likelihood per
candidate. The context's CancellationToken and TimeoutMS, when set, bound the model call.
Never throws. A set with no candidates succeeds without a call.
ProtectedderiveDerive the set-level verdict from the per-candidate verdicts: Merge if any candidate is a Merge, else Uncertain if any is Uncertain, else NotDuplicate. Overall confidence is the max confidence among the candidates matching the winning recommendation (null if none reported).
ProtecteddisplayRender a field value for the prompt: the trimmed value, or '(empty)' for null/blank.
ProtectedfailedBuilds a failed reasoning output (logged, never thrown).
Whether a candidate stays in play: its probability is at or above UncertainAbove, or unknown. An unknown probability fails toward inclusion.
ProtectednormalizeNormalize the per-candidate verdicts array, dropping malformed entries. Each must carry a non-empty record id; recommendation/confidence are clamped, reasoning defaults to ''.
ProtectednormalizeClamps confidence into [0,1], returning null when absent/invalid. null (not 0) so a
missing confidence isn't mistaken for "confidently NOT a duplicate" downstream.
ProtectednormalizeNormalizes the fieldChoices array, dropping malformed entries.
ProtectednormalizeClamps the recommendation to the allowed union, defaulting to 'Uncertain'.
ProtectednormalizeReturns the survivor id string, or null when absent/empty.
ProtectedparseParses a provider's raw structured output (the {recommendation, confidence, ...}
object) into a normalized DuplicateReasoningOutput. Tolerant of either an
already-parsed object or a JSON string. Returns a failed output on any parse error.
ProtectedQuestionThe question key for the candidate at index. A label for code only: the model never reads it.
Reason over a matched set with one decision call. A failed call returns Success: false with
the error and the decision's run id, and no verdicts: the detector writes no LLM columns for a
failed set, so no candidate is marked NotDuplicate and none is merged.
Turn a successful decision into the reasoning contract. Recommends only: no Merge, no
survivor and no field choices.
ProtectedResolveResolve the decision prompt by name from the AIEngine cache (no DB query).
Typed-decision reasoning provider. Registered under the 'Decision'
ReasoningMode.