Skip to content

LegalAI - A Legal AI Assistant with customization. A sophisticated legal assistant powered by artificial intelligence that helps users understand legal matters, court judgments, and legal procedures in an interactive chat interface.

License

Notifications You must be signed in to change notification settings

Abhishek676062/LegalAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Legal Assistant 🤖⚖️

A sophisticated legal assistant powered by artificial intelligence that helps users understand legal matters, court judgments, and legal procedures in an interactive chat interface.

Demo 🎥

▶️ Click Here to Watch Full Demo Video

Key Features 🌟

  • Interactive Chat Interface: WhatsApp-style chat interface for natural conversations
  • Multiple Persona Modes:
    • Layperson (simple, non-technical)
    • Legal Professional (detailed, citations)
    • Concise (short answers)
    • Verbose (step-by-step explanations)
  • Comprehensive Legal Information:
    • Case summaries and query overviews
    • Step-by-step actionable items
    • Applicable laws and regulations
    • Legal procedures and documentation
    • Professional guidance

Screenshots 📸

AI Legal Assistant Interface

AI Legal Assistant with multiple persona modes and interactive chat interface

Technologies Used 🛠️

Core Technologies

  • Python with Streamlit for the web interface
  • Groq for advanced language model capabilities
  • FAISS for efficient vector similarity search
  • HuggingFace for embeddings (sentence-transformers)
  • LangChain for AI/LLM application framework

Key Libraries and Tools

  • langchain_groq: For integration with Groq's language models
  • langchain_community: For document loading and processing
  • PyPDF: For PDF document processing
  • Wikipedia API: For accessing legal references
  • Arxiv API: For academic legal research
  • CUDA Support: GPU acceleration when available

System Architecture 🏗️

  1. Vector Store System:

    • Efficient document indexing
    • Persistent storage with pickle
    • MMR (Maximal Marginal Relevance) search
  2. Document Processing:

    • PDF directory loading
    • Web content integration
    • Recursive text splitting
  3. Chat System:

    • History management
    • Multiple persona support
    • Real-time response generation

Getting Started 🚀

  1. Clone the repository
git clone https://github.com/Abhishek676062/LegalAI.git
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables
GROQ_API_KEY=your_api_key_here
  1. Run the application
streamlit run app.py

Use Cases 💡

  1. Legal Research:

    • Quick access to relevant laws and regulations
    • Finding applicable court judgments
    • Understanding legal procedures
  2. Legal Documentation:

    • Step-by-step guidance for filing requirements
    • Document preparation assistance
    • Timeline expectations
  3. Professional Guidance:

    • Recommendations for legal professionals
    • Legal aid options
    • Risk assessment

Project Structure 📁

LegelAI/
├── app.py              # Main Legal application file
├── data/              # PDF and legal document storage
├── vector_store.pkl   # Persistent vector storage
└── README.md          # Project documentation

Future Enhancements 🔮

  • Integration with more legal databases
  • Multi-language support
  • Document generation capabilities
  • Advanced case law analysis
  • Mobile application development

Contributing 🤝

Contributions are welcome! Please feel free to submit a Pull Request.

License 📝

This project is licensed under the MIT License - see the LICENSE file for details.

Connect & Collaborate 🤝

I'm passionate about leveraging AI to make legal information more accessible and understandable. Let's connect and create something amazing together!

Professional Services 💼

  • Custom AI Agent Solutions
  • Chatbot Development
  • Document Processing Systems
  • AI Integration Consulting

Stay Updated 🌟

  • Follow me for more AI updates and projects
  • Star ⭐ this repo to show your support
  • Share with others who might find it helpful

Get in Touch 📫

  • Email: shabhishek055@gmail.com
  • Open for freelance projects and collaborations
  • Available for technical consultations

Show Your Support

⭐ Star this repo if you found it helpful!

🔄 Share with the community

👥 Open for collaborations

About

LegalAI - A Legal AI Assistant with customization. A sophisticated legal assistant powered by artificial intelligence that helps users understand legal matters, court judgments, and legal procedures in an interactive chat interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages