Manuscript Offprint
arXiv:2610.40518IndicIPR-QA: A Benchmark for Extractive Question Answering on Indian IPR Laws
M. Mohaiminul Islam
Department of Computer Science and Engineering
South Asian University, New Delhi, India
Muhammad Abulaish , SMIEEE
Department of Computer Science and Engineering
South Asian University, New Delhi, India
Abstract—Legal Question Answering (QA) over statutory texts is a challenging task in Natural Language Processing (NLP), especially in low-resource settings with complex legal systems. It requires answers that are precise and grounded in the law. However, to the best of current knowledge, no existing extractive QA benchmark provides exact answer spans from statutory texts across all seven Indian Intellectual Property Rights (IPR) Acts. This paper presents IndicIPR-QA , an extractive QA benchmark for Indian IPR laws. The proposed dataset contains 4,462 QA pairs from 1,116 statutory contexts across seven Acts. Questions and answers are generated using GPT-4o and validated through nine automatic quality checks, single and multi-model LLM evaluations, and a 200-pair human audit. Section-level partitioning prevents source-context overlap across the training, validation, and test sets. Further analysis examines answer span length, lexical overlap, and multi-clause structure across the corpus and individual Acts. BM25 achieves a token-level F1 score of 20.21, while fine-tuned InLegalBERT reaches 85.02 under a unified sliding-window inference protocol. The large performance gap between BM25 (20.21 F1) and InLegalBERT (85.02 F1) shows that simple word matching is not enough to answer these legal questions. Performance also varies across the seven Acts, indicating substantial differences in answer-extraction performance.
Index Terms—IndicIPR-QA Dataset, Legal NLP, Extractive QA, Indian IPR Law, Quality Validation.
I. INTRODUCTION
Intellectual Property Rights (IPR) law covers many economically and socially important areas including pharmaceutical innovation, creative works, agricultural plant varieties, and region specific products. In India, IPR law is covered by seven principal statutes: the Patents Act, 1970; the Trade Marks Act, 1999; the Copyright Act, 1957; the Designs Act, 2000; the Geographical Indications of Goods (Registration and Protection) Act, 1999; the Semiconductor Integrated Circuits Layout-Design Act, 2000; and the Protection of Plant Varieties and Farmers' Rights Act, 2001. Although these Acts belong to the same legal domain, each covers different subject matter and uses its own terminology, procedures, exceptions, and cross references. As a result, finding the relevant legal provision can be difficult for legal professionals, researchers, and other stakeholders. A startup may need to determine trademark registration requirements; an inventor may need the legal conditions for patentability; a farmer or breeder may need information on plant-variety rights; and a designer or copyright owner may need to identify available forms of protection or remedies. The required information is present in the legislation, but it is often buried in long multi-clause provisions, nested subsections, and specialised legal language. The challenge is therefore not simply accessing the law, but locating a precise and traceable answer within it.
Statutory Question Answering (QA) also creates a specific evaluation challenge. A plausible paraphrase may be unsuitable when the exact wording of the law is required, while returning an entire provision may be correct but unnecessarily long. A useful benchmark should therefore evaluate both whether the relevant provision is found and whether the answer span is selected correctly. These considerations motivate IndicIPR-QA's focus on answer in context validity, span minimality, source-separated splits, and item-level error analysis.
Extractive QA provides a suitable setting for this problem because each predicted answer can be traced directly to its source provision. However, existing QA benchmarks are mainly general domain, contract based, non extractive, or focused on court judgments rather than Indian statutory IPR law. IndicIPR-QA addresses this gap by providing a benchmark for developing and evaluating statutory search and grounded legal QA systems. It is intended as a research benchmark, not as a deployed legal advice system. The major contributions of this paper can be outlined as follows:
-
IndicIPR-QA contains 4,462 extractive QA pairs from 1,116 statutory contexts covering seven major Indian IPR Acts. The quality of the dataset is validated through nine automatic checks, LLM based evaluation, and a 200 pair human audit by two law graduates.
-
The analysis studies answer length, word overlap between questions and legal texts, multi-clause answers, and differences in answer extraction performance across the seven Acts.
-
Four BERT-based encoders and three open LLMs are benchmarked. BM25 achieves a token level F1 of 20.21, while InLegalBERT reaches 85.02, giving a 64.81 point gap that shows that simple word matching is not enough for this task (Section V).
Corresponding author: abulaish@ieee.org
Dataset: https://huggingface.co/datasets/niloycste68/IndicIPRExtractiveQA; code: https://github.com/niloycste/Indic-IPR-Dataset-
These datasets also differ in how they evaluate legal QA. Retrieval benchmarks mainly measure whether the relevant legal provision is found, whereas extractive QA also requires the correct start and end positions of the answer within that provision. Multiple choice and generative tasks do not directly measure whether the predicted answer matches the source text. Extractive QA is therefore useful when answers need to remain directly grounded in the law. In this setting, answer quality depends not only on finding the correct provision but also on selecting an appropriate answer span.
Research on Indian legal NLP has explored domain-specific language modelling and tasks such as legal statute identification, judgment segmentation, and court appeal prediction . Statutes and judgments have different structures and purposes: statutes define rules through sections, definitions, provisions, and cross-references, while judgments explain how those rules are applied to specific disputes. LLM assisted data construction provides a scalable alternative to fully manual annotation, but it can also introduce incorrect spans, repeated question patterns, and inconsistent answer boundaries. These issues make careful quality control important when building automatically generated QA datasets.
Overall, existing resources cover legal retrieval, reasoning, contracts, judgments, and broader intellectual property tasks. To our knowledge, existing resources do not provide an extractive QA benchmark covering all seven major Indian IPR Acts. IndicIPR-QA addresses this gap by providing extractive QA pairs with answer spans directly grounded in Indian statutory text, along with quality checks.
III. DATASET CONSTRUCTION
The dataset construction proceeded in five phases: corpus creation, QA generation, quality control, section level splitting, and audit/validation. Fig. 1 and Algorithm 1 provide an overview of the full pipeline, from raw statute text to the curated benchmark.
Algorithm 1 IndicIPR-QA: From raw statutes to curated benchmark
Input: Act PDF set ; chunk size
Output: Curated dataset , retained contexts , and splits
Step 1: Corpus extraction
1:
2: for all do
3: // TOC removal, body start detection
4: // Remove editorial lines, normalize whitespace
5: // Sentence-safe chunking
6: end for
7: // 1,173 valid contexts
Step 2: QA pair generation
8:
9: for all do
10: // GPT-4o; up to 5 extractive QA pairs
11: end for
// 5,721 raw candidate pairs
Step 3: Quality control and context-balanced selection
12: // 4,689 pairs after automatic filtering
13: // Score-based selection
14: // 1,116 retained statutory contexts
Step 4: Section-level dataset splitting
15: // 681 unique statute sections
16: // Per-Act split, seed 42;
3,710/408/344
Step 5: Audit and validation
17: LLMJUDGEAUDIT(, GEMMA-3:12B) // Single-judge audit
18: LLMJUDGEAUDIT(, ENSEMBLE-3) // Three-model ensemble
19: HUMANVALIDATION() // 200-pair sample, 2 annotators
20: return ,
A. Source Corpus and QA Generation
The full text of all seven Indian IPR Acts is collected from official Government of India PDFs available on the India Code portal (https://www.indiacode.nic.in/) using pdfplumber. During preprocessing, table of contents pages were removed, editorial amendment markers such as “Ins.,” “Subs.,” and “w.e.f.” were deleted, and whitespace was normalised. The cleaned text is then divided into 1,173 paragraph-level contexts, each about 1,400 characters long, while preserving sentence and section boundaries. These chunks are called statutory contexts throughout the paper.
For each context, GPT-4o [12] is prompted to generate up to five QA pairs. The prompt requires a structured JSON output, questions based on specific facts or legal provisions, and answers copied exactly from the context. It also prohibits paraphrased answers, yes/no or vague questions, answer leakage, and near-duplicate questions. The full GPT-4o generation prompt and generation script are provided in the public repository. This process generated 5,721 raw QA candidates.
B. Nine-Step Quality Control Pipeline
All 5,721 raw pairs pass through nine sequential filters. F1 checks for non empty fields; F2 verifies that the answer is an exact span from the context; F3 keeps answers from 5 to 350 characters; F4 keeps answers covering less than 85% of the context; F5 requires questions to contain at least five words, end with a question mark, and avoid vague section-summary phrasing; F6 removes questions that contain the answer; F7 removes incomplete contexts; F8 removes editorial amendment markers from answers; and F9 removes standalone 1 to 4 digit answers. Together, these filters remove schema errors,
https://github.com/niloycste/Indic-IPR-Dataset-

Fig. 1. End-to-end IndicIPR-QA construction. Human-audit percentages denote joint acceptability on the 200-pair sample; LLM scores are post-hoc diagnostics.
unsupported answers, overly short or overly long spans, weak questions, and extraction artefacts.
F3 and F4 remove 595 and 417 pairs, respectively, accounting for 1,012 of the 1,032 automatic exclusions. This shows that answer span length is the main source of automatic filtering. The remaining 4,689 pairs then undergo context balanced selection. Candidates are ranked based on the length of questions and answers while maintaining coverage across contexts. This produces the final 4,462 QA pairs from 1,116 statutory contexts. Removing this selection step reduces test F1 by 1.34 points (Table II). Finally, section level partitioning creates training, validation, and test sets of 3,710/408/344 QA pairs, with no shared source context across the splits.
C. Pipeline Ablation Study
To assess the contribution of each filter, a leave one filter out ablation is performed while keeping the remaining eight filters active. Table I reports the number of additional candidates admitted when each filter is disabled.
The results show that F3 and F4 have the largest effect on the accepted set. Disabling F3 admits 368 additional potentially noisy pairs (+7.8% relative to the 4,689 pair baseline), while disabling F4 admits 417 additional pairs (+8.9%). The main automatically detected issue is answer span length: generated spans are often either too short to be informative or too long, covering most of the source context.
D. Model Level Filter Ablation
To test whether the quality control pipeline affects model performance, InLegalBERT is trained on six different training-data variants while keeping the validation and test sets fixed. All variants in Table II, including the clean-selected reference, are trained separately in this ablation study. The main baseline model in Table VII is trained separately.
Table II shows that the largest drop in F1 comes from the selection step rather than from any single filter. Removing context balanced selection (heuristic all) lowers F1 by 1.34 points. Using all structurally valid raw candidates lowers F1 by 0.67 points, while removing F4 alone lowers it by 0.21 points.
TABLE I QUALITY-FILTER ANALYSIS OF THE 5,721 RAW GPT-4O GENERATED CANDIDATE QA PAIRS. SEQUENTIAL FILTERING APPLIES FILTERS F1 TO F9 IN ORDER. PER-FILTER ABLATION OMITS EACH FILTER INDIVIDUALLY WHILE KEEPING THE REMAINING FILTERS ACTIVE.
| ID | Filter criterion | Sequential filtering | Per-filter ablation | ||
|---|---|---|---|---|---|
| Removed | Retained | Recovered pairs | Accepted | ||
| F1 | Required fields | 0 | 5,721 | 0 (0.0%) | 4,689 |
| F2 | Answer in context | 0 | 5,721 | 0 (0.0%) | 4,689 |
| F3 | Answer length 5-350 | 595 | 5,126 | 368 (7.8%) | 5,057 |
| F4 | Coverage <85% | 417 | 4,709 | 417 (8.9%) | 5,106 |
| F5 | Question quality | 13 | 4,696 | 13 (0.3%) | 4,702 |
| F6 | No answer leakage | 1 | 4,695 | 1 (0.0%) | 4,690 |
| F7 | Context not truncated | 3 | 4,692 | 3 (0.1%) | 4,692 |
| F8 | No editorial artefacts | 3 | 4,689 | 3 (0.1%) | 4,692 |
| F9 | Answer not num-only | 0 | 4,689 | 0 (0.0%) | 4,689 |
| 1,032 | 4,689 | ||||
F3 removes 595 pairs during sequential filtering. When F3 is omitted, only 368 pairs are recovered because the remaining 227 F3-rejected candidates are still removed by one or more of the other active filters.
F4 removes 417 pairs during sequential filtering. When F4 is omitted, all 417 pairs are recovered, increasing the accepted set from 4,689 to 5,106.
The other results are less clear. Removing the answer length filter F3 alone increases test F1 slightly by 0.45 points, and removing F3 and F4 together increases it by 0.47 points. Since these results come from single seed runs and no statistical significance test was performed, the ablation results are treated as diagnostic rather than as proof that each filter improves model performance. The filters are retained because they enforce the answer validity and span quality constraints captured by the automatic checks in Table I. Model F1 alone is not enough to measure these properties.
TABLE II
MODEL LEVEL FILTER ABLATION USING INLEGALBERT ON DIFFERENT TRAINING DATA VARIANTS. ALL ARCHIVED CHECKPOINTS ARE EVALUATED WITH THE UNIFIED DECODER; IS RELATIVE TO THE CLEAN SELECTED RUN.
| Training variant | F1 | Char-F1 | F1 |
|---|---|---|---|
| clean selected (ablation control) | 84.11 | 86.30 | — |
| without F3+F4 combined | 84.58 | 87.25 | +0.47 |
| without F3 (answer length) | 84.56 | 87.13 | +0.45 |
| without F4 (coverage) | 83.90 | 86.66 | -0.21 |
| raw candidates (unfiltered) | 83.44 | 85.64 | -0.67 |
| heuristic all (no selection) | 82.77 | 86.59 | -1.34 |
TABLE III
LLM AS JUDGE EVALUATION WITH A SINGLE JUDGE AND A THREE MODEL ENSEMBLE. SCORES RANGE FROM 1 (POOR/FLAGGED) TO 3 (GOOD).
| Criterion | Single Judge | Ensemble | ||
|---|---|---|---|---|
| Avg. score | Flagged | Avg. score | Flagged | |
| Question specificity | 2.92 | 1.1% | 2.93 | 0.0% |
| Answer sufficiency | 2.92 | 2.8% | 2.99 | 0.4% |
| Answer minimality | 2.52 | 4.2% | 2.85 | 0.4% |
| Legal relevance | 2.97 | 0.7% | 3.00 | 0.0% |
| Flagged QA pairs | 222 pairs (5.0%) | 26 pairs (0.6%) | ||
E. LLM as Judge Quality Verification
To obtain an additional automated assessment of the 4,462 retained QA pairs beyond rule based filtering, an LLM as judge protocol is applied under two different configurations, and their outputs are compared. These scores are used only as auxiliary diagnostic indicators and not as a replacement for human evaluation.
Gemma 3:12B [13] evaluates four criteria: Q_SPECIFIC (the question targets a specific legal element), A_SUFFICIENT (the answer fully addresses the question), A_MINIMAL (the answer is the shortest correct span), and LEGAL_RELEVANT (the question concerns substantive legal content). Scores are 1 (poor), 2 (acceptable), or 3 (good), and a pair is flagged if any criterion receives a score of 1.
Gemma 3:12B, Llama 3.1:8B [14], and Mistral 7B [15] evaluate the same four criteria independently. When at least two models assign the same score, that score is used as the ensemble score. The released code contains the complete aggregation rule. Table III compares the evaluation results of the single judge and the three-model ensemble.
The largest difference is in answer minimality. The single judge flags more long answer spans, while the ensemble is more permissive. The 26 pairs flagged by the ensemble include incomplete spans and long section level answers. The three judges give the same score on all four criteria for only 8.0% of the pairs, showing that their judgments can differ. Therefore, the LLM as Judge results are treated as diagnostic evidence rather than as final measures of dataset quality.
F. Human Validation Study
Two law graduates independently audited 200 test pairs across all seven Acts (seed 42: copyright 25, designs 24, GI 32, patents 29, plant varieties 28, semiconductor 30, and trade marks 32). A sample of 200 pairs is selected as a practical post hoc audit size while maintaining coverage across all seven
TABLE IV
HUMAN INTER-ANNOTATOR AGREEMENT ON 200 QA PAIRS. UNWEIGHTED COHEN'S ; QUADRATIC-WEIGHTED COHEN'S .
| Criterion | Accept. % | ||
|---|---|---|---|
| Question Clarity | -0.008 | 0.051 | 99.0% |
| Answer Correctness | 0.117 | 0.328 | 95.0% |
| Answer Minimality | 0.312 | 0.613 | 75.5% |
The near-zero for Q_CLEAR reflects a ceiling effect: both annotators gave scores to 198 of 200 pairs (99.0%).
Joint acceptability requires both annotators to give a score . For minimality, 75.5% of pairs meet this threshold, while 82.0% are acceptable to at least one annotator. Both annotators rated 36 pairs as non-minimal (score 1). These pairs remain in the released dataset because the audit is conducted after dataset construction and is not used for filtering.

Fig. 2. Criterion-wise inter-annotator agreement for the human validation study. Answer minimality has the strongest agreement, while question clarity shows a ceiling effect due to skewed marginal distributions.
Acts. The audit is diagnostic rather than a precise estimate of quality across all 4,462 pairs or of expert IPR annotation accuracy. Pairs were rated from 1 (poor) to 3 (good) for question clarity, answer correctness, and answer minimality; agreement is measured using unweighted and quadratic-weighted Cohen's [16], [17].
Table IV reports human inter-annotator agreement and joint acceptability. Joint acceptability is 99.0% for clarity and 95.0% for correctness. Most correctness disagreements are between scores 3 and 2 (). Minimality shows higher agreement (), with 75.5% joint acceptability.
This highlights the difficulty of selecting the shortest correct span for long, multi-clause answers. Since the audit interface truncated long contexts, these results should be viewed as diagnostic rather than as a complete measure of dataset quality. Figure 2 summarises agreement across the three criteria.
IV. DATASET ANALYSIS
This section examines answer length, lexical overlap, span structure, and model performance across the dataset and the seven Acts.
A. Corpus Level Statistics
Table V compares IndicIPR-QA with established benchmarks. Its average answer length is 35.6 words, about SQuAD's
TABLE V
COMPARISON OF INDICIPR-QA WITH RELATED QA BENCHMARKS (SQ1 = SQUAD 1.1 [1]; SQ2 = SQUAD 2.0 [2]; CUAD [3]; JEC = JEC-QA [4]; IPB = IPBENCH [10]). “—” INDICATES UNAVAILABLE OR NOT DIRECTLY COMPARABLE STATISTICS. VALUES FOLLOW THE REPORTING CONVENTIONS OF EACH BENCHMARK’S SOURCE AND MAY USE DIFFERENT DATASET SPLIT DEFINITIONS.
| Property | SQ1 | SQ2 | CUAD | JEC | IPB | IndicIPR-QA (Ours) |
|---|---|---|---|---|---|---|
| QA pairs | 87.6k | 150k | 13.1k | 26.4k | 10.4k | 4.5k |
| Contexts | 18.9k | 35k | 510 | — | — | 1,116 |
| QA/context | 4.6 | 4.3 | 25.7 | — | — | 4.0 |
| Ans len (wds) | 3.2 | 3.2 | 30.0 | MCQ | Mixed | 35.6 |
| Ctx len (wds) | 117 | 117 | 200 | — | 200 | 171.3 |
| Q len (wds) | 10.1 | 10.1 | 9.5 | — | — | 11.9 |
| Human review | Yes | Yes | Yes | Yes | Yes | |
| Extractive | Yes | Yes | Yes | No | No | Yes |
| Unanswerable | No | Yes | Yes | No | No | No |
| Domain | General | General | Contracts | Chinese Bar Exam | US/Chinese IP Law | Indian IPR |
Audited on 200 test pairs by two law graduates; see Section III-F.
TABLE VI
PER-ACT INDICIPR-QA STATISTICS, SORTED BY TEST F1. AND DENOTE FULL-DATASET AND TEST-SET COUNTS; Q-CTX DENOTES STOPWORD REMOVED QUESTION-CONTEXT UNIGRAM OVERLAP.
| Act | Avg. ans. (words) | Q-Ctx | F1 | ||
|---|---|---|---|---|---|
| Designs | 173 | 24 | 43.4 | 0.320 | 100.00 |
| Patents | 1,143 | 69 | 35.8 | 0.429 | 98.40 |
| Semicond. | 585 | 47 | 22.1 | 0.418 | 91.53 |
| Trade Marks | 1,106 | 88 | 31.9 | 0.416 | 83.83 |
| GI | 551 | 51 | 51.8 | 0.458 | 83.66 |
| Copyright | 349 | 25 | 62.3 | 0.447 | 79.41 |
| Plant Var. | 555 | 40 | 21.9 | 0.636 | 53.20 |
3.2 words and 19% longer than CUAD's 30.0 words, which may increase span boundary complexity. The dataset is fully extractive, contains no unanswerable questions, and uses section level train test separation.
B. Per-Act Distribution and Performance
Table VI reports per-Act statistics and InLegalBERT test performance. Performance varies substantially across the seven Acts.
Test F1 ranges from 100.00 for Designs to 53.20 for Plant Varieties. The perfect score for Designs should be viewed with caution because the test set contains only 24 pairs. Across the seven Acts (n = 7), question-context unigram overlap shows a strong negative correlation with F1 (r = -0.928). Given the small number of Acts, this correlation should be interpreted as exploratory rather than as evidence of a general relationship. Plant Varieties have the highest overlap (0.636) but the lowest F1. One possible reason is the presence of specialised biological and agricultural terms, although this is not directly tested. Copyright has more multi-clause answers (53.9%) than Patents (13.7%) and also has lower F1 (79.41 versus 98.40).
The answers cover several legal topics, including authority (29.4%), procedure (12.0%), rights (9.5%), conditions (7.9%), definitions (5.8%), duration (2.3%) and penalties (1.7%), while 31.4% fall into other categories. The average question to context word overlap is 0.448 after removing common stopwords. Also, 19.9% of answers contain semicolons and 5.9% contain “subject to,” showing that many answers contain multiple clauses. When the answers are divided into short and long groups using the median length of 33 words, InLegalBERT F1 decreases from 86.24 for short answers to 83.78 for long answers. Multi-clause answers also have lower boundary-sensitive EM than single-clause answers (56.10 versus 66.03). Answers that appear later in the context have slightly lower F1 than earlier answers (84.21 versus 85.83). Overall, answer length, the number of clauses, and the answer’s position in the context are associated with extraction performance.
V. BASELINE EXPERIMENTS & RESULTS
Four BERT based encoder models are fine tuned on the IndicIPR-QA training split (3,710 QA pairs) using the BertForQuestionAnswering architecture [18]. This architecture predicts the start and end positions of the answer span in the input sequence: [CLS] question [SEP] context [SEP]. The models cover different levels of domain specialisation: BERT base uncased [18] (general English), LegalBERT-US [19] (US legal text), InCaseLawBERT [20] (Indian court judgments), and InLegalBERT [11] (Indian legal text).
All encoder models use the same settings: AdamW optimiser, learning rate with 50 warm-up steps and linear decay, weight decay 0.01, effective batch size 32, maximum sequence length 384, document stride 128, 3 training epochs, and random seed 42. The same settings are used for all encoder models to ensure a controlled comparison. The best checkpoint is selected using validation F1. During inference, long contexts are divided into overlapping windows using a stride of 128. A constrained decoder then selects the highest-scoring valid answer span across all windows and returns the exact text from the context. All encoder results reported here are recomputed from the archived checkpoints using this same inference procedure; no model is retrained.
Three open instruction tuned LLMs are also evaluated in zero shot and 3 shot settings: Llama 3.1:8B [14], Mistral 7B [15], and Qwen2.5:7B [21]. These models come from different model families and have similar sizes of about 7 to 8B parameters. In the zero shot setting, each model receives the statute passage and question and is instructed to copy the answer exactly from the context. In the 3 shot setting, three example QA pairs from the training set are provided as demonstrations.
TABLE VII BASELINE PERFORMANCE ON THE INDICIPR-QA TEST SPLIT (344 QA PAIRS). ZS = ZERO-SHOT; FS = 3-SHOT FEW-SHOT.
| System | EM | F1 | Char-F1 |
|---|---|---|---|
| Lexical retrieval | |||
| BM25 retrieval | 0.00 | 20.21 | 77.10 |
| BM25 oracle window | 14.24 | 51.30 | 85.23 |
| Fine-tuned encoders | |||
| BERT-base | 63.66 | 83.33 | 86.38 |
| LegalBERT-US | 65.12 | 84.66 | 86.67 |
| InCaseLawBERT | 63.08 | 84.37 | 86.40 |
| InLegalBERT | 63.66 | 85.02 | 87.26 |
| Prompted Open-Source LLMs | |||
| Mistral 7B (ZS) | 18.31 | 67.11 | 75.07 |
| Mistral 7B (FS) | 24.71 | 68.83 | 76.01 |
| Llama 3.1:8B (ZS) | 33.43 | 74.78 | 79.61 |
| Llama 3.1:8B (FS) | 33.43 | 77.02 | 79.78 |
| Qwen2.5:7B (ZS) | 29.94 | 77.59 | 81.04 |
| Qwen2.5:7B (FS) | 34.30 | 76.39 | 78.60 |
As a simple lexical baseline, BM25 [22] is also evaluated. For a document and query , denotes the frequency of token , the document length, and the average document length. The standard values and are used. In the oracle window setting, BM25 is given the correct answer containing context, isolating within context retrieval. The relevance score is
A. Results
Table VII and Figure 3 summarise the results of all baseline systems using exact match (EM), token level F1, and character level F1 (Char-F1). Standard BM25 retrieval [22] achieves a token level F1 of 20.21, while the oracle window setting reaches 51.30. Both remain below the supervised encoder models. Among the encoders, InLegalBERT achieves the highest F1 (85.02), followed by LegalBERT-US (84.66) and InCaseLawBERT (84.37). BERT-base has the lowest encoder F1 (83.33). However, the differences between the encoder models are small, so the results do not provide strong evidence that domain specific pretraining alone leads to better performance.
A paired bootstrap significance test with 10,000 resamples and Holm correction finds no statistically significant F1 difference between InLegalBERT and BERT-base ( , adjusted p = 0.397), LegalBERT-US ( , adjusted p = 1.000), or InCaseLawBERT ( , adjusted p = 1.000).
Among InLegalBERT's 125 non exact match predictions, 100 (80.0%) are span boundary errors, 20 (16.0%) have low overlap, two (1.6%) differ by minor words, two (1.6%) partially overlap the reference, and one (0.8%) is completely wrong. For example, one Copyright prediction starts with the correct clause from Section 14 but continues into the next enumerated clause. This shows how long statutory lists can make it difficult to choose the exact answer boundaries.
Among the prompted LLMs, Qwen2.5:7B performs best in the zero-shot setting (F1 = 77.59), while Llama 3.1:8B performs best in the 3-shot setting (F1 = 77.02). The best prompted result is still 7.43 F1 points lower than fine-tuned InLegalBERT, which achieves the highest F1 among the evaluated models. Section VI discusses the scope and limitations of the generalisation.

Fig. 3. Token-level F1 across encoder and lexical baselines and the best prompted setting for each open LLM on the IndicIPR-QA test split. The large gap between BM25 and InLegalBERT shows that lexical matching alone is insufficient for the benchmark.
VI. GENERALIZABILITY ANALYSIS
Section-level splitting prevents the same source context from appearing in both the training and test sets. The train-test context Jaccard similarity is 0.00 for all seven Acts. Figure 4 shows that of test contexts are unseen in the training split for every Act. Among the 1,234 unique answer token types in the test set, 137 do not appear in the training answers. In addition, of test question tokens and of test context tokens are not found in the training split. This shows that the test set contains unseen legal provisions and words.

Fig. 4. Novel test-context rate by Act. The rate confirms that no source context is shared between the training and test splits.
However, the questions are not completely independent across the two splits. Of the 4,462 questions, 4,118 are unique after converting them to lowercase, replacing non-word characters with spaces, and removing extra spaces. Common question openings include “what does” (1,157), “under section”
(960), and “what is” (875). These repeated GPT-4o question patterns can appear in both training and test sets. Therefore, the results show how well models answer questions generated by the same process over new legal contexts. They do not measure performance on independently written legal questions.
The 64.81-point gap between BM25 and InLegalBERT indicates that simple word matching alone is not sufficient for this task. However, this gap alone does not prove that the models will generalise to real-world legal questions. The BM25 oracle-window F1 score of 51.30 shows that simple lexical matching still performs poorly even when the correct context is provided.
VII. Conclusion and Future Work
IndicIPR-QA is an extractive QA benchmark containing 4,462 question-answer pairs from 1,116 statutory contexts covering the seven principal Indian IPR Acts. The dataset is created using GPT-4o with nine automatic quality filters, context-balanced selection, model-based evaluation, and a 200-pair human audit. Section-level splitting prevents the same source context from appearing in both the training and test sets. Using the unified sliding-window inference method, fine-tuned InLegalBERT achieves a token-level F1 of 85.02, while BM25 retrieval achieves 20.21. This large difference shows that simple word matching is not enough for this task. Performance also differs across the seven Acts and different types of answers, and most InLegalBERT errors are related to choosing the exact answer boundaries. These results highlight the difficulty of precise answer-span extraction, especially for long and multi-clause answers. IndicIPR-QA provides a benchmark for studying extractive QA over Indian IPR law. The benchmark is limited to English, answerable, single-context questions, and the questions are generated using GPT-4o. Future work can include independently written questions, more Indian languages, unanswerable questions, and scenario based or multi section questions.
VIII. DATA AND CODE AVAILABILITY
The IndicIPR-QA dataset and code are publicly available:
Dataset: https://huggingface.co/datasets/niloycste68/
IndicIPRExtractiveQA
Code: https://github.com/niloycste/Indic-IPR-Dataset-
REFERENCES
[1] P. Rajpurkar, J. Zhang, K. Lopyrev, and P. Liang, “SQuAD: 100,000+ Questions for Machine Comprehension of Text,” in Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, 2016, pp. 2383–2392.
[2] P. Rajpurkar, R. Jia, and P. Liang, “Know what you don’t know: Unanswerable questions for squad,” in Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), 2018, pp. 784–789.
[3] D. Hendrycks, C. Burns, A. Chen, and S. Ball, “CUAD: An Expert-Annotated NLP Dataset for Legal Contract Review,” in Proceedings of the NeurIPS 2021 Track on Datasets and Benchmarks, 2021.
[4] H. Zhong, C. Xiao, C. Tu, T. Zhang, Z. Liu, and M. Sun, “JEC-QA: A Legal-Domain Question Answering Dataset,” Proceedings of the AAAI Conference on Artificial Intelligence, vol. 34, pp. 9701–9708, 2020.
[5] A. Ravichander, A. W. Black, S. Wilson, T. Norton, and N. Sadeh, "Question answering for privacy policies: Combining computational and legal perspectives," in Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 2019, pp. 4947–4958.
[6] A. Louis, G. Van Dijck, and G. Spanakis, “Interpretable long-form legal question answering with retrieval-augmented large language models,” in Proceedings of the AAAI conference on artificial intelligence, vol. 38, no. 20, 2024, pp. 22266–22275.
[7] T.-M. Nguyen, H.-T. Nguyen, T.-K. Dao, X.-H. Phan, H.-T. Nguyen, and T.-H.-Y. Vuong, “VLQA: The first comprehensive, large, and high-quality Vietnamese dataset for legal question answering,” arXiv preprint arXiv:2507.19995, 2025.
[8] J. Rabelo, R. Goebel, M.-Y. Kim, Y. Kano, M. Yoshioka, and K. Satoh, “Overview and discussion of the competition on legal information extraction/entailment (COLIEE) 2021,” The Review of Socionetwork Strategies, vol. 16, no. 1, pp. 111–133, 2022.
[9] A. Louis and G. Spanakis, “A statutory article retrieval dataset in French,” in Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2022, pp. 6789–6803.
[10] Q. Wang, G. Chen, H. Wang, H. Liu, M. Zhu, Z. Qin, L. Li, Y. Yue, S. Wang, J. Li et al., “IPBench: Benchmarking the knowledge of large language models in intellectual property,” arXiv preprint arXiv:2504.15524, 2025.
[11] S. Paul, A. Mandal, P. Goyal, and S. Ghosh, “Pre-trained Language Models for the Legal Domain: A Case Study on Indian Law,” in Proceedings of the Nineteenth International Conference on Artificial Intelligence and Law, ser. ICAIL '23. Association for Computing Machinery, 2023, pp. 187–196.
[12] A. Hurst, A. Lerer, A. P. Goucher et al., “GPT-4o System Card,” arXiv preprint arXiv:2410.21276, 2024.
[13] Gemma Team, A. Kamath, J. Ferret et al., “Gemma 3 Technical Report,” arXiv preprint arXiv:2503.19786, 2025.
[14] Meta AI et al., “The Llama 3 Herd of Models,” CoRR, vol. abs/2407.21783, 2024.
[15] A. Q. Jiang, A. Sablayrolles, A. Mensch, C. Bamford, D. S. Chaplot, D. d. I. Casas, F. Bressand, G. Lengyel, G. Lample, L. Saulnier, L. R. Lavaud, M.-A. Lachaux, P. Stock, T. L. Scao, T. Lavril, T. Wang, T. Lacroix, and W. E. Sayed, “Mistral 7B,” arXiv preprint arXiv:2310.06825, 2023.
[16] J. Cohen, “A Coefficient of Agreement for Nominal Scales,” Educational and Psychological Measurement, vol. 20, no. 1, pp. 37–46, 1960.
[17] —, “Weighted kappa: Nominal scale agreement provision for scaled disagreement or partial credit.” Psychological Bulletin, vol. 70, no. 4, pp. 213–220, 1968.
[18] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pretraining of deep bidirectional transformers for language understanding,” in Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 (long and short papers), 2019, pp. 4171–4186.
[19] I. Chalkidis, M. Fergadiotis, P. Malakasiotis, N. Aletras, and I. Androutsopoulos, “LEGAL-BERT: The Muppets straight out of Law School,” in Findings of the Association for Computational Linguistics: EMNLP 2020, T. Cohn, Y. He, and Y. Liu, Eds. Association for Computational Linguistics, 2020, pp. 2898–2904.
[20] S. Paul, A. Mandal, P. Goyal, and S. Ghosh, “Pre-training transformers on Indian legal text,” arXiv preprint arXiv:2209.06049, 2022.
[21] Qwen, A. Yang, B. Yang et al., “Qwen2.5 Technical Report,” arXiv preprint arXiv:2412.15115, 2024.
[22] S. Robertson and H. Zaragoza, “The Probabilistic Relevance Framework: BM25 and Beyond,” Foundations and Trends in Information Retrieval, vol. 3, no. 4, pp. 333–389, 2009.