3. If the complex number $z$ satisfies $|z|=2$, then the maximum value of $\frac{\left|z^{2}-z+1\right|}{|2 z-1-\sqrt{3} i|}$ is $\qquad$

Translate the text above into English, please keep the original text's line breaks and format, and output the translation result directly.
3. $\frac{3}{2}$.

Let $z=2(\cos \theta+\mathrm{i} \sin \theta)(\theta \in[0,2 \pi))$.
$$
\begin{array}{l}
\text { Then } \frac{\left|z^{2}-z+1\right|}{|2 z-1-\sqrt{3} \mathrm{i}|} \\
=\frac{\left|z-\frac{1+\sqrt{3} \mathrm{i}}{2}\right|\left|z-\frac{1-\sqrt{3} \mathrm{i}}{2}\right|}{2\left|z-\frac{1+\sqrt{3} \mathrm{i}}{2}\right|}=\frac{\left|z-\frac{1-\sqrt{3} \mathrm{i}}{2}\right|}{2} \\
=\frac{\sqrt{5+2 \sqrt{3} \sin \theta-2 \cos \theta}}{2} \\
=\frac{\sqrt{5+4 \sin \left(\theta-\frac{\pi}{6}\right)}}{2} \leqslant \frac{3}{2} .
\end{array}
$$

When $\theta=\frac{2 \pi}{3}$, the equality holds.
Therefore, the maximum value is $\frac{3}{2}$.