We introduce a novel application of machine learning to compare pooling and servicing agreements (PSAs) that govern commercial mortgage-backed securities. In contrast to the view that the PSA is largely boilerplate text, we document substantial variation across PSAs, both within- and across-underwriters and over time. A part of this variation is driven by differences in loan collateral across deals. Additionally, we find that differences in PSAs are correlated with ex post loan and bond performance. Collectively, our analysis suggests the importance of examining the entire governing document, rather than specific components, when analyzing complex financial securities.