Issue
Wrong Field Types
The AI returns fields with values whose types do not match the expected schema, such as strings where numbers, booleans, arrays, objects, or enums are required.
What This Looks Like
The AI returns structured output where one or more fields are present, but the values use the wrong type. A field expected to be a number may be returned as a string, an array may be returned as a sentence, a boolean may be returned as “yes,” or an enum may be replaced with a similar freeform label.
Why It Matters
Wrong field types can pass casual human review but fail machine validation. They create problems at the boundary between natural language and structured systems, especially when the next step expects strict types for parsing, storage, automation, comparison, or execution.
Structural Signal
The field exists, but its value does not conform to the declared type contract. The issue is not missing information and not necessarily invalid JSON syntax; it is a mismatch between the expected field type and the generated value.
Common Triggers
- The schema is described in prose rather than enforced as a hard contract
- The model preserves human-readable labels instead of machine-required values
- Examples include mixed type representations
- Numeric, boolean, enum, array, or object fields are underspecified
- The AI fills unknown values with explanatory text
- The output must satisfy both user readability and strict parser requirements
When to Use This Issue
Use this Issue when fields are present but their values do not match the expected type required by the schema, validator, parser, importer, or downstream consumer.
When Not to Use This Issue
Do not use this Issue when required fields are missing, extra fields are added, or the entire response cannot be parsed. Use this Issue when the structure is present but the field types are wrong.
Category
Primary Pattern
Declared Patterns
Schema Breakage
A structural condition where an instance, graph, payload, or object violates the type, shape, or rule requirements of a declared schema.
Interface Mismatch
A structural condition where observed interface behavior, shape, or exchange differs from the declared interface contract.
Compatibility Violation
A structural condition where a graph, object, behavior, or runtime state exceeds a declared compatibility envelope without an authorized exception.
Derived Primary Lenses
Compatibility Envelope Lens
Determines whether structure fits within declared runtime, platform, version, or support constraints.
Interface Contract Lens
Compares declared interface structure to observed runtime structure to detect contract deviations.
Invariant Lens
Verifies that declared invariants are structurally enforceable and not contradicted by observed structure.
Derived Secondary Lenses
Boundary Compliance Lens
Evaluates observed structure against declared boundary posture, including allow, block, and exception rules.
Conflict Lens
Detects mutually incompatible constraints, claims, states, or declarations that cannot be simultaneously satisfied.
Normalization Lens
Transforms structurally equivalent variants into a canonical form to prevent false divergence.
Search Intents
- wrong field types
- AI output wrong JSON types
- schema expected number got string
- field type mismatch
- structured output type error
- AI returned wrong data type