Skip to content

subki72/Legal-Chatbot

Repository files navigation

⚖️ AI Legal Assistant - Indonesian Law

Python FastAPI Streamlit Docker LlamaIndex

An intelligent chatbot designed to assist users in understanding Indonesian Law regulations. Unlike traditional chatbots, this system employs Advanced RAG (Retrieval-Augmented Generation) with Re-ranking capabilities to ensure high accuracy and context-aware responses based on official legal documents (UU LLAJ, etc.).


Key Features

  • Advanced RAG Architecture: Uses a retrieve-then-rerank approach to fetch the most relevant legal articles before generating answers.
  • High-Performance LLM: Powered by Llama 3 (via Groq API) for fast and accurate reasoning.
  • Transparent Citations: Every answer includes references to the specific legal documents and page numbers used.
  • Dockerized: Fully containerized with Docker Compose for easy deployment and scalability.
  • Monitoring: Integrated with LangSmith/Terminal Logging for tracking token usage and latency.

Tech Stack

  • Core Framework: LlamaIndex
  • LLM Provider: Groq (Llama 3.3 model)
  • Vector Database: ChromaDB (Persistent storage)
  • Embedding Model: HuggingFace (sentence-transformers)
  • Backend: FastAPI
  • Frontend: Streamlit
  • DevOps: Docker & Docker Compose

Project Structure

Legal-Chatbot/
├── backend/             # FastAPI Server & RAG Engine
├── frontend/            # Streamlit User Interface
├── Data/                # PDF Legal Documents & Vector Store
├── docker-compose.yml   # Orchestration for services
├── Dockerfile.backend   # Backend container config
├── Dockerfile.frontend  # Frontend container config
└── requirements.txt     # Python dependencies

About

An AI-powered Legal Assistant utilizing Advanced RAG (LlamaIndex), Vector Search, and LLM to provide accurate insights into Indonesian Law. Built with FastAPI, Streamlit, and Docker.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages