2. Given $x=\frac{1-\sqrt{5}}{2}$ is a solution to the equation $x^{4}+a x-b=0$, where $a$ and $b$ are rational numbers. Then the values of $a$ and $b$ are $(\quad)$.
(A) 3,2
(B) $-3,2$
(C) $3, -2$
(D) $-3,-2$
2. B.

Given $x=\frac{1-\sqrt{5}}{2}$, we know $x^{2}-x-1=0$.
Then $x^{4}+a x-b=0$
$$
\begin{array}{l}
\Rightarrow(x+1)^{2}+a x-b=0 \\
\Rightarrow x^{2}+2 x+1+a x-b=0 \\
\Rightarrow(3+a) x+2-b=0 .
\end{array}
$$

Combining the fact that $a$ and $b$ are rational numbers, and $x$ is an irrational number, we have
$$
a=-3, b=2 \text {. }
$$