Pakistani Legal Query Classification Dataset: Binary Legal vs. Non-Legal Query Filter
收藏资源简介:
A binary classification dataset to distinguish legal queries from non-legal queries, built for the PakLegalAid project. Part of the paper:"Enhancing Legal Assistance with Large Language Models: A Parameter-Efficient Fine-Tuning and Retrieval-Augmented Generation Approach" — Ahmed et al., submitted to PLOS ONE, 2025. Purpose:This dataset serves as the query filter at the entry point of the PakLegalAid pipeline. Before a query reaches the LLM, it is classified as legal or non-legal. Only legal queries proceed to the RAG and fine-tuned generation pipeline. Dataset Construction:- Legal queries (label = 1): ~4,000 real legal questions scraped from publicly accessible online legal forums and Q&A platforms- Non-legal queries (label = 0): ~4,000 samples drawn equally from three public Kaggle datasets — Yelp Reviews, IMDB Movie Reviews, and AG News — representing diverse everyday language clearly outside the legal domain Total: 8,000 samplesSplit: 80% train (6,400) / 20% test (1,600) Dataset Format:- question (string): The input query text- label (int): 1 = Legal query, 0 = Non-legal query Used for training and evaluating binary classification models including Naive Bayes, SVM, LSTM, GRU, DistilBERT, RoBERTa, and Legal-BERT in the PakLegalAid pipeline. For research purposes only. Not a substitute for professional legal advice.



