Example 7 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$. (2006 National Training Team Problem)
It is easy to find that $n=5$ works. In fact, $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}$.

From this, we can conjecture that the minimum possible value of $n$ is 5, which only requires proving that $n \neq 4$.
By contradiction, assume $x^{2}+x+4=\sum_{i=1}^{4}\left(a_{i} x+b_{i}\right)^{2}, a_{i}, b_{i} \in \mathbf{Q}$, then $\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$.

Thus, $\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}$
$$\begin{aligned}
= & \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}-\right. \\
& \left.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}$$

Multiplying both sides by 4, it indicates that the equation $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 (otherwise, divide both sides by the common factor), but $a^{2}$, $b^{2}, c^{2}, d^{2} \equiv 0,1,4(\bmod 8)$, so the above equation has no solution, leading to a contradiction.

Another solution: When $n=5$, we have $x^{2}+x+4=\left(\frac{1}{2} x+1\right)^{2}+\left(\frac{1}{2} x+1\right)^{2}+\left(\frac{1}{2} x-1\right)^{2}+$ $\left(\frac{1}{2} x\right)^{2}+(1)^{2}$.

Next, we prove that $n \neq 4$.
If $x^{2}+x+4=\sum_{i=1}^{4}\left(a_{i} x+b_{i}\right)^{2}$, we can set $a_{i}=\frac{x_{i}}{2 m}, b_{i}=\frac{y_{i}}{k}(m k \neq 0, m$ and $\left.k, x_{i}, y_{i} \in \mathbf{Z}\right)$, then comparing coefficients yields $\left\{\begin{array}{l}x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}=4 m^{2}, \\ y_{1}^{2}+y_{2}^{2}+y_{3}^{2}+y_{4}^{2}=4 n^{2}, \\ x_{1} y_{1}+x_{2} y_{2}+x_{3} y_{3}+x_{4} y_{4}=m n .\end{array}\right.$

Assume without loss of generality that $\left(m, k, x_{i}, y_{i}\right)$ is the smallest set satisfying (1), (2), and (3) with $|m k| \neq 0$. From (1), we know $x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2} \equiv 0(\bmod 4)$, and since $x^{2} \equiv 0$ or $1(\bmod 4)$, all $x_{i}$ are of the same parity. Similarly, all $y_{i}$ are of the same parity.

Therefore, $x_{i} y_{i}(i=1, 2, 3, 4)$ are of the same parity, and from (3), we know $m n$ is even. Without loss of generality, assume $m$ is even, then from (1), we know $x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2} \equiv 0(\bmod 8)$.

If all $x_{i}$ are odd, then $x_{i}^{2} \equiv 1(\bmod 8)$, so $x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2} \equiv 0(\bmod 8)$, which is a contradiction.

Therefore, all $x_{i}$ are even, and $\left(\frac{m}{2}, k, \frac{x_{i}}{2}, y_{i}\right)$ is a smaller set satisfying (1), (2), and (3) with $|m k| \neq 0$, leading to a contradiction.