What each one does
Guar hydrates fast in cold water and thickens, and that is all it does. Xanthan thickens less efficiently per unit but forms a weak network that collapses under shear and rebuilds at rest, and it survives acid, salt and heat that strip guar of its viscosity.
What decides it
The pH and what the product must do at rest. A neutral sauce that only needs to be thick can use guar. A dressing at pH 3.5 with visible herbs must use xanthan.
Where the obvious answer is wrong
The obvious answer on cost is guar, and in a vinaigrette it is the wrong one twice over: the viscosity falls away over shelf life as the acid works, and the particles sink because guar builds no yield stress.
