Skip to content

AshutoshDevgotra/nyaysetu-llm-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NyaySetu LLM RAG

A legal document question-answering system built with RAG (Retrieval-Augmented Generation) using LangChain, FAISS, and Llama3.

Features

  • Extract text from PDF legal documents
  • Build vector store for efficient document retrieval
  • FastAPI web server for question answering
  • Local LLM integration with Ollama (Llama3)
  • CORS enabled for frontend integration

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Extract PDF texts:
python extract_pdf_to_json.py
  1. Build vector store:
python build_vectorstore.py
  1. Run the FastAPI server:
uvicorn app:app --reload

API Endpoints

  • GET / - Welcome page
  • POST /ask - Submit legal questions

Requirements

  • Python 3.11+
  • Ollama with Llama3 model installed
  • PDF documents in the pdfs/ folder

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages