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