Insights /
Governed retrieval comes before good answers
Access filters, approval states and abstention belong in the retrieval step, not in the prompt.
A retrieval-augmented system answers from whatever it retrieves. If retrieval can see a document, the answer can leak it, whatever the prompt says. Governance therefore starts in the index.
Filter on the server
Store who may see each document as fields in the index, and filter every query by the caller’s identity on the server. Never pass the filter in from the client, and never rely on the model to ignore what it should not have seen.
Index only what is approved
Content that is drafted, under review or withdrawn should carry a state, and queries should only match approved content. An approval step costs little and removes a whole class of wrong answers.
Let the system say “I don’t know”
When the retrieved passages do not support an answer, the right reply is to say so and point to where the user can ask. Abstention is a feature to test, with its own cases in the evaluation set.
Treat retrieved text as untrusted
Documents can contain instructions. Keep retrieved text in a clearly marked part of the prompt, never let it change tool permissions, and test with documents that try to.
Our course, Azure AI Search for Apps and Agents, builds each of these in turn on one project, from index design to agents.