The bull case for graph DBs in law

2 min read Original article ↗

I have been bullish on graph DBs for law since Nov 2024. Allow me to explain why.

Firstly, the scale is about right. Unlike a codebase with tens to hundreds of thousands of files, legal work generally revolves around a few dozen documents considered together. That’s far less overhead when maintaining and recalculating a graph system. Moreover, legal work revolves around defined entities, with attempts at standardised taxonomies like Noslegal, which also plays into a graph approach using ontologies.

But why do graphs matter in the first place? It’s about the infrastructure play. We’ve known for a while that a good agent harness can really push the capabilities of a model. Giving access to a precomputed entity map helps steer an agent, speeding it up (as it doesn’t need to calculate as many relationships at runtime) and also acts as a “skeleton” for agent thinking tokens, anchoring them to defined relationships to mitigate hallucinations.

Legal work needs a structured approach that optimises for the attorneys ability to mitigate for and identify errors. As we can’t lint legal logic like we can code, graph based ontologies that can be intuitively parsed by both a human reader and scratched together by an AI seems like the logical direction to take.