LegalLens - AI-Powered Legal Document Explainer

Hi all! I recently completed my first attempt at an app that I think has potential to monetize. It is an AI-powered legal document explainer. I haven’t pay-gated it yet so feel free to test it out and provide any comments/feedback. I hope you find it useful!

https://legallens.ai/

I used Agent to get everything started, and then mainly used Assistant from there. I did have to go to ChatGPT a bit just for a “second opinion” on some of the tricker parts.

Two major challenges I had were document processing and security.

Re document processing, since I use AI to intelligently parse out all the individual legal clauses in a document, this step would take a long time with larger documents. As analysis wouldn’t be able to start until it was complete, there would be a long wait time for the user before they see anything “tangible”. I was able to revise the processing flow so that documents are split into chunks and then these are processed separately, ensuring overlap in the chunks so nothing is split. As soon as the first chunk is parsed out, then analysis on the parsed clauses begins.

Security was probably the most difficult thing to get right, as I didn’t understand web sockets or any sort of authentication previously. It was actually lucky that I thought to even test multiple files processing on two separate computers - as I realized that both users documents were showing to all! :man_facepalming:

The current implementation ensures that data only surfaces in the browser session that initiated the analysis, and I’ve also locked down the ability for users to see other users’ documents by accessing via direct urls.

I’m most proud of the business/logic thought behind the analysis. I’ve ensured that the entire document and provided business context is provided to the API, along with the specific clause to analyze. This ensures the analysis considers complete legal and business context in its response. While someone may also be able to use ChatGPT, etc for assistance with legal documents, my solution, and carefully tuned prompting, ensures a much more valuable and robust result than doing so - and faster too.

Document handling should be pretty secure now, so feel free to give it a try! :sweat_smile:

Many thanks,
Jonathan

1 Like

Jonathan - Nice work. Tried it with one of my templates and well, it works.Although I am not a legal expert, I do write simple contracts myself and could be a good tool to verify with. If I may suggest, it might be good for your to have a progress bar and running total/counter of good to go, bad clauses and tips/suggestions during analysis and view it later vs. streaming. You can provide a list of docs processed with a dashboard. And price it differently for bulk loads (overnight). Good luck…

Cheers
LeapingZ

Thanks so much @gc-labs - I appreciate the feedback!