First, do a complete tune and service of the motorcycle BY THE BOOK. Read and follow the instructions. Most of the time, that will cure what ails a bike.
If not, trying to fix a drivability problem before an adequate diagnosis is done is like trying to have sex with no blood flow to the vital organ. You can use the diagnostic procedures in the repair manual. Most of the time, that will find the problem. Yes, diagnostics takes an investment in test equipment and lots of time and patience, but it saves money and time in the long run unless you're really, really lucky.
If problem persists, I suggest careful disassembly, cleaning, and inspection of every carb component. Unless you live at high altitude, or outside North America, go with the same main jet the rest of the world gets, put a small washer under the needle circlip, and open the pilot screw to 2 turns. That will be real close to perfect. Carefully inspect all fuel, vacuum, and vent hoses for cracks, tears, kinks, and expanded ends. Heck, hose is so cheap, just go ahead and replace it all. The reason I start with the carb is because it's a heck of a lot cheaper if nothing is wrong than the CDI, and if it isn't the carb, the bike will run really good once the ignition is fixed.