If the engine is actually holding a steady idle while the tach goes nuts, then look for wiring problems to the cluster. That won't have anything to do with 'relearning'.
But I suppose the idle speed is truly surging...
Do you get a check-engine light? Your mechanic should read what the error code is, or go to AutoZone & they'll read it. Get the code number, not just the guy's guess for what caused it. You got a couple things that work together to control idle, like the IAC valve on the intake manifold...
Oh yeah - look for vacuum leaks, too.