$\newcommand\Q{\mathbb Q}$I have a rational function $f(\vec x)$ over $\Q$ in many variables (7 variables). I do not know what $f$ is, but I can evaluate it for random choices of $x_1,\dots,x_7\in \Q$ without $x_i$ for any $i=1,\dots, 7$. I always get a polynomial over $x_i$. This indicates to me that $f$ may indeed be a polynomial. If I can evaluate $f$ in this way, is there a smart way to prove that $f$ is a polynomial?
Edit: We may assume that we know what the upper bound of the total degrees of the numerator and the denominator are.