Depends what the rattle is. Often the chain rubs off the front mech/dérailleur in some gears, typically when the chain is crossed, that is running outside to inside across the gears. When you change gear you should try to avoid doing this. Move a few gears across the rear cassette, then onto the middle gear at the front, then a few more on the rear to avoid running the chain at a harsh angle.
If the chain still rubs on the front dérailleur it probably needs adjustment. Set it about 2mm above the big ring when it's in top gear, set it straight/in line with the gear then move it in and out until it shifts the gears ok and doesn't rub on the chain.