This is an answer to tech001's modification of the problem (see comments under Snookie's answer). That is, for each index $i\in\{1,2,\ldots,N\}$, Bob can ask Alice about it at most thrice. Snookie's answer gives an indication how to reduce $N$ to $N-4$. If $4$ divides $N$, then we are done. Therefore, it suffices to prove that the task can be done for $N=5$, $N=6$, and $N=7$.
For $N=5$, Bob asks about the following triples $(i,j,k)$:
- $(1,2,3)$ for which Alice returns $b_1$,
- $(1,3,4)$ for which Alice returns $b_2$,
- $(1,4,5)$ for which Alice returns $b_3$,
- $(2,3,5)$ for which Alice returns $b_4$, and
- $(2,4,5)$ for which Alice returns $b_5$.
Then,
$$a_1=b_2\oplus b_4\oplus b_5\,,$$
$$a_2=b_2\oplus b_3\oplus b_4\,,$$
$$a_3=b_1\oplus b_3\oplus b_5\,,$$
$$a_4=b_1\oplus b_3\oplus b_4\,,$$
and
$$a_5=b_1\oplus b_2\oplus b_5\,.$$
For $N=6$, Bob asks about the following triples $(i,j,k)$:
- $(1,2,3)$ for which Alice returns $b_1$,
- $(1,4,5)$ for which Alice returns $b_2$,
- $(1,4,6)$ for which Alice returns $b_3$,
- $(2,3,4)$ for which Alice returns $b_4$,
- $(2,5,6)$ for which Alice returns $b_5$, and
- $(3,5,6)$ for which Alice returns $b_6$.
Then,
$$a_1=b_1\oplus b_5\oplus b_6\,,$$
$$a_2=b_2\oplus b_3\oplus b_5\,,$$
$$a_3=b_2\oplus b_3\oplus b_6\,,$$
$$a_4=b_4\oplus b_5\oplus b_6\,,$$
$$a_5=b_1\oplus b_2\oplus b_4\,,$$
and
$$a_6=b_1\oplus b_3\oplus b_4\,.$$
For $N=7$, Bob asks about the following triples $(i,j,k)$:
- $(1,3,5)$ for which Alice returns $b_1$,
- $(1,3,6)$ for which Alice returns $b_2$,
- $(1,4,6)$ for which Alice returns $b_3$,
- $(2,4,6)$ for which Alice returns $b_4$,
- $(2,4,7)$ for which Alice returns $b_5$,
- $(2,5,7)$ for which Alice returns $b_6$, and
- $(3,5,7)$ for which Alice returns $b_7$.
Then,
$$a_1=b_1\oplus b_2 \oplus b_3 \oplus b_5\oplus b_6\,,$$
$$a_2=b_1\oplus b_2 \oplus b_4 \oplus b_5\oplus b_6\,,$$
$$a_3=b_1\oplus b_2 \oplus b_4\oplus b_5\oplus b_7\,,$$
$$a_4=b_1\oplus b_3\oplus b_4\oplus b_5\oplus b_7\,,$$
$$a_5=b_1\oplus b_3\oplus b_4 \oplus b_6 \oplus b_7\,,$$
$$a_6=b_2\oplus b_3\oplus b_4 \oplus b_6 \oplus b_7\,,$$
and
$$a_7=b_2\oplus b_3\oplus b_5\oplus b_6\oplus b_7\,.$$
The case $N=7$ is extracted from Federico's answer here.