Issue
Nested Fields Do Not Match
The AI returns nested structured fields whose internal shape, hierarchy, parent-child relationship, or contained values do not match the expected structure.
What This Looks Like
The AI returns structured output where top-level fields may look correct, but nested objects, arrays, child fields, or grouped values do not match the expected structure. A nested field may be placed under the wrong parent, contain the wrong child shape, mix incompatible items, or flatten structure that should remain hierarchical.
Why It Matters
Nested structure often carries meaning that flat fields cannot preserve. If nested fields do not match, downstream systems may parse the output but interpret it incorrectly. Reviewers may also miss the problem because the visible field names appear correct while the internal structure is wrong.
Structural Signal
The output satisfies part of the declared structure but breaks the internal relationship between parent fields, child fields, arrays, objects, or grouped values. The issue is not just that one value is wrong; it is that the nested structure does not preserve the expected shape.
Common Triggers
- The prompt describes field names but not their parent-child relationships
- The model flattens nested structure for readability
- Arrays and objects are mixed under the same field
- Example outputs show incomplete nesting
- The schema has repeated field names at different depths
- The AI preserves labels but not the structural hierarchy
When to Use This Issue
Use this Issue when the output includes nested structured data, but the internal hierarchy, child fields, grouping, or nested shape does not match the expected schema or consumer requirement.
When Not to Use This Issue
Do not use this Issue when the entire JSON is invalid, when required fields are missing, or when a single flat field has the wrong type. Use this Issue when the problem is specifically inside nested structure.
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.
Invariant Breakage
A structural condition where an observed state violates a declared invariant that is supposed to remain true.
Derived Primary Lenses
Conflict Lens
Detects mutually incompatible constraints, claims, states, or declarations that cannot be simultaneously satisfied.
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
Search Intents
- nested fields do not match
- AI output nested fields wrong
- JSON nested object wrong shape
- nested schema mismatch
- AI returned wrong nested structure
- child fields do not match parent field