12. If the integer part of $\frac{1}{\sqrt{17-12 \sqrt{2}}}$ is $a$, and the fractional part is $b$, then, $a^{2}-$ $a b+b^{2}$ is $\qquad$ .
$12.47-18 \sqrt{2}$.
It is easy to know that $a=5, b=2(\sqrt{2}-1)$.
Therefore, $a^{2}-a b+b^{2}=(a+b)^{2}-3 a b$ $=17+12 \sqrt{2}-30(\sqrt{2}-1)=47-18 \sqrt{2}$.