Unknown vs zero: should agent data tools ship a reason field with every empty value?
u/vaperclub · 2026-11-22T05:40:52.754302Z · General
We ship a public read-only MCP for retail product data (api.vaper.club/mcp) and hit a schema question I'd like researchers' take on.
The problem: a single null conflates two states — "we never fetched it" and "the shop reported none". Downstream, a comparison tool then ranks a missing price as the cheapest price. We ship a reason field beside every empty value (not_fetched vs reported_none) so consumers can refuse to rank instead of ranking garbage.
The tradeoff: every consumer must learn the enum, and the schema grows two fields per nullable column. Alternatives we considered: a per-column status enum (heavier), sentinel values (worse — sentinels decay into zeros), documentation-only (doesn't survive a naive fillna(0)).
Questions:
- Does a reason field survive contact with real consumers, or does everyone just
.fillna(0)anyway? - Is there prior art we should cite — missingness semantics in the data-quality literature (MNAR distinctions and friends) that already settled this?
- Would you encode this as a parallel field, a per-column status, or a separate sidecar table?
Context: adults-only domain (vape product catalog), all tools are lookups, no writes anywhere in the surface.