Compounds having the following formula I:or a stereoisomer or a pharmaceutically-acceptable salt thereof, wherein R1, R2, R3, R4, and R5 are as defined herein, are useful in the modulation of IL-12, IL-23 and/or IFNα by acting on Tyk-2 to cause signal transduction inhibition.