Inspiration

Many people face legal issues such as online fraud, salary disputes, tenant conflicts, and consumer complaints but often do not know where to start. Legal information is usually scattered across multiple websites and written in complex language.

JusticePath was built to make legal guidance more accessible by combining legal awareness, AI assistance, semantic search, and document generation into a single platform.

What it does

JusticePath provides five major features:

  • Browse Your Rights: Search and explore legal rights across multiple categories.
  • Problem Analyzer: Analyze a legal issue and identify relevant authorities, evidence requirements, and next steps.
  • Complaint Draft Generator: Generate professional complaint letters and export them as PDF documents.
  • Document Language Simplifier: Convert complex legal text into plain English.
  • Legal Research Assistant: Retrieve relevant legal information using semantic search and AI-generated responses.

How we built it

The application was developed entirely in Python using Streamlit as the frontend framework.

Legal rights were organized into a structured JSON knowledge base. SentenceTransformers was used to generate embeddings for legal records, while FAISS was used to perform semantic similarity search. Gemini AI was integrated for legal text simplification, contextual explanations, and response generation. FPDF was used for complaint document export functionality.

The application was deployed using Streamlit Cloud.

Challenges we ran into

One challenge was creating a legal knowledge base that could support multiple features including search, classification, complaint generation, and semantic retrieval.

Another challenge was moving beyond simple keyword matching. Users often describe legal issues differently, so semantic embeddings and FAISS were implemented to improve retrieval quality.

Generating PDF documents also introduced encoding issues caused by AI-generated text and special Unicode characters. Additional text sanitization was required to ensure successful PDF exports.

Accomplishments that we're proud of

  • Built an end-to-end AI-powered legal assistance platform.
  • Implemented semantic search using FAISS and SentenceTransformers.
  • Integrated Gemini AI for simplification and contextual guidance.
  • Developed automated complaint generation with PDF export.
  • Successfully deployed the application as a public web application.

What we learned

Through this project we gained practical experience with:

  • Retrieval-Augmented Generation (RAG)
  • Semantic search and vector databases
  • AI integration using Gemini
  • Streamlit deployment
  • PDF document generation
  • Knowledge base design
  • End-to-end Python application development

What's next for JusticePath

Future improvements include:

  • Larger legal knowledge bases
  • State-specific legal information
  • Multilingual support
  • More accurate legal classification models
  • Additional complaint templates
  • Advanced document analysis capabilities

Built With

Share this project:

Updates