22. (2006 National Team Training Test Question) Let $a_{i}, b_{i}(i=1,2, \cdots, n)$ be rational numbers, such that for any real number $x$ we have $x^{2}+x+4=\sum_{i=1}^{n}\left(a_{i} x+b_{i}\right)^{2}$. Find the minimum possible value of $n$.
22. Since
$$
x^{2}+x+4=\left(x+\frac{1}{2}\right)^{2}+\left(\frac{3}{2}\right)^{2}+1^{2}+\left(\frac{1}{2}\right)^{2}+\left(\frac{1}{2}\right)^{2} \text {, }
$$

thus $n=5$ is possible. Next, we prove that $n=4$ is not possible.
Proof by contradiction. If $n=4$, assume $x^{2}+x+4=\sum_{i=1}^{4}\left(a_{i} x+b_{i}\right)^{2}, a_{i}, b_{i} \in \mathbb{Q}$, then
$$
\begin{aligned}
\sum_{i=1}^{4} a_{i}^{2}= & 1, \sum_{i=1}^{4} a_{i} b_{i}=\frac{1}{2}, \sum_{i=1}^{4} b_{i}^{2}=4 . \\
\text { Hence } \frac{15}{4}= & \left(\sum_{i=1}^{4} a_{i}^{2}\right)\left(\sum_{i=1}^{4} b_{i}^{2}\right)-\left(\sum_{i=1}^{4} a_{i} b_{i}\right)^{2} \\
= & \left(-a_{1} b_{2}+a_{2} b_{1}-a_{3} b_{4}+a_{4} b_{3}\right)^{2}+\left(-a_{1} b_{3}+a_{3} b_{1}-a_{4} b_{2}+a_{2} b_{4}\right)^{2}+ \\
& \left(-a_{1} b_{4}+a_{4} b_{1}-a_{2} b_{3}+a_{3} b_{2}\right)^{2} .
\end{aligned}
$$

The above equation indicates that $a^{2}+b^{2}+c^{2}=15 d^{2} \equiv -d^{2}(\bmod 8)$ has a solution.
Assume without loss of generality that at least one of $a, b, c, d$ is odd, and $a^{2}, b^{2}, c^{2}, d^{2} \equiv 0,1,4(\bmod 8)$, the above equation clearly has no solution, leading to a contradiction. Therefore, $n=4$ is not possible.