Well, yes. If you have a combustion engine or a turbine, Carnot tells you exactly the maximal efficiency you could achieve. But the exhaust still can be used for residental heating. So while the generator doesn't get any more efficient at producing electricity, you can use the heat which drives up the overall gain of operating the generator.