An assistant over your documents needs a useful answer when the documents cannot help. In my ASP.NET Core sample, that means returning a refusal instead of asking the model to improvise. But the refusal has consequences beyond the response text: it consumes an admitted question and, when the request completes normally, becomes part of the conversation history.
My previous article explains retrieval and citation checks. Here I follow the state changes around an unsuccessful answer. The sample contains three synthetic cooking lessons, so its behavior is small enough to inspect directly.
All implementation links below point to commit 6aceda29c9e29692def36b1defaaf4d06a434975 of cited-assistant-dotnet .
Admission happens before evidence lookup
In ChefService.cs , the service reserves a question before retrieving a passage:
var access = subscriptions . TryReserveQuestion ( memberId ); if (! access . Allowed ) throw new ChefAccessException ( access .…