#1669·xberg

bug: quality_score stays 1.0 on OCR runs with low aggregate confidence and hundreds of noise warnings

Author: tobocop2Created Sep 18, 2026Updated Sep 19, 2026
LabelsbugP0

Description

quality_score is 1.0 on every run, including OCR runs whose extraction_confidence.ocr_aggregate is 0.81 to 0.93 and which carry 44 to 175 OCR noise warnings ("produced suspected OCR recognition noise", "removed N OCR line(s)"). The score does not move with OCR confidence or with the number of pages the engine itself flags as noisy, so a caller cannot use it to decide whether the text needs review.

Expected: quality_score falls when the OCR aggregate confidence falls and when the engine drops or flags lines. The value 1.0 must be reserved for output the engine has no reason to doubt.

Steps to reproduce

  1. Extract a long PDF with mixed native and scanned pages with force_ocr = true and the tesseract backend.
  2. Read quality_score (1.0), extraction_confidence.ocr_aggregate (about 0.8) and count processing_warnings with source ocr or tesseract (more than 100).

Relevant files and configuration

xberg v1.2.4 through the Pro HTTP API, release build, 2026-09-18. Nine runs over three PDFs, every one with quality_score = 1.0, three of them with ocr_aggregate 0.88, 0.81 and 0.88.