Example Output
Start with schema validation in application code. Your input format and rules are explicit, and feature must work offline. A model adds little value to this validation step.
Conventional code
A schema validator
Define expected fields, types and bounds once. Validate each record locally and return structured errors that identify invalid fields.
- You maintain schema as your format evolves.
- Deterministic validation still requires tests for missing fields, invalid types and boundary values.
Generative model
Model-based interpretation
Consider this only if scope changes to interpreting messy, unstructured records before validation. Keep deterministic validation after any interpretation.
- Probabilistic interpretation cannot replace exact validation requirement.
- A hosted model would conflict with offline requirement.
Requirements check
The validator runs inside application without a model API call.
Types and required fields can be expressed in a schema and verified with tests.
Assumptions
- The input is JSON rather than scanned documents or natural-language notes.
- Validation rules are known and can be written down.
What would change advice?
- If inputs become unstructured, assess a separate extraction step.
- If schema becomes uncertain, clarify accepted format before implementing validation.
A SMALL VALIDATION EXPERIMENT
Check that local schema validation accepts and rejects intended inputs.
Steps
- Write a minimal schema for one record.
- Validate representative valid records and intentionally malformed records.
- Measure end-to-end validation time on a realistic import size.
Cases to test
- A valid record and a record with a missing required field.
- A string where an integer is required, plus minimum and maximum boundary values.
- Unexpected fields, empty imports and malformed JSON.
Success criteria
- All reviewed fixtures produce expected validation result and field-level errors.
- Validation runs offline and meets latency target you establish for realistic import sizes.
Guides and catalog matches
Model API fee calculator
Enter your own workload assumptions and published rates. No model-generated prices are used. For hybrid systems, enter number of calls that actually reach a model.