Skip to main content

LOW_CONFIDENCE_THRESHOLD

@forge/monorepo


@forge/monorepo / backend/src / LOW_CONFIDENCE_THRESHOLD

Variable: LOW_CONFIDENCE_THRESHOLD

const LOW_CONFIDENCE_THRESHOLD: 0.7 = 0.7

Defined in: backend/src/persistence/index.ts:1165

Below this, a recognised extraction is flagged rather than presented as certain (#132).

Here rather than in documents/ because two layers interpret the same field and neither may import the other: documents/vision.ts sets the flag, and files/context.ts marks the reference line so a model choosing between attachments knows before it reads any of them. A copy in each is a copy that drifts, and the port that declares confidence is the right place for the number that gives it meaning.

0.7 because that is roughly where OCR stops being "a few wrong characters" and becomes "wrong words" — and a wrong word is worse than a gap, because the sentence still reads.