antonhome/indian-legal-supervised-fine-tuning-data
๐ฎ๐ณ LegalBrain Indic Legal Corpus A large-scale multilingual Indian legal dataset curated to support research in: Domain-specific LLM training Legal question answering Policy reasoning & case retrieval Agentic systems for legal workflow automation This dataset contains text drawn from publicly available legal sources across multiple Indian languages, including: English, Hindi, Marathi, Bengali, Kannada, Tamil, Telugu, Odia, and others. The corpus is structured and processedโฆ See the full description on the dataset page: https://huggingface.co/datasets/antonhome/indian-legal-supervised-fine-tuning-data.
๐ฎ๐ณ LegalBrain Indic Legal Corpus
A large-scale multilingual Indian legal dataset curated to support research in:
- Domain-specific LLM training
- Legal question answering
- Policy reasoning & case retrieval
- Agentic systems for legal workflow automation
This dataset contains text drawn from publicly available legal sources across multiple Indian languages, including: English, Hindi, Marathi, Bengali, Kannada, Tamil, Telugu, Odia, and others.
The corpus is structured and processed to be directly usable for supervised fine-tuning, RAG pipelines, and conversational legal assistants.
๐ฆ Dataset Structure
After preprocessing and supervised alignment, the dataset is provided in the format:
This enables training of:
- Legal chatbots
- Agentic reasoning systems
- Legal retrieval-augmented QA models
- Court case summarizers
- Argumentation-based LLM pipelines
๐๏ธ Data Sources
Data was collected only from publicly and legally accessible sources, including:
- Supreme Court judgments
- High Court decisions
- Law Commission reports
- Public legal textbooks & commentaries
- Open legal news archives
- Public domain legal Q&A portals
- Government acts, rules, and notifications
No proprietary or licensed content was used.
๐งน Cleaning & Normalization Pipeline
Large-scale legal data is noisy. The following steps were used:
- HTML + Boilerplate Removal Removal of menus, footers, ads, repeated headers, legal boilerplate markers.
- OCR + Text Correction OCR applied to scanned PDFs using Tesseract + custom normalization, followed by regex-based cleanup for:
- Section markers
- Citations
- Case line references
- Language Detection & Segmentation Auto-sharding by language โ Sentence & clause-level segmentation using spaCy + Indic NLP.
- De-duplication Removed near-duplicate clauses across multiple case reports using MinHash (LSH).
โจ Argilla-Based Supervised Dataset Construction
To transform unstructured text into (context, question, response) triplets, the dataset was processed using Argilla for human feedback and model-assisted annotation.
Workflow:
- Select meaningful legal text chunks (150โ600 words).
- Use a prompting pipeline to generate candidate questions and answers.
- Load candidate examples into Argilla workspace.
- Curate + refine:
- Fix hallucinations
- Improve citation grounding
- Ensure all responses strictly reference context
- Export final reviewed dataset to HF.
This ensures the dataset trains models that cite the law instead of hallucinating it.
๐๏ธ Example Entry
{
"context": "The right to constitutional remedies allows citizens to approach the Supreme Court under Article 32...",
"question": "Which constitutional provision allows an individual to directly move the Supreme Court?",
"response": "Article 32 of the Constitution grants the right to constitutional remedies, enabling citizens to directly approach the Supreme Court."
}