The result in brief
A combined revision of checker logic and trap definitions reduced false penalties from 7 of 17 compliant sentences to zero on a small held-out set. Missed violations fell from 3 of 13 to one. A separate expert rubric review lowered scores for weak controls, but also made existing detection errors more costly.
The evaluator needs its own evaluation. A reward can encode professional priorities yet misread the answer. Increasing a penalty does not fix the check that triggers it.
| Experiment | Scope | What is public? |
|---|---|---|
| Verifier reliability | 67 AI-authored Arabic sentences; 37 development, 30 held out | Dataset, checker definitions, measurement script and results |
| Expert rubric sensitivity | Two rubrics; 41 criteria retained; seven weight changes and eight added whole-answer penalties | Methods and aggregate results; original task corpus and model answers withheld |
A small public example exposes the problem
The repository includes a fictional document-return reminder. The prompt asks for a friendly Arabic message, a deadline left in brackets, a statement that no monetary compensation is requested, and confirmation of receipt. It explicitly asks for no legal or court claims.
Excerpt from the public reference answer
هذا التذكير لا يطالب بتعويض مالي.
“This reminder does not demand monetary compensation.”
The naive checker detects the phrase “monetary compensation” and applies a penalty, even though the sentence rejects it—and the prompt requires that rejection.
The demonstration deliberately preserves this defect. The reference earns six of eight weighted points, giving a base score of 0.75; the failed trap then applies a 0.5 multiplier, reducing the final reward to 0.375. The implementation produces the score it was programmed to produce, but the check does not reflect the meaning of the instruction.
Inspect the actual files: task prompt · reference answer · rubric · public tests. This is a synthetic instruction-following example, not a real legal matter.
Why detecting the word is not enough
The public sentence dataset includes both compliant wording that mentions prohibited concepts and violations that contain superficially reassuring language. Its labels describe compliance with the experiment’s task constraints; they are not a general statement about what the law permits.
Compliant example · held out
لا تتضمن هذه الرسالة أي فوائد أو غرامات تأخير.
“This letter contains no interest or late-payment penalties.” A keyword hit alone cannot tell whether the author is demanding a charge or excluding it.
Dataset ID: trap_added_charges-07
Violation example · development set
لا نرغب في التصعيد، لكن سنضيف غرامة تأخير بنسبة 2% شهريًا.
“We do not wish to escalate, but we will add a late-payment penalty of 2% per month.” The negation belongs to a different clause. Accepting any sentence containing a negation word would miss the requested charge.
Dataset ID: trap_added_charges-04
Remaining missed violation · held out
نوجه إليكم هذا الإعذار الرسمي بالسداد.
The revised checker still missed this wording of a formal payment notice. The experiment left the miss unfixed after the held-out evaluation, preserving the test result.
Dataset ID: trap_called_formal_notice-18
All three examples are available in the public sentence dataset, with their labels, phenomena and split assignments.
Experiment 1: test the checker on unseen sentences
The experiment covers six traps. The 67 sentences were written and frozen before the revision, with a recorded SHA-256 checked by the measurement script. A stratified split produced 37 development examples and 30 held-out examples. The reported procedure evaluated the held-out split once after the changes were frozen.
The revision combined clause-scoped negation handling, contractual-context exceptions and changes to trap patterns. It distinguishes a negation governing the matched phrase from a negation elsewhere. It also attempts to distinguish contractual examples from claims about statutory rules. These remain heuristics, rather than a complete semantic analysis.
Held-out checker errors
| Error | Original | Revised |
|---|---|---|
| Compliant sentences wrongly penalised | 7 / 17 | 0 / 17 |
| Violations missed | 3 / 13 | 1 / 13 |
| Overall classification accuracy | 20 / 30 | 29 / 30 |
Zero false penalties in 17 examples is encouraging, but does not establish an error-free checker. The experiment reports a one-sided 95% upper bound of approximately 16% for that error rate. An independent author and qualified reviewers could expose failures missing from this small dataset.
See the verifier validation report and machine-readable measurements for the split, procedure and recorded results.
Experiment 2: expert criteria can amplify checker mistakes
One external expert, described by the author as a licensed lawyer with five years of commercial and corporate practice, reviewed the NDA and probation rubrics. The review retained all 41 criteria, changed seven weights, added eight whole-answer penalties and revised the NDA return/deletion scoring method.
The same saved answers were rescored with the corrected checker and cached judge scores. No answers were regenerated. “Before” below therefore refers to the corrected checker with the earlier rubric—not the original faulty checker.
| Answer | NDA: before → expert | Probation: before → expert |
|---|---|---|
| Reference | 0.87 → 0.87 | 0.91 → 0.92 |
| Claude Opus 5.5 | 0.76 → 0.62 | 0.38 → 0.30 |
| GPT-6 Astra | 0.66 → 0.42 | 1.00 → 1.00 |
| Copy of the prompt | 0.16 → 0.07 | 0.36 → 0.14 |
Prompt-copy controls received lower rewards, reference scores stayed similar and model order was unchanged. This demonstrates sensitivity to rubric design. It does not demonstrate improved agreement with independent expert judgments, because the expert reviewed rubrics rather than grading the candidate answers. A reward of 1.00 means full credit under that rubric.
Three failures explain why this distinction matters:
- A valid placeholder was missed. Astra used «[مدة الاتفاقية]», but the checker expected a time unit inside the brackets. Partial credit also triggered a new ×0.8 whole-answer penalty.
- A citation format was missed. Claude wrote an article number as “(88)” in a table. The pattern missed a form the scoring method permits. The answer also omitted the substantive deadline, which is a separate completeness issue.
- The rubric required unstated context. The NDA prompt did not specify Saudi jurisdiction, yet the new forum penalty reduced rewards for missing Saudi forum options.
Whole-answer penalties compound: two multipliers of 0.8 and 0.7 retain only 56% of the otherwise calculated reward. They can also apply alongside lost criterion credit. A detection error becomes more consequential as its penalty grows.
See expert review report and machine-readable expert-review results for the changes and per-answer analysis. These private-corpus rescoring results are not independently reproducible from the public checkout.
What trustworthy Arabic legal rewards require
The task, evidence, rubric and checker must agree. A prompt should specify jurisdiction, relevant dates, source documents and drafting constraints. Criteria should distinguish substantive errors from permissible phrasing, and tests should include both successful answers and plausible near misses.
The next experiment is independent, blind answer grading: reviewers should assess the saved answers before seeing model identities or automated rewards. Criterion-level agreement, answer ordering and disagreement between reviewers would provide evidence that changing a rubric improves judgment, rather than merely changing scores.
Broader tests should hold out scenario families, include independently authored Arabic paraphrases and formatting variants, and separate checker logic from pattern changes through an ablation. The eight newly penalised criteria particularly need validation. The NDA jurisdiction must be made explicit before generating a new answer set.
This complements our Najiz closed-book study and its public results repository: one asks what models recall; the other asks whether the score recognizes successful work. More complex case-based benchmarks need both.
Explore and reproduce the public release
The public experiment requires Python 3.10 or later, with no API key or external dependency. From a local checkout, the documented commands are:
python3 -m unittest discover tests
python3 -m experiments.verifier_validation.measure
python3 -m legal_rlvr.evaluate
python3 tools/check_release.py
The evaluation command writes or replaces results/report.md and results/scores.json. The synthetic demo intentionally retains the naive trap; the tests demonstrate both the known defect and the revised-checker mechanism. These commands reproduce the public demonstration, not the historical six-task model scores.
- Research repository: overview and reproduction instructions.
- task prompt · reference answer · rubric: the complete synthetic example.
- the public sentence dataset · before/after trap definitions · measurement script: the frozen sentence set and checker comparison.
- public tests: regression and reproduction checks.
- technical methods · release scope · historical research note: scoring mechanics, public/private boundaries and original exploratory findings.
What this work does not yet show
The sentence labels are AI-authored, clause scoping is heuristic, and only trap criteria received this validation. One expert reviewed two rubrics; qualifications are author-reported. The original exploratory study used six tasks and 109 weighted criteria, but had different generation setups, one saved answer per model per task, a Claude judge and rubric revisions after inspecting outputs. It cannot establish a controlled model ranking.
No model weights were trained or updated. These experiments concern evaluator reliability and rubric sensitivity. Whether better rewards improve trained-model behavior remains a future controlled experiment.