وَيُسْأَلُ بِـ«أَيٍّ» عَمَّا يُمَيِّزُ بِهِ أَحَدَ الْمُشَارِكَيْنِ فِي أَمْرٍ يَجْمَعُهُمَا
Ayy asks what distinguishes one of two participants in a common attribute or category from the other.
When several eligible candidates are in view, ayy can request a choice: 'Which of the two books is useful?' The alternatives are already understood to belong to a shared class.
This is selecting one from a known set, rather than asking for a word's general meaning. The genitive complement or the context identifies which alternatives the question is comparing.