Ford F150 2002 4.6L

Intermittent problem. When coming to a stop the engine will idle at 2000+ rpm instead of the normal 700rpm. Truck has been in shop twice and problem solved only to return again. Has 106K miles, full tune up in last 1K.

The only thing that controls the engine idle speed with your foot off the accelerator is the Idle Air Control motor. If this IAC motor fails to go to the proper position for the idle condition it can result in a high idle speed.

Tester

A couple of things to check are the throttle cable hanging up, sometime; and the throttle plate sticking in the bore, sometime; and, maybe, an erroneous signal from the throttle position sensor (tps); and, maybe, the throttle cable hanging on the (tps).
Clean the deposits from the throttle bore and plate, and the passages to the idle air control valve pintle with throttle body cleaner.

vacuum leak anywhere in the intake tract and connected items/hoses