Our Community well has a Genrac/Dayton 10K watt for running the pump in an emergency. It has a load sensor and idle mode. When it senses any draw, an electric motor brings the throttle to full and the governor takes over to maintain RPM. In idle mode, it is on the idle stop screw. I recently got ours and went over it, changing the oil and filter and draining the fuel tank of old fuel and replacing the fuel hoses. It would not idle smooth at all in idle mode and did semi OK in the full power mode.
I ended up removing the cover to the carb and pulling the float and it had a lot of grit in the float bowl. Carefully blew out the passages in the body and cover, making sure no loose ball bearings, needles, etc got lost, and reassembled it and held down the float shaft retainer and allowed it to fill. Floats shut off when flush with the top of the body, so I reinstalled the carb top and it ran fine after that.....
Other problem I have run into in the past. There is an oil pressure switch that kills the engine if there is no oil pressure. Usually there is a time delay of about 30 secs so the engine can start, then the pressure switch is put into the circuit.
If you have a bad or near bad switch, it may be make/break/make at idle due to low oil pressure and causing the ignition to cut in and out. On ours, the switch was totally bad, and the motor would start and run 30 secs and die. Finally figured out the switch and time delay, and replaced the switch and fixed it.
Charles