Sadatsami/bangladesh-law-professional
🇧🇩 Bangladesh Law Professional Dataset A clean, instruction-tuned (Alpaca-style) question–answer dataset for fine-tuning language models on Bangladesh law, in Bangla and English. 👤 Author & Contribution Curated & built by Sadat Sami (@Sadatsami) Role Dataset architect — collected, cleaned, filtered, reformatted and published Motivation Build a small-but-high-quality Bangla legal corpus to fine-tune a lightweight LLM (e.g. Qwen2.5-0.5B via… See the full description on the dataset page: https://huggingface.co/datasets/Sadatsami/bangladesh-law-professional.
🇧🇩 Bangladesh Law Professional Dataset
A clean, instruction-tuned (Alpaca-style) question–answer dataset for fine-tuning language models on Bangladesh law, in Bangla and English.
👤 Author & Contribution
This dataset is independently curated and published by the author. All cleaning, Q&A conversion, deduplication, train/validation splitting and publishing were done by the author.
🎯 Purpose (What this is for)
This dataset is designed to fine-tune small open-weight LLMs so they can answer questions about Bangladesh law in Bangla and English. Typical use cases:
- 🏋️ LoRA / QLoRA / full fine-tuning of small models (Qwen2.5-0.5B, Gemma-2B, etc.)
- 🤖 Building a Bangla legal assistant / chatbot
- 📚 Teaching a model the structure of Bangladeshi statutes (sections, acts, ordinances)
- 🔬 Experiments in low-resource legal NLP for Bangla
It is not legal advice. The content is extracted from public statutes and encyclopedic articles and may be outdated. Always verify against the official Gazette of Bangladesh.
📊 Dataset Summary
🗂️ Sources
The corpus is compiled from public-domain Bangladeshi statute text and Bengali encyclopedic law articles, then cleaned and reformatted into natural question–answer pairs by the author.
- Bangladeshi statutes & ordinances (Penal Code 1860, CrPC 1898, Labour Act, Company Act, Succession Act, etc.) — public-domain government works.
- Bengali Wikipedia law articles (বাংলাদেশের আইন, বাংলাদেশের সংবিধান, দণ্ডবিধি ১৮৬০, ফৌজদারি কার্যবিধি ১৮৯৮, শিশুশ্রম আইন, etc.).
📝 Format
Each line of train.jsonl / validation.jsonl / benchmark.jsonl is a JSON object:
{
"instruction": "If someone violates section 'Resistance to execution.' of The Code of Civil Procedure, 1908, what are the legal consequences?",
"input": "",
"output": "74. Where the Court is satisfied that the holder of a decree ...",
"metadata": {
"act_name": "The Code of Civil Procedure, 1908",
"section": "Resistance to execution.",
"chapter": "",
"year": "1908",
"category": "Civil",
"language": "en",
"source": "Bangladesh Code (public statute)",
"citation": "The Code of Civil Procedure, 1908 (ACT, 1908) s.Resistance to execution."
},
"rag": {
"document": "The Code of Civil Procedure, 1908",
"chunk": "74. Where the Court is satisfied ...",
"citation": "The Code of Civil Procedure, 1908 (ACT, 1908) s.Resistance to execution."
}
}Question styles include: direct citation, explanation, scenario-based, and importance — so the model learns varied phrasings, not just verbatim quotes.
🚀 Usage
from datasets import load_dataset
ds = load_dataset("Sadatsami/bangladesh-law-professional")
print(ds["train"][0])LoRA fine-tune example (Qwen2.5-0.5B):
# instruction/output pairs map directly to your trainer's prompt template
for row in ds["train"]:
prompt = f"### Instruction:\n{row['instruction']}\n\n### Response:\n{row['output']}"⚠️ Limitations
- Statutes may have been amended after the source snapshots were taken.
- English-variant instructions are auto-generated for diversity (~23% of rows).
- Encyclopedic rows are summaries, not verbatim law text.
📄 License
Apache-2.0. Compiled Q&A pairs released under Apache-2.0 by the author. Source statutes are public-domain government works; encyclopedic text is CC-BY-SA.
Curated with care by Sadat Sami. 🙏
