Project Overview

Legal Assistant is a lightweight, AI-powered web application that helps users analyze legal documents and get simple explanations to legal questions through an integrated chatbot. Designed to make legal language accessible to everyone, this free tool supports both legal professionals and everyday users seeking clarity on contracts, policies, and more.

Key Features

  • Document Analysis: Automatically summarizes uploaded legal text and extracts key clauses and named entities.
  • Legal Chatbot: Built-in conversational agent trained to answer general legal questions in plain language.
  • Free & Accessible: Open to all users with no sign-up required, easily deployable locally using Streamlit and FastAPI.
  • Dual Interface: Tabbed layout for separate access to analysis and chat modes.

How It Works (Step-by-Step)

  1. User Input: The user pastes legal text or asks a legal question via the web interface.
  2. Backend Processing: A FastAPI server receives the request and sends prompts to a locally running LLaMA2 model using Ollama.
  3. LLM Response: The model returns a summary, clauses, named entities, or chatbot answers based on the prompt.
  4. Display Results: Streamlit frontend presents the structured output in a clean layout.

Applications

  • Contract reviews by non-lawyers
  • Explaining legal documents in simple language
  • Onboarding legal interns with tool-based learning
  • Integrating into other legal-tech systems as a module

Project Timeline

Duration: 2 days

The full stack was developed using Python, Streamlit for UI, and FastAPI for backend logic, with LLaMA2 running locally for offline LLM processing. No cloud services are required.

Conclusion

Legal Assistant is a practical tool for bridging the gap between legal knowledge and everyday understanding. Its fast deployment and no-cost accessibility make it an excellent choice for students, startups, and legal advisors looking for smart document analysis and conversational AI support in one place.

Project Information

  • Category: AI, Legal Tech
  • Duration: 2 days
  • Completed: 2025
  • Institution: University at Buffalo

Technologies Used

Python
Streamlit
FastAPI
LLaMA2 (Ollama)

Interested in this project?

If you're interested in learning more about the Legal Assistant project, deploying your own version, or exploring collaborations in legal tech, feel free to reach out.

Contact Me