4. Let the ellipse $\Gamma: \frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b>0)$ have an eccentricity of $\frac{\sqrt{3}}{2}$. A line with slope $k(k>0)$ is drawn through the left focus $F$, intersecting the ellipse $\Gamma$ at points $A$ and $B$. If $\overrightarrow{A F}=3 \overrightarrow{F B}$, then $k=$ $\qquad$
4. $\sqrt{2}$.

As shown in Figure 2, draw perpendiculars from points $A$ and $B$ to the left directrix, with feet of the perpendiculars at $C$ and $D$ respectively. Draw $B E \perp A C$ at point $E$, intersecting the $x$-axis at point $G$.
Let $B D=x$.
$$
\begin{array}{l}
\text { By } \frac{A F}{A C}=\frac{B F}{B D}=e \Rightarrow A F=e A C, B F=e B D \\
\Rightarrow A C=3 B D \Rightarrow A E=2 x \\
\Rightarrow A B=A F+F B=e(A C+B D)=4 e x \\
\Rightarrow \sin \angle A B E=\frac{A E}{A B}=\frac{2 x}{4 e x}=\frac{1}{\sqrt{3}} \\
\Rightarrow \cos \angle B F G=\frac{1}{\sqrt{3}} \\
\Rightarrow k=\tan \angle B F G=\sqrt{2} .
\end{array}
$$