A sophisticated legal assistant powered by artificial intelligence that helps users understand legal matters, court judgments, and legal procedures in an interactive chat interface.
- 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
- 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
- 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
-
Vector Store System:
- Efficient document indexing
- Persistent storage with pickle
- MMR (Maximal Marginal Relevance) search
-
Document Processing:
- PDF directory loading
- Web content integration
- Recursive text splitting
-
Chat System:
- History management
- Multiple persona support
- Real-time response generation
- Clone the repository
git clone https://github.com/Abhishek676062/LegalAI.git- Install dependencies
pip install -r requirements.txt- Set up environment variables
GROQ_API_KEY=your_api_key_here- Run the application
streamlit run app.py-
Legal Research:
- Quick access to relevant laws and regulations
- Finding applicable court judgments
- Understanding legal procedures
-
Legal Documentation:
- Step-by-step guidance for filing requirements
- Document preparation assistance
- Timeline expectations
-
Professional Guidance:
- Recommendations for legal professionals
- Legal aid options
- Risk assessment
LegelAI/
├── app.py # Main Legal application file
├── data/ # PDF and legal document storage
├── vector_store.pkl # Persistent vector storage
└── README.md # Project documentation
- Integration with more legal databases
- Multi-language support
- Document generation capabilities
- Advanced case law analysis
- Mobile application development
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
I'm passionate about leveraging AI to make legal information more accessible and understandable. Let's connect and create something amazing together!
- Custom AI Agent Solutions
- Chatbot Development
- Document Processing Systems
- AI Integration Consulting
- Follow me for more AI updates and projects
- Star ⭐ this repo to show your support
- Share with others who might find it helpful
- Email: shabhishek055@gmail.com
- Open for freelance projects and collaborations
- Available for technical consultations
