# How to formally define what a reading comprehension question answering problem is?

I'm trying to formally define what Intelligent Agents with Reading Comprehension Question Answering agents are in mathematical terms for a dissertation.

To my mind we can say we have on the one hand $P=\{p_1,...,p_i\}\neq\varnothing$ a set of paragraphs, $Q=\{q_{1i},...,q_{ij}\}\neq\varnothing$ a set of questions on these paragraphs and $R=\{r_{111},...,r_{ijk}\}$ the related possible answers. We try to find these answers of these paragraphs. Which are span of the sentences of these paragraphs when there is an answer or to show that there is no answers where it's unanswerable.

That is to say for every question $q_{ij}$ and every related paragraph, we predict an answer $\hat r_{ij}$ such that $$\forall q_{ij}\in Q , \hat r_{ij}= f(p_i,q_{ij}) = \begin{cases} r_{ijk},& \text{if } \exists r_{ijk}\in R\\ \emptyset, & \text{otherwise} \end{cases}$$

This Machine Learning problem has examples here with Stanford Question and Answer Dataset (SQuAD) and an attempt here by Facebook.