DALL-E drawing of a librarian looking over lots of documents.

There is obviously a ton of hype and buzz going on right now with ChatGPT and other AI tools, including this week’s Geek in Review podcast. I wanted to see if there’s something that I could do that was a practical use of GPT in my job as a law librarian. I think I’ve found something that might fit that bill. Summarizing text.

Law Librarians are great at finding good information and getting that quickly into the hands of lawyers, legal professionals, judges, pro se representatives, etc. However, we don’t always have a lot of time to read all of that information and create a summary for the person we are working with. It’s not uncommon for a firm to have 100 – 300 attorneys for each librarian. Any tool that would help librarians synthesize information in a useful way is a welcome tool for us all. I put GPT 3.5 (the paid version) to the test to see how it could be that electronic assistant in summarizing information quickly.

It is early in my experiment, but I’m impressed with what I’ve seen so far.

The Current Process

I wanted to try something that I personally set up for myself that is “good” but not “great.” And that is tracking BigLaw Podcasts as they come out. What I have now is an RSS feed (yes, that is still a thing!) that follows AmLaw 100/200 firms’ websites and lets me know when a new episode comes out. I have that RSS feed set up in my MS Outlook folders. I’m using LexisNexis’ NewsDesk to set this up.

Right now, it looks like this:

This works fine, but it really doesn’t give me a lot of information on the podcast. I’d really like to see more of a summary of the podcast before I make a decision to click through and listen.

The Idea

I’ve got the basic information from the RSS feed, but now I want to expand that information. I’m a former programmer from “back in the day” but I haven’t done any serious programming in a long time. But, I know that Python is a great tool for processing text, so my top-of-the-head idea was to have Python look at my RSS output and see if it could get me more information. Actually, I wanted to see if Python might be able to summarize the RSS information directly. This is where the ChatGPT tool came in handy.

Using ChatGPT to build a Python Script

Since I am not a Python expert (even calling me a novice might be too bold), I went to ChatGPT and gave it my idea. Here was my original question.

This gave me some ideas on how to get the information processed. I think spent a little while (hours) working with ChatGPT to help write the Python script to pull the information out of the RSS feed.

It turns out that ChatGPT isn’t perfect at writing Python scripts, so it was pretty hit and miss, but eventually we found a way to process the information.

Since ChatGPT won’t work with automatically processing the information to summarize, I am using the API call from GPT 3.5 which costs money but is very inexpensive. I’ve been using it for five days now and haven’t broken a dollar in charges yet. The Python script takes the description (limited to no more than 512 characters to keep the fees low) and sends a request to GPT 3.5 to “Summarize the following text from a large law firm’s podcast:” and then the description from the RSS feed. The API call sends and receives the information and gives me back a summary based on the description.

After tweaking code, RSS feeds, and trying a number of different options on how to process the data, I finally came up with something that I thought was a good beginning.

The Results (for now…)

Let me start off by saying that it is still very early in the development of anything that I would use or trust, but I on to something.

The process at this point is to:

  • Pull the RSS feed information, including the title, link, and description.
  • Verify that the link is correct and not a redirect from NewsDesk.
  • Use Python to pass the description to GPT 3.5 via the openai API call.
  • Retrieve the summary from GPT 3.5 via the openai API call.
  • Format the information and output it so that I can read it.

Here’s what that output looks like now:

Now there is still lots and lots of work to do to make this something that I would put into production, but it is a great start. If I wanted to embed this into a webpage or portal page, I’d want to do a little more tweaking and automating so that I don’t have to manually keep a list up to date. When I’m ready to do this, I will go back to ChatGPT and the two of us will struggle to come up with some clean code to schedule and automate the process.

What’s Next?

I don’t know. But, while I don’t think that ChatGPT is ready for anything that you would need to stake your reputation on, I do think that there are some real advantages available to law librarians and other legal professionals currently. Summarizing text is one of those useful tasks that I thought of. Is there anything that you’ve done, or are wanting to do with the tool? Let me know in the comments.