Pakistani Legal AI

Law, made legible
for everyone.

QanoonDaan is a free AI assistant that answers questions about Pakistani law in plain language — in English, Roman Urdu, or اردو.

Access to legal knowledge should not depend on who you can afford.

Pakistan has a 220 million strong population, and most people have never consulted a lawyer. Legal jargon, high fees, and language barriers keep ordinary citizens from understanding their own rights — even when those rights are being violated.

QanoonDaan was built to change that. By grounding AI responses in actual Pakistani statutes, it gives anyone with a phone the ability to ask a legal question and get a clear, cited, and honest answer — with a consistent reminder to consult a qualified lawyer for their specific situation.

3+
Languages supported — English, Roman Urdu, and اردو
RAG
Retrieval-Augmented Generation — answers grounded in real statutes, not guesswork

You ask a question

Type or speak your question in any language — English, Roman Urdu, or Urdu script. The system detects your language automatically and handles the query accordingly.

Multilingual Input · Voice Recognition

Retrieval across Pakistani statutes

A hybrid retrieval engine combines BM25 keyword search with dense vector similarity to find the most relevant sections from a curated database of Pakistani laws — from the PPC to PECA to the Family Laws Ordinance.

BM25 · FAISS Vector Search · Section-Number Boosting

Grounded answer generation

Retrieved sections are passed to a large language model (Llama 3.3-70B via Groq) with a hardened prompt that instructs the model to cite statutory sources, avoid hallucination, and always recommend professional legal advice for case-specific situations.

Llama 3.3-70B · Groq · Anti-Hallucination Prompting

Answer delivered — and also on WhatsApp

You get a clear, plain-language answer with a legal disclaimer. The same pipeline runs inside a WhatsApp bot via the Meta Cloud API, meaning QanoonDaan works on any phone without needing a browser.

FastAPI · WhatsApp Bot · Meta Cloud API
Python · FastAPI
FAISS · BM25
Llama 3.3-70B
Groq Inference
Hugging Face Spaces
Meta Cloud API
Jinja2 · Vanilla JS

QanoonDaan's knowledge base currently covers the following Pakistani statutes. Answers are grounded only in these sources — if a question falls outside this scope, QanoonDaan will say so rather than guess.

The Constitution of Pakistan, 1973
Pakistan Penal Code, 1860 (PPC)
Code of Criminal Procedure, 1898 (CrPC)
Criminal Laws (Amendment) Act, 2023
Family Laws
Labour Laws
Prevention of Electronic Crimes Act, 2016 (PECA)
PECA (Amendment) Act, 2025
Hasnain Zainulabdin
Hasnain Zainulabdin
AI / ML Engineer · Python Developer

Software Engineering graduate from the University of Sindh, Jamshoro, and alumnus of the SMIT AI & Data Science program. Built QanoonDaan from scratch — PDF ingestion, hybrid retrieval, multilingual inference, and WhatsApp integration — as a practical demonstration of what RAG-powered AI can do for underserved communities in Pakistan.