Let $a_{i}$ and $b_{i}$ ($i=1,2, \cdots, n$) be rational numbers such that for any real number $x$ there is:
\[x^{2}+x+4=\sum_{i=1}^{n}(a_{i}x+b)^{2}\]
Find the least possible value of $n$.
1. We start with the given equation:
   \[
   x^2 + x + 4 = \sum_{i=1}^{n} (a_i x + b_i)^2
   \]
   where \(a_i\) and \(b_i\) are rational numbers.

2. To find the least possible value of \(n\), we need to express \(x^2 + x + 4\) as a sum of squares of linear polynomials with rational coefficients.

3. Let's expand the right-hand side:
   \[
   \sum_{i=1}^{n} (a_i x + b_i)^2 = \sum_{i=1}^{n} (a_i^2 x^2 + 2a_i b_i x + b_i^2)
   \]
   This can be rewritten as:
   \[
   \left( \sum_{i=1}^{n} a_i^2 \right) x^2 + \left( \sum_{i=1}^{n} 2a_i b_i \right) x + \left( \sum_{i=1}^{n} b_i^2 \right)
   \]

4. For the equation to hold for all \(x\), the coefficients of \(x^2\), \(x\), and the constant term must match on both sides. Therefore, we have the following system of equations:
   \[
   \sum_{i=1}^{n} a_i^2 = 1
   \]
   \[
   \sum_{i=1}^{n} 2a_i b_i = 1
   \]
   \[
   \sum_{i=1}^{n} b_i^2 = 4
   \]

5. We need to determine the smallest \(n\) such that these equations can be satisfied with rational \(a_i\) and \(b_i\).

6. First, consider \(n = 1\):
   \[
   a_1^2 = 1, \quad 2a_1 b_1 = 1, \quad b_1^2 = 4
   \]
   Solving \(a_1^2 = 1\), we get \(a_1 = \pm 1\). Substituting into \(2a_1 b_1 = 1\), we get \(b_1 = \pm \frac{1}{2}\). However, \(b_1^2 = \left(\pm \frac{1}{2}\right)^2 = \frac{1}{4} \neq 4\). Thus, \(n = 1\) is not possible.

7. Next, consider \(n = 2\):
   \[
   a_1^2 + a_2^2 = 1, \quad 2a_1 b_1 + 2a_2 b_2 = 1, \quad b_1^2 + b_2^2 = 4
   \]
   Solving these equations simultaneously with rational \(a_i\) and \(b_i\) is not possible, as shown in the original solution.

8. Consider \(n = 3\):
   \[
   a_1^2 + a_2^2 + a_3^2 = 1, \quad 2a_1 b_1 + 2a_2 b_2 + 2a_3 b_3 = 1, \quad b_1^2 + b_2^2 + b_3^2 = 4
   \]
   Again, solving these equations simultaneously with rational \(a_i\) and \(b_i\) is not possible, as shown in the original solution.

9. Consider \(n = 4\):
   \[
   a_1^2 + a_2^2 + a_3^2 + a_4^2 = 1, \quad 2a_1 b_1 + 2a_2 b_2 + 2a_3 b_3 + 2a_4 b_4 = 1, \quad b_1^2 + b_2^2 + b_3^2 + b_4^2 = 4
   \]
   Using the lemma from the original solution, we know that three rational squares cannot sum to 15. Therefore, \(n = 4\) is not possible.

10. Finally, consider \(n = 5\):
    \[
    a_1^2 + a_2^2 + a_3^2 + a_4^2 + a_5^2 = 1, \quad 2a_1 b_1 + 2a_2 b_2 + 2a_3 b_3 + 2a_4 b_4 + 2a_5 b_5 = 1, \quad b_1^2 + b_2^2 + b_3^2 + b_4^2 + b_5^2 = 4
    \]
    It is possible to find rational \(a_i\) and \(b_i\) that satisfy these equations. For example, one such solution is given in Peter's post.

Thus, the least possible value of \(n\) is \(5\).

The final answer is \(\boxed{5}\).