Power Factor Correction on Generators
Assuming the load is inductive, then shunt capacitors will improve the load power factor. However, with a stand-alone generator it's rarely necessary, and there are several considerations.

Do Not Do This on the output of a square wave or 'modified sine' inverter. Shunt capacitors will overload the inverter on the fast edges.

Power factor correction doesn't save you any power (fuel consumption) in the generator unless the transmission lines to the load have a significant loss compared to the load. It's not worth adding shunt C for the fun of it.

If you do decide to do it, then under-correct rather than over-correct, don't try to hit nominal spot-on.

Mount the shunt capacitors with their loads so that the shunt C changes when the load changes. It can be dangerous to add shunt caps to a generator and then run it off load, due to voltage rise with its residual inductance.