The present invention provides compounds of Formula (I):or a stereoisomer or pharmaceutically acceptable salt form thereof, wherein the variables A, B, L1, L2, X1, X2, X3, X4, R4, R5, R13, R14, R15 and R16 are as defined herein. The compounds of Formula (I) are useful as selective inhibitors of serine protease enzymes of the coagulation cascade and / or contact activation system; for example thrombin, factor Xa, factor XIa, factor IXa, factor VIIa and / or plasma kallikrein. In particular, it relates to compounds that are selective factor XIa inhibitors. This invention also relates to pharmaceutical compositions comprising these compounds and methods of treating thromboembolic and / or inflammatory disorders using the same.