Nice question! I had always thought that one would use "which" if one were listing items from a list, including a phrase which would if expanded become a list, and use "what" for that not in a list, or expandable as such. My examples:
- The tour guide let us know which items we were permitted to bring on the trip.
- Wisdom dictates which actions to take and which to avoid.
- The tour guide let us know what to expect on the trip.
- The police officer told me what to do.
I may be completely off, it wouldn't be the first time, but it seems right to me.