ALLY is a digital platform designed to streamline and secure the process of finding legal assistance and managing initial legal interactions. It connects clients with legal professionals, facilitates preliminary consultations, and organizes virtual legal processes, aiming to make legal services more accessible, efficient, and secure.
ALLY offers a suite of features designed to improve the legal engagement process:
- 🤖 AI-Powered Legal Assistant (RAG): An advanced chatbot that answers legal questions by retrieving relevant information from cases of Philippine Supreme Court. Uses fine-tuned Gemini models, Pinecone cloud vector database, and semantic search to provide accurate, citation-backed legal information in real-time.
- 🗂 Virtual Legal Process Organization: Provides a secure, centralized repository for document uploads and management, significantly reducing reliance on physical paperwork and improving accessibility.
- 💬 On-the-Spot Online Consultations: A temporary, real-time chat system for clients to ask quick legal queries and receive immediate preliminary advice. Designed with privacy in mind, messages are not stored long-term.
- 📈 Case Tracking and Updates: Keeps clients informed with automated email notifications on case progress. A unique case tracking ID allows clients to independently check their case status on the platform.
- 🔐 Security and Privacy: Ensures the highest level of security with end-to-end encryption for all communications and data. Multi-factor authentication adds an extra layer of protection for user accounts.
To get a local copy up and running, follow these simple steps:
git clone <repository_url>- Navigate to the backend directory.
- Install dependencies.
- Configure the database connection (MySQL).
- Run the Spring Boot application.
The Backend API Documentation will be available at http://localhost:8080/swagger-ui/index.html
- Navigate to the RAG directory.
- Create and activate Python virtual environment.
- Install Python dependencies (
pip install -r requirements.txt). - Configure environment variables (Create
.envfile).
Start the ALLY FastAPI server:
uvicorn main:app --host 0.0.0.0 --port 8000 --reloadThe RAG API will be available at http://localhost:8000
For detailed RAG setup instructions, see Ally-FinetuneRAG/readme.md
- Navigate to the frontend directory.
- Install dependencies (npm install).
- Configure API endpoint (if needed) in your config file
Start the development server:
npm run devOpen your browser at http://localhost:5173
React Frontend (Vite - Port 5173)
↓
Spring Boot Backend (Port 8080)
↓
Ally-FinetuneRAG FastAPI (Port 8000)
↓
Pinecone Cloud Vector DB + Vertex AI Fine-tuned Model
The main Spring Boot backend communicates with the FastAPI RAG service for AI-powered legal assistance.
- Backend: Spring Boot (Java)
- Frontend: ReactJS (Vite)
- RAG Service: Python (FastAPI)
- Database:
- MySQL (backend application data)
- Pinecone (cloud vector database for RAG)
- Qdrant (optional - local vector database for testing)
- AI Model: Google Gemini Flash 2.0 - Lite (Fine-tuned via Vertex AI)
- ML Embeddings: BAAI/bge-large-en-v1.5
- Context Classification: Gemini Base Model for context classification and query routing
- Vector Search: Pinecone Cloud (Production), Qdrant (Local Testing - Optional)
The ALLY Legal Assistant uses Retrieval-Augmented Generation (RAG) to provide accurate legal information:
- Data Processing: Philippine Supreme Court cases are processed from CSV files into semantic chunks
- Embedding Generation: Each chunk is converted to a 1024-dimensional vector using BAAI/bge-large-en-v1.5
- Vector Storage: Embeddings are stored in Pinecone cloud vector database for fast similarity search
- Query Processing: User questions are embedded and matched against stored case vectors
- Response Generation: Relevant cases are retrieved and passed to a fine-tuned Gemini model for natural language response
For detailed RAG setup instructions, see Ally-FinetuneRAG/readme.md
| Profile | Name | Role | GitHub Username |
|---|---|---|---|
| Vicci Louise Agramon | Backend Developer | @Xansxxx3 | |
| Piolo Frances Enriquez | Lead/Frontend Developer | @piolonrqz | |
| Darwin Darryl Largoza | UI/UX Designer | @Dadaisuk1 | |
| Nathan Rener Malagapo | Backend & RAG/AI Developer | @sytrusz | |
| Jerjen Res Pangalay | Backend/Frontend Developer | @jerjenres |
- Philippine Supreme Court for case data: elibrary
- Google Vertex AI for model infrastructure
- Pinecone for cloud vector database services
- BAAI/bge-large-en-v1.5 and sentence-transformers for embeddings
@misc{bge_embedding,
title={C-Pack: Packaged Resources To Advance General Chinese Embedding},
author={Shitao Xiao and Zheng Liu and Peitian Zhang and Niklas Muennighoff},
year={2023},
eprint={2309.07597},
archivePrefix={arXiv},
primaryClass={cs.CL}
}This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Team 23 - ALLY Development Team
All contributors retain equal rights to this codebase.
This is legal information, not legal advice. ALLY provides general information about Philippine law based on Supreme Court cases. For specific legal situations, consult a licensed Philippine lawyer.
For any inquiries or feedback, please contact the project team via their respective GitHub profiles listed above.