The evidence contract is the governing constraint
AcceptedContext
A generative search system fails in three ways that a search engine cannot: it can show a passage the reader was never entitled to open, it can assert something no retrieved passage supports, and it can be instructed by the content it retrieves. All three are architectural, not behavioural, and none is fixed by prompt wording.
Decision
Three rules bind every component. One: nothing enters the context window that the caller could not open themselves, so authorisation is an input to retrieval rather than a filter on its output. Two: every sentence carries an evidence id minted by the retriever, or it is not shown. Three: retrieved content occupies a typed slot that is never read as instruction.
Considered and rejected
- Prompt-level guardrails — instruct the model to respect permissions, cite sources and ignore embedded instructionsMakes the security boundary a matter of wording, which cannot be tested, cannot be proved to an auditor, and degrades silently with every model change.
- Post-hoc filtering — generate first, then remove anything the caller should not have seenThe content has already entered the model's context; the leak has already happened, and the ranked set was computed over documents the caller cannot see.
Consequences
- +Positive the downstream CRM assistant needed no access model of its own, and any answer can be replayed and re-derived from its stored evidence ids months later.
- +Positive a poisoned document becomes a ranking problem rather than a compromise.
- −Negative claim-level binding costs about 180 ms and 0.0009 USD per answer, and is the largest single quality expense in the design.
- −Negative the contract erodes silently — a cache key missing its ACL fingerprint breaks it with no test failing, which is why three specific assertions exist to catch exactly that.