3. Given that $A M$ is the median of $\triangle A B C$ on side $B C$, $P$ is the centroid of $\triangle A B C$, and a line $E F$ through point $P$ intersects sides $A B$ and $A C$ at points $E$ and $F$ respectively. Then $\frac{B E}{A E}+\frac{C F}{A F}=$ $\qquad$
3. 1 .

Draw $B G$ and $C K$ parallel to $A M$ through points $B$ and $C$ respectively, intersecting line $E F$ at points $G$ and $K$. Then
$$
\frac{B E}{A E}=\frac{B G}{A P}, \frac{C F}{A F}=\frac{C K}{A P} \text {. }
$$

Adding the two equations gives
$$
\frac{B E}{A E}+\frac{C F}{A F}=\frac{B G+C K}{A P} .
$$

In trapezoid BCKG, we have
$$
P M=\frac{1}{2}(B G+C K) \text {. }
$$

Since $P$ is the centroid, $A P=2 P M$.
$$
\text { Therefore, } \frac{B E}{A E}+\frac{C F}{A F}=\frac{2 P M}{2 P M}=1 \text {. }
$$