What is CyberLaw Bot?
An AI assistant that answers questions about Pakistani criminal law — the
Code of Criminal Procedure (CrPC), Pakistan Penal Code (PPC),
PECA 2016, and the PECA 2025 Amendment — in English
and Urdu.
How it works (Retrieval-Augmented Generation)
- Your question is converted into a numerical embedding.
- The most relevant statute sections are retrieved from a custom vector index of
2,373 indexed provisions.
- Gemini writes an answer grounded only in those sections and cites them.
Every answer shows the exact sources it used, so you can verify each claim.
Tech stack
FastAPI backend · Google Gemini (embedding + generation) · a custom NumPy
cosine-similarity vector search. No LangChain and no external vector database — the
retrieval engine is hand-built. Typical response time is under 5 seconds.
Important
CyberLaw Bot provides legal information, not legal advice, and does not create
a lawyer–client relationship. Always confirm with a qualified lawyer and official sources
before acting.
Your privacy
- No accounts, no login, no personal data collection.
- No PII retention. Conversations live in server memory for the current
session only and are never written to a database. They disappear on “New Chat”
or when the server restarts.
- No cookies, trackers, or analytics.
- Feedback is anonymous. If you rate an answer, we store only the vote, a
timestamp, and a one-way hash of the question — never the raw text and never your
identity.
Third parties
Your question is sent to Google Gemini to generate the answer, subject to Google's terms. We do
not share data with any other third party.
Please do not share
Do not enter anyone's private or identifying information (names, CNIC numbers, phone numbers,
addresses). Ask about the law in general terms.
Terms of use
- Information only — not legal advice. Using CyberLaw Bot does not
create a lawyer–client relationship.
- Verify before acting. Laws and section numbers change; always confirm with
official sources and a qualified lawyer.
- No liability. The tool is provided “as is” for a hackathon
demonstration. We are not liable for any action taken based on its output.
- Lawful use only. Do not use it to plan or conceal illegal activity, and do
not submit other people's private data.
- Emergencies. If you or someone else is in danger, contact the police (15)
or the relevant helpline immediately — do not rely on this bot.