Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lookup multiple citations and export their text as a big PDF #27

Open
rlfordon opened this issue Mar 11, 2024 · 5 comments
Open

Lookup multiple citations and export their text as a big PDF #27

rlfordon opened this issue Mar 11, 2024 · 5 comments
Labels
courtlistener new-feature A new feature in an existing system

Comments

@rlfordon
Copy link

Summary:

I propose the implementation of a feature that would enable the user to input a list of case citations, and receive as the output the text of opinions with those citations. This enhancement would allow users to pull multiple cases at once without requiring them to interact with the API.

Background:

Currently, the citation lookup tool allows for a user to retrieve one case at a time from a citation. If a user has more than one case, they must enter each case one at a time to read them, which is time consuming and requires the user to maintain an internet connection to read the cases.

Potential use cases

Potential use cases include:

  • Pulling a list of cases cited in a brief
  • Retrieving a list of cases to read offline
  • Retrieving a set of cases to input as text into an LLM

Proposed Solution:

  • Create new "Find and Export" citation feature that will take a list of citations, separated by semi-colons or line breaks, and return some formatted object containing the text of all opinions.

Potential Challenges:

  • I'm not sure what format the output should be. A list of hyperlinks? JSON object? Is PDF too challenging?
  • May need some way of handling unrecognized citations - return a list of the citations that were not retrieved?
  • Could be used as a workaround to API access. Likely need a case limit. Maybe 10 or 20 citations at once?
@mlissner
Copy link
Member

This is interesting and timely, thanks Rebecca. I think returning a list of links is probably easy. The content wouldn't need to be semicolon or newline delimited either. You could just paste in whatever (the entire brief, the Table of Authorities, a few sentences) and we could handle it fine.

What if this worked two ways:

  1. In the front end, we have a single, one-line input box now. If you paste in a citation, it takes you to the correct page. Fine. What if we changed that to be a multi-line textarea input box, and when you pasted in more than one citation, it gave you a list of cases in HTML, and you could click the links to open the pages? That should satisfy offline needs, so long as your browser doesn't die.

  2. In the API, this could be similarly supported either via a new endpoint (notionally: /api/rest/v3/citation-lookup/multi-lookup/, say) or via the current one (maybe). In either case, like above, when you put in more than one citation in a block of text, we could return a list of cases as the result (as JSON), as opposed to returning just one. @ERosendo, how do you think that would fit into the design you're working on?

Other thoughts:

  • Re limitations, I think 10 is definitely too few (this should support a table of authorities, right?), but I forget how much processing it takes to look up citations. Ideally it should support 100 or maybe 200, right? Eduardo, I'd love your take on whether that's a bad idea.
  • Re PDFs, I think it's probably hard. First, PDFs are a pain and we've never had to generate them before, so I think that could eat a lot of time. But second, returning more than one case at a time seems tricky. They get LONG, and if somebody requested the wrong ones, we could easily wind up generating a multi-thousand-page document, which would inevitably fail.
  • Unrecognized citations just wouldn't return a result in this case, because we're not doing delimited text. What would happen is we just wouldn't return that item in the result set.

More questions:

  • Do we return the results in the order of the original text or some other order?

I'm not sure how other people would find this useful. I'd love to hear thoughts.

@rlfordon
Copy link
Author

That's great to produce a list of authorities from any text, rather than having to enter separate citations. I like the idea of a list of cases and it seems like that would be easiest to implement.

It would be nice to be able to export the results in some way too without using the API (I admit that this idea came to me when trying to cut and paste the text of 8 opinions or so from CL into Claude 3 with its huge content window).

As for order, for my use cases it either doesn't matter, or I'd want it in the order it was entered. But if there were a lot of cases, I might want some additional ways to sort or filter.

I'm also curious if others would find this useful! The major legal research vendors all have a similar feature, where you can input a list of citations and get back a Word doc or PDF doc with the decisions. I used it all the time as an associate for cite-checking, or to pull cases from a brief filed by opposing counsel. I'm not sure if attorneys would use CL that way?

@mlissner
Copy link
Member

Got it, so I think the best thing is to take this incrementally:

  1. Tweak the UI and response to allow a block of text and multiple citations.
  2. Tweak the API to do the same.
  3. Add a PDF export (this may not happen for a long time or ever, but it makes sense as a last step).

Eduardo and others, what do you think?

@mlissner
Copy link
Member

(I've posted about this on social media to see if we get any more feedback.)

@mlissner mlissner changed the title Feature Proposal: Find and Export Lookup multiple citations and export their text as a big PDF Sep 25, 2024
@mlissner mlissner transferred this issue from freelawproject/courtlistener Sep 25, 2024
@mlissner mlissner added courtlistener new-feature A new feature in an existing system labels Sep 25, 2024
@anseljh
Copy link
Member

anseljh commented Nov 22, 2024

I don't know about a giant multi-opinion single PDF (I wouldn't use that), but on other systems, I do use the option to download multiple opinions as discrete PDFs within a single zip file. I think this is probably a separate feature around exporting generally. People also like to pick what format they're exporting to. The other sensible one is .DOCX, which makes it easy to copy/paste right into a brief you're working on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
courtlistener new-feature A new feature in an existing system
Projects
None yet
Development

No branches or pull requests

3 participants