name: 🚀 Feature Request
about: Suggest an idea or a new capability for FireForm.
title: "[FEAT]: Add Schema Validation and Error Recovery for LLM Output"
labels: enhancement
assignees: ''
📝 Description
Currently, LLM extraction output is passed directly into the PDF filler without validation.
There is no verification that extracted fields:
- Match expected data types
- Exist in the schema
- Were actually found in the transcript
If the LLM hallucinates, returns partial data, or outputs mismatched types, the PDF may be silently corrupted or left incomplete.
💡 Rationale
FireForm is designed for real-world emergency response environments where accuracy and reliability are critical.
Without schema validation:
- Incorrect values silently propagate
- Missing fields are not surfaced to operators
- Type mismatches go unnoticed
- There is no structured error recovery
A validation layer improves reliability, transparency, and operator trust.
🛠️ Proposed Solution
Introduce a SchemaValidator class:
✅ Acceptance Criteria
📌 Additional Context
This improves robustness of the core AI → JSON → PDF pipeline and aligns with FireForm’s goal of production-grade reliability.
name: 🚀 Feature Request
about: Suggest an idea or a new capability for FireForm.
title: "[FEAT]: Add Schema Validation and Error Recovery for LLM Output"
labels: enhancement
assignees: ''
📝 Description
Currently, LLM extraction output is passed directly into the PDF filler without validation.
There is no verification that extracted fields:
If the LLM hallucinates, returns partial data, or outputs mismatched types, the PDF may be silently corrupted or left incomplete.
💡 Rationale
FireForm is designed for real-world emergency response environments where accuracy and reliability are critical.
Without schema validation:
A validation layer improves reliability, transparency, and operator trust.
🛠️ Proposed Solution
Introduce a
SchemaValidatorclass:Validate extracted data against template schema
Attempt type coercion where possible (
"2"→int)Classify field confidence:
HIGHLOWMISSINGProduce a structured
ValidationReportSurface warnings without crashing the pipeline
Return validated clean data for PDF filling
Logic change in
src/New validation module (
src/validator.py)Integrate into
file_manipulator.pyUnit tests for validation edge cases
✅ Acceptance Criteria
null,"", and"-1"treated asMISSINGLOWvalidated_data📌 Additional Context
This improves robustness of the core AI → JSON → PDF pipeline and aligns with FireForm’s goal of production-grade reliability.