A required field makes the model invent values when documents lack them. What is the fix?
Why B is the answer
Make the field nullable, and tell the model to use null when it is absent
A required field forces an answer. A nullable field gives the model an honest way to say the value is not there.
In detail
- A required field demands a value, so the model may supply one even when none exists.
- A nullable field gives it an honest way to report that the value is absent.
- Review which required fields can truly be missing in real documents.
Use case
An illustrative scenario, not a real incident.
A contract tool requires renewal_date, but many contracts have none, so the model guesses a date. Making it nullable, and saying to use null when absent, removes the guesses.
See it in different ways
flowchart LR
A["Model output"] --> B{"Matches schema?"}
B -->|Yes| C{"Do the values make sense?"}
C -->|Yes| D["Accept"]
C -->|No| E["Review or retry"]stateDiagram-v2 state "Read document" as s0 state "Value found" as s1 state "Return null" as s2 state "Return the value" as s3 [*] --> s0 s0 --> s1: present s0 --> s2: absent s1 --> s3 s2 --> [*] s3 --> [*]
Key point: A required field forces an answer, so allow null.
Why the other options are wrong
- A. Remove the schema, and let the model decide which of the fields to return
- Removing the schema loses the structure that the downstream system depends on.
- C. Add a rule in capital letters telling the model never to invent any value
- The schema still demands a value, so the pressure to invent one remains.
- D. Run the extraction twice and keep the output that looks more complete
- A more complete answer may simply contain more invented values.

