4. Given the coordinates of points $A\left(a, a^{2}\right), B\left(b, b^{2}\right)(a \neq b)$ satisfy
$$
\begin{array}{l}
a^{2} \sin \theta+a \cos \theta=1, \\
b^{2} \sin \theta+b \cos \theta=1 .
\end{array}
$$

Let the distance from the origin to the line $A B$ be $d$. Then the value of $d$ is suitable for ( ).
(A) $d>1$
(B) $d=1$
(C) $d<1$
(D) Cannot be determined, depends on the values of $a, b$
4. B

It is known from the table that $A, B$ lie on the tangent line $x \cos \theta + y \sin \theta = 1$ of the unit circle passing through the point $(\cos \theta, \sin \theta)$. According to the principle that two points determine a line, the above tangent line is the line $AB$, and it always holds that $d=1$