Enhance AI Chat System (UI + Intelligence) for LegalAI Web Platform

Job ID: 39638015

Budget: ₹1,500 – ₹12,500 INR

Project Overview:
We are building LegalAI, a global AI-based legal assistant platform. At the initial launch phase, the focus is on two key features:

AI Legal Chat

Legal Case Prediction

We are looking to redesign and upgrade the current AI chat experience to look professional, intuitive, responsive, and deliver accurate legal guidance using LLMs.

Objectives:
Revamp the frontend chat UI to look modern and intuitive (like ChatGPT).

Improve response accuracy and tone from the backend (LLM or API).

Add prompt engineering and context memory.

Integrate RAG-based retrieval from legal documents (optional stretch goal).

Fix or migrate from current OpenAI API issues (quota/exceeding, poor accuracy).

Deliverables:
1. Chat UI/UX Improvements
Chat bubbles for user & assistant

Typing animation (streaming response)

Dark/light mode (optional)

Suggested prompts below chat window (e.g. “Explain this section”)

Support for mobile responsiveness

Message history for context (last 3–5 messages)

2. Backend Enhancements
Integrate with Groq API (Mistral 8x7B) or Claude AI

Support for system prompts to guide legal tone

Add basic chat memory/context windowing

Graceful error handling (e.g., “Quota exceeded” message)

Optional: LLM switching logic (OpenAI → Claude → Mistral fallback)

3. Prompt Engineering & Legal Tone
System prompt that sets tone:

“You are LegalAI, a multilingual legal assistant trained on IPC, CrPC, US Law, and international case studies. You provide fact-based, concise answers with relevant sections or citations.”

Optional: Add personality traits to make the AI more conversational yet authoritative.

4. (Optional) Retrieval-Based Answering (RAG)
Index legal PDFs, articles, or laws (e.g., IPC, CrPC)

Add vector database (e.g. Chroma, Pinecone)

Integrate via LangChain or LlamaIndex