That happens when riding on roller coaster terrain.
Seriously, given that the bike has just been serviced, it's likely the mechanic is a bot off on an adjustment. If he installed a cable, there's some break in that needs to be squeezed out hard, or it will need fine tuning within the first few weeks.
Also, bikes often shift slightly differently on the road than on a repair stand, so bring it back for the mechanic to check and make sure he test rides, after working on it.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.