5. Let point $P$ be on the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1\left(a>b>0, c=\sqrt{a^{2}-b^{2}}\right)$, the equation of line $l$ is $x=-\frac{a^{2}}{c}$, and the coordinates of point $F$ are $(-c, 0)$. Draw $P Q \perp l$ at point $Q$. If points $P, Q, F$ form an isosceles triangle, then the eccentricity of the ellipse is $\qquad$.
5. $\frac{\sqrt{2}}{2}$ Detailed Explanation: Let $T$ be the coordinates of the intersection point of line $l$ with the $x$-axis. Draw $P R \perp x$-axis at point $R$. From the problem, $\angle P F Q=90^{\circ}, P F = Q F, P Q \parallel R T$, then $T F = Q T = P R = F R$, thus, we have $y = x + c = -c + \frac{a^{2}}{c}$, where $P(x, y)$, so $x = \frac{a^{2}}{c} - 2c, y = \frac{a^{2}}{c} - c$. Substituting into the ellipse equation, we get $\left(\frac{a^{2} - 2c^{2}}{ac}\right)^{2} + \left(\frac{a^{2} - c^{2}}{bc}\right)^{2} = 1$, which simplifies to $\left(\frac{a}{c} - 2 \times \frac{c}{a}\right)^{2} + \frac{a^{2} - c^{2}}{c^{2}} = 1$, or $\left(\frac{1}{e} - 2e\right)^{2} + \frac{1}{e^{2}} - 1 = 1$. Simplifying further, we get: $2e^{4} - 3e^{2} + 1 = 0$. Since $0 < e < 1$, we have $e^{2} = \frac{1}{2}, e = \frac{\sqrt{2}}{2}$.