I am trying to build a AI-driven legal support project. The workflow of the project is like below:
- user upload a PDF document which contains legal matters
I attached sample pdf file - The service extracts information like the background, relevant facts, evidences, etc
- The extracted information is used to search similar judicial precedent which is stored in mongodb.
The data is scraped from the websites like https://www.corteconstitucional.gov.co/relatoria/2024/T-310-24.htm
I scraped nearly 40k data. - The service generate a new document with the extracted information based on the searched previous judgement.
Now I want to build this project with RAGs or Langchain. I want to build local LLM. But until now, I have no clear idea how to handle it. I need your help.