The present invention provides compounds of Formula (I)or a stereoisomer, a tautomer, or a pharmaceutically acceptable salt thereof, wherein all the variables are as defined herein. These compounds are selective factor XIa inhibitors or dual inhibitors of factor XIa and plasma kallikrein and can be used for treating thromboembolic and/or inflammatory disorders.