5. If $\sqrt{3-a}-\sqrt{a+1}>\frac{1}{2}$ always holds, then the range of values for $a$ is . $\qquad$
5. $\left[-1,1-\frac{\sqrt{31}}{8}\right)$.

From the problem, we know that $3-a \geqslant 0$, $a+1 \geqslant 0$, and
$$
\sqrt{3-a}-\sqrt{a+1}>0 \text {. }
$$

Thus, $-1 \leqslant a1+\frac{\sqrt{31}}{8}$ or $a<1-\frac{\sqrt{31}}{8}$.
In summary, $-1 \leqslant a<1-\frac{\sqrt{31}}{8}$.