Files
agent_jrxml/prompts
panda 2d5183d2bd fix: OCR fidelity scoring reform — prevent false fail from language-mismatched field names
Root cause (from review): field_coverage compared English JRXML field names
against Chinese OCR field names with set intersection — always zero. Combined
with 0.5 weight in score formula, caused valid JRXML (XSD pass, 82% element
coverage) to score 0.41 < 0.5 → fail → correction loop → progressive destruction.

Changes:
- Scoring weight: element_coverage 0.8 + field_coverage 0.2 (was 0.5+0.5)
- Validate node: only fail on fidelity when BOTH score<0.5 AND element_coverage<0.4
- Field name regex: \w+ → [^"]+ to support non-ASCII field names
- Field matching: also try _sanitize_field_name conversion (Chinese→_uXXXX_)
- correction.md: namespace check always active, not conditional on error keywords
2026-05-24 15:36:40 +08:00
..