feat: add weighted confidence scoring for extraction validation#424
Open
Arijit429 wants to merge 9 commits intofireform-core:mainfrom
Open
feat: add weighted confidence scoring for extraction validation#424Arijit429 wants to merge 9 commits intofireform-core:mainfrom
Arijit429 wants to merge 9 commits intofireform-core:mainfrom
Conversation
Author
|
Hi maintainers, this update improves the review workflow by making confidence scoring field-aware and more aligned with real extraction importance—happy to refine the weighting logic based on project needs. |
This was referenced Apr 17, 2026
cf4ec51 to
ab7f503
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #60
Closes #450
🚀 Summary
This PR enhances the extraction validation workflow by introducing field-level weighted confidence scoring instead of using a flat deduction model.
The goal is to make confidence evaluation more representative of real-world data importance and improve the reliability of the
requires_reviewdecision.✨ What Changed
Updated the
ExtractionValidatorlogic to use weighted importance for each field:Each missing field now reduces confidence based on its relative importance instead of applying a uniform deduction.
💡 Why This Helps
In the previous approach, all missing fields contributed equally to confidence reduction.
This could under-represent critical missing information.
For example:
locationshould have higher impactseverityshould strongly affect review decisiondescriptionmay be comparatively less criticalThe new weighted model makes confidence scoring more realistic and production-aligned.
🔍 Example
Previous behavior
New behavior
This allows the validator to make smarter review decisions.
🧪 Testing
Added dedicated unit test coverage for weighted confidence scoring.
Validated scenarios include:
Executed locally using:
and verified successful execution.
🎯 Impact
This improves: