Never the Number: Structural Abstention for AI Systems Whose Answers Are Consumed as Fact
Organizations: Allen · Apple Inc.
Abstract
Large language models have made natural language interfaces to databases (NLIDB) newly credible, but LLM text-to-SQL systems fail in a way that matters for deployment: a hallucinated column or a mis-aggregated total yields a fluent wrong answer, indistinguishable at the point of use from a right one. Where the consumer cannot inspect the generated query, as in enterprise AI deployments and operational dashboards, and increasingly where the consumer is a tool-using agent rather than a person, accuracy alone is insufficient: nothing marks which answers to distrust. This is a reliability problem before it is an accuracy problem. We propose an architectural pattern for such systems, a trusted kernel with a generative shell, resting on one invariant: a component that can fabricate may influence which question the system answers, never which value it returns. A generative shell interprets underspecified input and phrases replies; a deterministic kernel matches fully specified questions against a bounded set of answerable question shapes and compiles them to queries by deterministic execution. The two meet at a confirmation the user reads before any value is computed, and requests the kernel cannot express are declined rather than approximated. We call this structural abstention, and distinguish it from the statistical abstention of selective prediction and calibrated confidence: refusal here needs no confidence estimate, because unanswerable requests are unrepresentable. We specify the pattern implementation-independently, give a five-decision recipe and work it across three domains, extend the invariant from returned values to the actions of agentic systems, and report a two-year production case study alongside two generative alternatives, a fine-tuned parser and a tool-retrieval agent. We close against enterprise and reliability benchmarks published since.
Figures & tables
| Role | Input output | Obligation | Region |
|---|---|---|---|
| Interpreter | utterance, state updated state | Extract whatever is determinate; leave the rest unfilled. Must not invent values to fill gaps. | Shell (may be generative) |
| Elicitor | state utterance | Choose what to ask next and phrase it. May be wrong; wrongness costs a turn. | Shell (may be generative) |
| Grounder | state question, or an explicit failure | Decide whether the state denotes an answerable question. Must be total and decidable : return a question or a failure, never an approximation. | Kernel (must not be generative) |
| Compiler | question query | Map a grounded question to a query. Must be a function : same question, same query, always. | Kernel (must not be generative) |
| Decision | Retail channel analytics (this report) | Ward operations reporting | Cost-centre financial reporting |
| 1. Unit of answerability | Question templates with typed slots | Templates over a governed clinical metric set | Published metric definitions in a finance semantic layer |
| 2. Partial request | Entity vector plus value dictionary | Slot frame: ward, measure, shift window | Slot frame: entity, account, period, basis |
| 3. Compilation target | SQL over warehouse relations | Calls to a governed metrics service | Parameterized report invocation |
| 4. Confirmation surface | Restated question in sales vocabulary | Restated in clinical vocabulary, with the shift boundary made explicit | Restated with the accounting basis and period made explicit |
| 5. On refusal | Nearest answerable questions | Handoff to an on-call analyst | Pointer to the report that does cover it |
| Why the invariant matters here | A wrong figure enters a commercial decision | A wrong figure enters a staffing or safety decision | A wrong figure may enter a filing |
| Feature | Instance in this domain | Consequence for the design |
|---|---|---|
| Hierarchical entity with grain-dependent storage | A product family and the specific models within it. | The level asked about determines which physical relation can answer; the two grains are stored separately. |
| Non-disjoint classification | Membership labels on a retail store: a store may hold more than one. | A request spanning two labels has no correct aggregation. This is the consistency test of Section 3 , and Section 6.4 walks the case. |
| Structurally divergent subtypes | Tiers of intermediary between manufacturer and retailer. | The subtype named changes the query’s shape , not merely a filter value. |
| Multiple measures, unevenly available | Units sold, units in stock, projected sales, visitor counts. | Measures live in different places and some are meaningless at some time grains, so measure and grain cannot be chosen independently. |
| Organization-specific calendar | A fiscal calendar misaligned with the ordinary one, e.g. a label denoting the third week of a fiscal quarter. | Users mix fiscal, absolute, and relative dates freely, making date handling a resolution problem rather than a parsing one. |
| Kernel-first | End-to-end | Tool-using | |
|---|---|---|---|
| (this paper) | parser | agent | |
| Coverage | Pool-bounded | Broader | Broadest |
| Failure mode | Visible decline | Fluent wrong answer | Fluent wrong answer |
| Determinism | Yes | Per-checkpoint | No |
| Latency per turn | Lowest | Moderate | Highest (multi-call) |
| Arithmetic | Delegated to database | Generated | Delegated to database |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Type | Example values | Notes |
|---|---|---|
| FAMILY | product family | Top-level product axis |
| MODEL | specific model | Determines which table grain applies |
| STORECLASS | premium-tier, standard, etc. | Overlapping; see § 6.4 |
| STORE | store or reseller | Reseller tiers are stored separately |
| CITY | city name | |
| REGION | province or region |
LLM Reliability
Large language model reliability studies whether outputs remain correct, calibrated, robust, and controllable across prompts, contexts, and deployment conditions.
See all 789 papers