The present invention provides compounds of Formula (I): or stereoisomers, tautomers, or pharmaceutically acceptable salts thereof, wherein all the variables are as defined herein. These compounds are selective factor XIa inhibitors or dual inhibitors of FXIa and plasma kallikrein. This invention also relates to pharmaceutical compositions comprising these compounds and methods of treating thromboembolic and/or inflammatory disorders using the same.本發明提供式(I)化合物:或其立體異構物、互變異構物或醫藥上可接受之鹽,其中所有變量皆如本文中所定義。該等化合物係選擇性凝血因子XIa抑制劑或FXIa及血漿激肽釋放素之雙重抑制劑。本發明亦係關於包含該等化合物之醫藥組合物及使用其治療血栓栓塞性及/或發炎性病症之方法。