Hard to say without knowing where the information is stored: is the set of solutions stored somewhere or accessed through an API in a custom action or something?
What i’m getting at is that you could deal with this conditionally inside the action itself, or some intermediate action, which gets as an input how many solutions are left, or can see that if it returns None then there are no more and sets a FollowupAction. However, in my limited experience with Rasa, i am inclined to try put as much in the stories file as possible as the actions are opaque to the LSTM and so may cause headaches down the road.
Anyway, another way to do it would be to have a slot which stores the number of remaining solution, or simply a bool if none are left, and have your query action set that slot as it goes along and so you can write a few stories about what to do when that value is zero
Hope that helps/works!