Indian Law Assistant

Indian Law Assistant

12 devlogs
16h 47m
Created by Turbash Negi

A website i will make where you can ask your queries regarding indian laws, and it will answer very accurately from the pdfs i have given to it like bhartiya nyaya sanhita, the constitution, etc.

Timeline

Okay went on with the frontend to test how it is working. and it is terrible the performance is terrible. when i was making the api i was just testing if it is wroking or not. not the performance and now that i am testing the performance, I have realized this is terribel right now. i am really frustrated since i spent so much time on the backend and it is still so bad.

Update attachment

Started serious work in frontedn
DOne with the auth setup wroking
now maybe i will add the chat setup workin
focus on ui or appearance later.

Update attachment

Amost all the routes that i need now are made and tested, there was an issue with first message of each session but i am pretty sure it is resolved now.

Update attachment

Added protection to my chat routes using dependency so only logged in user can use these routes. Also added schemas to solidify my api .

Update attachment

Done with the generate response and search l ogic just need to finish the chat route now, then i will secure these routes using a middleware, and then i will uhh,,, do something else i will think about it.

Update attachment

Done with the two authentication routes to enable login and logout using bcrypt and jwt, took much longer than usual since it is my first tiem working with postgres or any type of sql database.

Update attachment

Done addin more more vector embedding of law pdf-json, still one left but skipping for now since this is getting boring. I want a working chat bot fist then I will expand on teh data.

Update attachment

I am quite frustrated right now, I have to vote 88 more times and writing such long votes is taking more than 5 minutes each for me. I am thinking of quitting som, I will not get to the laptop anyway, and i need laptop more than anything. Anyways, I have added chromadb and sentence transformer model and i have completed the embedding for two most impotant jsons the bns and the constitution. i ahave also queried the chroma db to test and got quite good results. I will do the two more jsons and proceed to make the api.

Update attachment

Added two more act pdfs. Now i have come to a decision i will move on to next step skipping the rest of the pdfs for now since this is getting boring and tiring now. It is better to move to the next step now. Now I will make vector embeddings using sentence transformers model. Right now i am waiting for torch to download.

Update attachment

Yeah finally i did it , i gave up. I downloaded a json from github which has all constitution articles but it did not have the parts so i addded the parts to each articles and prepared tehm like teh bns json for embedding. Many more pdfs left but they are easy. None is as complex as the constituion.

Update attachment

This is 10 x harder than I though it would be the structure of the constiution pdf is so wierd i have just been able to extract the parts so far, now i am working on the individual articles. Hopefully it will take less time in this part since this is similar to section extraction in bhartiya nyaya sanhita.

Update attachment

I have now started working on this, i prepared data for bhartiya nyaya sanhita. Split the pdf into sections using regex. I am getting one extra section i don't know where but is ok i guess. ITs just one and anyway later it will all become embeddings. Maybe it is an issue but for now iam going on with it. I have to prepare many more pdfs now. This will take a while.

Update attachment