Artificial Intelligence for Revenue Recognition

Klarity
4 min readNov 5, 2020
Photo by Hitesh Choudhary on Unsplash

The beginning of Klarity’s AI journey was simple. Manually reading and understanding lengthy contracts and numerous order forms was an arduous and error-prone process that was historically performed exclusively by highly educated individuals. To us at Klarity, making bright people endlessly review contracts is a waste of human potential. Fortunately, cutting edge technology has made it possible to remove the need to manually read and understand contract terms, and, in doing so, significantly improve accuracy. So we set out to build an intelligent system that could not only free humans of this tedious and highly repetitive work but also do it better. You can read more about the origins of our company, and why we focused on Revenue Accounting here. But just what does it take to build AI that can understand contracts, and how can we apply this technology to Revenue Accounting? For this, we sat down with Klarity’s Natural Language Processing (NLP) Scientist, Harsha Ramesh, and Deep Learning and NLP Engineer, Aditya Thiruvengadam to see how this was accomplished.

Manually reading and understanding lengthy contracts and numerous order forms was an arduous and error-prone process that was historically performed exclusively by highly educated individuals.

Our document processing pipeline is composed of a number of steps. First, a document is converted into a readable format using state-of-the-art Optical Character Recognition (OCR). Next, the system classifies the document’s type (eg. Master Subscription Agreement, Order Form, Purchase Order) by analyzing both its text and its visual structure. Neural Computer Vision algorithms allow us to identify distinctive regions such as tables, titles, and signatures sections.

The system then dives into the content of the contract and searches for a wide array of metadata such as customer name, product type, quantities and fees. We were careful to not make any simplifying assumptions in constructing this part of the system as metadata can take many different forms. For example, the parties may be defined in a number of different locations including the header section, the signatures section. It was critical to us that our system be robust against such variations.

Having identified the document’s metadata, the system proceeds to scour the document for non-standard terms. The amount of variance in language between customers, coupled with the sheer complexity of legalese makes for a formidable NLP challenge. Our first instinct was to try the many out-of-the-box NLP libraries and products, but none could come close to making sense of the long and convoluted sentence structures. Over the course of multiple years of experimentation and many failed attempts, we converged on a Deep Neural architecture that showed promise. Our in-house legal ops team was simultaneously hard at work, diligently annotating tens of thousands of documents that we could use as training data. The resulting model exhibited stellar performance in identifying non-standard terms and was able to devour hundreds of pages of dense contractual language in minutes. We couldn’t have felt more proud to present it to our customers.

The resulting model exhibited stellar performance in identifying non-standard terms and was able to devour hundreds of pages of dense contractual language in minutes.

Much like our system, we too are always learning! We ask our new customers to provide us with examples from their documents and clause libraries so we may fine tune the system’s performance for them.

Revenue Accountants are constantly extracting a subset of contractual metadata and non-standard terms for use in validating the accounting associated with the agreement, documenting for compliance, billing, order creation, and much more. Now, this can be done by Klarity. We are continuously seeing customer success (see our success story with our customer Optimizely here), and will continue to use our methodologies to improve our technology and help accounting teams achieve their goals. AI, NLP, Deep Learning; these are not easy concepts. However, we have the skill set, the team, and the passion to continue to make the accounting team’s lives easier and more productive.

Visit as at tryklarity.com to learn more about the present and future of document review automation!

--

--

Klarity

Our mission is to empower teams by automating the review of contracts and other documents.