📝 Description
Add a confidence score for each field extracted by the LLM.
Instead of returning only the value, the model should return both:
- The extracted value
- A confidence score (0 to 1)
Example output:
{
"employee_name": {
"value": "John Doe",
"confidence": 0.92
}
}
💡 Rationale
Currently, FireForm blindly trusts the LLM output.
Adding a confidence score will:
- Help detect uncertain extractions
- Enable human review workflows
- Improve reliability for real-world use
- Make debugging easier
This is especially useful for ambiguous or incomplete transcripts.
🛠️ Proposed Solution
✅ Acceptance Criteria
📌 Additional Context
This enhancement improves reliability and prepares FireForm for future UI or review-based workflows.
📝 Description
Add a confidence score for each field extracted by the LLM.
Instead of returning only the value, the model should return both:
Example output:
{ "employee_name": { "value": "John Doe", "confidence": 0.92 } }💡 Rationale
Currently, FireForm blindly trusts the LLM output.
Adding a confidence score will:
This is especially useful for ambiguous or incomplete transcripts.
🛠️ Proposed Solution
Update the LLM prompt to request confidence scores.
Parse and validate the extended JSON structure.
Modify PDF filling logic to use the
"value"key.Optionally log low-confidence fields.
Logic change in
src/Update to
requirements.txtNew prompt for Mistral/Ollama
✅ Acceptance Criteria
📌 Additional Context
This enhancement improves reliability and prepares FireForm for future UI or review-based workflows.