Model and Tool API Contracts
Keep the zero; expose the missing measurement
The old shortcut sees four false-looking inputs
A truthiness shortcut made a valid zero disappear.
BOTIE
The inputs we are comparing
Sensor request records
Number and omitted field
- temperature
- 8
- temperature
- Not provided
| temperature |
|---|
| 8 |
| Not provided |
Zero, null and text arrive
- temperature
- 0
- temperature
- null
- temperature
- "0"
- temperature
- Not provided
| temperature |
|---|
| 0 |
| null |
| "0" |
| Not provided |
Optional numerical field name
Same in both cases
temperature
Declared default
Same in both cases
5
Result for number and omitted field
[
[
"keep",
"default"
],
[
8,
5
]
]A Boolean reaches the vibration field
This check uses the pieces from “Inspect what the caller supplied”.
BOTIE
- Sensor request records
- vibration
- false
- vibration
- -2
- vibration
- Not provided
vibration false -2 Not provided - Optional numerical field name
vibration
- Declared default
1.5
Use a number, text, or an array matching the requested result. A named result uses field names, such as {"count": 2}. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
What would change if the model had been trained with a distinct missing-value indicator?
Write the missing/null policy beside the fitted model, rather than inferring it from truthiness.
Rejected null entries are diagnostic placeholders and must stay out of the model input. A deployed service also needs request-size limits and enforcement on the server.