7. Let
$$
f(x)=\ln x-\frac{1}{2} a x^{2}-2 x(a \in[-1,0)) \text {, }
$$

and $f(x)<b$ holds for all $x$ in the interval $(0,1]$. Then the range of the real number $b$ is $\qquad$ .
7. $\left(-\frac{3}{2},+\infty\right)$.

From the problem, we know
$$
b>\max _{a \in[-1,0)}\left\{\ln x-\frac{1}{2} a x^{2}-2 x\right\} .
$$

Since the function $h(a)=\ln x-\frac{1}{2} a x^{2}-2 x$ is monotonically decreasing on the interval $[-1,0)$, we have,
$$
\begin{array}{l}
h(a)_{\max }=h(-1)=\frac{1}{2} x^{2}-2 x+\ln x \\
\Rightarrow b>\frac{1}{2} x^{2}-2 x+\ln x . \\
\text { Also, } b>\max _{x \in(0,1\}}\left\{\frac{1}{2} x^{2}-2 x+\ln x\right\}, \text { let } \\
k(x)=\frac{1}{2} x^{2}-2 x+\ln x .
\end{array}
$$

Also, $b>\max _{x \in(0,1)}\left\{\frac{1}{2} x^{2}-2 x+\ln x\right\}$, let

Then $k^{\prime}(x)=x-2+\frac{1}{x}=\frac{(x-1)^{2}}{x} \geqslant 0$.
Thus, $k(x)$ is monotonically increasing on the interval $(0,1]$.
Hence, $k(x)_{\max }=k(1)=-\frac{3}{2} \Rightarrow b>-\frac{3}{2}$.