feat: add validation and review pipeline for extraction workflow#417
Open
Arijit429 wants to merge 7 commits intofireform-core:mainfrom
Open
feat: add validation and review pipeline for extraction workflow#417Arijit429 wants to merge 7 commits intofireform-core:mainfrom
Arijit429 wants to merge 7 commits intofireform-core:mainfrom
Conversation
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.
🚀 Summary
This PR strengthens FireForm’s extraction workflow by introducing a dedicated validation and review pipeline for AI-generated structured outputs. The goal of this change is to improve extraction reliability, enable safer human-in-the-loop verification, and move the system closer to a production-ready workflow.
✨ What Changed
Added a dedicated validator module
Created a new utility file:
This introduces the
ExtractionValidatorclass responsible for:Integrated validation into extraction workflow
Updated:
The extraction flow now includes a dedicated validation stage before PDF filling.
Updated flow
📌 Before
Previously, extracted data was passed directly into the PDF generation workflow after structured extraction / fallback.
This could allow:
to move forward without sufficient validation.
✅ After
With this PR, every extracted output now passes through a validation pipeline that:
This improves both reliability and safety of the generated reports.
🎯 Impact
🧪 Testing
Tested locally using FastAPI Swagger routes.
Verified:
requires_reviewgeneration🔮 Future Scope
This validation layer also creates a strong foundation for future improvements such as: