Ethics Graph

At Neon Law, every attorney is required to keep a log of their client interactions that we then feed into a graph database to ensure that all representation of our law firm abides by legal ethics rules, especially our ethical rule that we cannot represent clients with a conflict of interest without their explicit written permission (and in some cases not at all).

Why a Graph Database?

Graph Databases allow us to model relationships like a social network (e.g. Facebook, where you have friends, and friends and friends, and so on). However, we do not have simple edges like a friend. The edge in a relationship

Beginning with the Relationship Log

To begin our foray into graph databases, we use the NeonLaw.Ethics.RelationshipLog schema to store notes lawyers write about organizations. This is confidential attorney work product and is not available to organizations. Its use is for our ethics considerations.

For easy collection of relationship logs, we email our attorneys to recap work from the email partners@neonlaw.com and then collect the responses to create these records.

Using Natural Language Machine Learning

From our relationship logs, we chunk and embed our relationship log notes to optimize multiple types of prompts to search for common conflict of interests such as divorce (e.g. we may chunk content around words like marriage, married, etc.), former business partners (e.g. chunking around words like partner, shareholder, etc.), and more. We then store these results in a traditional graph database with nodes and edges.

Our Graph Database is Just Postgres

Postgres is awesome and for good reason, we build on Neon Postgres. We model graph data in postgres and will write about that in a future post.