Abstract:
The present work discusses the development of an advanced chatbot application leveraging state-of-the-art artificial intelligence techniques to enhance usability in modern mobile platforms. The application integrates Meta’s LLaMA model, Langchain, Prompt Engineering, Supabase, and Google’s generative AI, all orchestrated through a Flask-based backend API. This backend handles user requests, processes uploaded legal PDF documents, and generates context-aware, tailored legal guidance based on document content. The system’s backend is responsible for parsing and analyzing the legal texts, while the frontend, built using Flutter, facilitates seamless user interaction by allowing PDF uploads, real-time chatbot conversations, and language switching between English and Urdu. The application includes additional features such as Lawyer Cards, a community platform, and the ability to save processed PDFs. Supabase is employed for secure user authentication, enabling secure sign-in, sign-up, and password retrieval. The system is designed with scalability in mind, ensuring that both the frontend and backend can accommodate a growing number of users and diverse use cases. The modular separation of concerns between the Flask backend, responsible for decision-making and data processing, and the Flutter frontend, which ensures a responsive and efficient mobile experience, is a key design choice. This paper outlines the specific requirements, architectural design, and key decisions made throughout the development process, alongside detailed discussions on system testing to meet functional, security, and user-centric objectives.