Bestlaw, a robot for legal research

This post originally appeared on Stanford Law School’s CodeX blog.

Can we automate legal research? It’s a hard problem. Answering legal questions takes creativity, intuition, and comprehension—skills that robots have yet to master.

Still, legal research is full of inefficiencies. Take the Bluebook, the 511-page style manual that sets the rules for most legal writing. Say you want to cite to McCutcheon, the recent Supreme Court case that struck down aggregate limits on campaign contributions. First, flip to the Bluebook’s table six to check if any words in the case name should be abbreviated (two should: “federal” and “commission”). Then, copy the starting page number, the reporter volume number, and the number of the page you want to cite. The opinion hasn’t been published in the United States Reports yet, so you’ll have to cite to S.Ct.—or is it S. Ct.? (See Bluebook p. 215, and don’t forget to omit the name of the Court in citations to the Supreme Court Reporter—p. 97.) Add the year and optional parenthetical details. Finally, you end up with:

McCutcheon v. Fed. Election Comm’n, 134 S. Ct. 1434, 1465 (2014) (Breyer, J., dissenting) (arguing that the majority’s decision “eviscerates our Nation’s campaign finance laws”).

There are about 1.2 million licensed attorneys in the United States. Let’s say that one percent of attorneys cite a case each day, and that it takes ten seconds to write a citation. That’s two thousand lost hours. With law firm associates billing an average of $370/hour, citations account for $740,000 in daily bills to clients (or taxpayers or donors). Can robots help?

Automating research with Bestlaw

I built Bestlaw to automate away some of the drudgery of legal research. It’s a free browser extension that adds features to WestlawNext, the most popular legal research service. For instance, it creates properly structured Bluebook citations with one click. (If law firms are rational, this feature should earn up to $740,000 per day.) There are also links to look up the document on Wikipedia, to share it by email or on social media, and to find it on free sources like CourtListener and Cornell’s LII.

Other features make legal information more accessible. McCutcheon, for instance, has a concurrence, a dissent, and three appendices, spanning nearly a hundred pages. Good luck finding the start of Justice Breyer’s dissent without scrolling endlessly or Ctrl-F-ing. To make complex documents easier to navigate, Bestlaw automatically generates a clickable table of contents that lets you jump between sections. If your eyes start to ache from Westlaw’s tiny Arial, Bestlaw can reformat the document with better typography and design.

The full list of features is here.

The legal hive mind?

The insight of Netflix is obvious in hindsight: people who give five stars to Battlestar Galactica will probably enjoy Star Trek more than Love Actually. Every star rating is a data point associated with a viewer and her tastes. When you’re looking for some fresh TV, the Netflix algorithm sifts through the collective intelligence of its subscribers to recommend something you’ll like.

Can we put collective intelligence to work in the law? One of the hardest parts of legal research is finding a case in your jurisdiction that rules on the specific issue you’re investigating. Westlaw (and its rival, LexisNexis) give rough guidance in the form of headnotes, which are basically categories—for instance, “Constitutional Law > Campaign finance, contributions, and expenditures.” You’d eventually find McCutcheon, but first you’ll sift through fifty-nine other cases about political spending. Using headnotes is sort of like, long ago, browsing the aisles at your local Blockbuster: since you couldn’t know any better, you could be forgiven for thinking that Batman and Robin (1997) on VHS was a decent find.

On Westlaw and Lexis, many thousands of attorneys are answering legal questions every day. There’s a finite number of legal issues, and I suspect most of them are more similar than different. If others have already answered your question, why should you duplicate their work?

Bestlaw collects data—with no connection to the user’s identity—about how people do legal research. Since it launched six weeks ago, it’s gathered more than a million data points. I’m working on an algorithm that comprehends the types of activities that might be similar to a five-star rating—like generating a Bluebook citation, writing an annotation, or saving a document to a Westlaw folder. In the next major version, I plan to add a Netflix-style recommendation system for lawyers: “People who like McCutcheon also like Citizens United and Buckley.” We don’t need artificial intelligence yet. There’s a huge surplus of human intelligence ready to be queried.

Hacker News for Lawyers

Hacker News is one of the best news sites. There are lots of interesting links and threads about law, but they’re easily lost between the science and tech stories. Someone (not me, at least for now) should build a service that (1) scrapes the front page of Hacker News every ten minutes, (2) matches a list of interesting legal keywords (DMCA, patent troll, etc.), and (3) lists them on a separate site (legalhackernews.com?).

New email headers to help lower inbox stress

I spend a lot of time writing and responding to emails. When I get an email, it’s not always clear if the sender needs a reply, and if so, by when. I feel like I need to reply as quickly as possible, but I’m usually too busy to reply right away. That feeling of obligation causes lingering low-level stress, and I wish there were a way to get rid of it.

Adding new metadata fields to emails could help solve this problem. I think these two headers would work:

Reply-Expected: [Yes, No, Optional]
Reply-By: [Timestamp]

Reply-Expected would tell me how important it is to reply to a message. Reply-By would tell me when I need to reply.

This makes life better for both the sender and recipient. The sender can easily and politely make it clear that she needs a reply by a certain time. If the reply doesn’t come before the deadline, her email application could generate an alert or send a reminder to the recipient.

The recipient no longer has to deal with the stress of feeling like every message needs an immediate reply. He can sort his inbox in order of the messages that need the soonest replies. Maybe the best part is that he can minimize the time he spends checking his inbox for new messages. He could use a service like IFTTT or Huginn to send an SMS alert whenever there are any messages that need a reply within X hours. He would have the freedom to keep his inbox closed without worrying that an urgent message is waiting.