3. For a regular octagon $A_{1} A_{2} \cdots A_{8}$ with side length 1, take any two points $A_{i} 、 A_{j}$. Then the maximum value of $\overrightarrow{A_{i} A_{j}} \cdot \overrightarrow{A_{1} \vec{A}_{2}}$ is $\qquad$ .
3. $\sqrt{2}+1$.

According to the geometric meaning of the dot product of vectors, we only need to look at the projection of the vector in the direction of $\overrightarrow{A_{1} A_{2}}$. Therefore, the maximum value is $\sqrt{2}+1$.