Datasets:
The dataset viewer is not available for this dataset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
OAB-Bench
OAB-Bench is a benchmark for evaluating Large Language Models (LLMs) on legal writing tasks from the Brazilian Bar Examination (OAB) Phase 2. The benchmark comprises 210 questions across seven areas of law from six editions (39–44) of the exam.
- Evaluates LLMs on their ability to write legal documents and answer discursive questions
- Includes comprehensive evaluation guidelines used by human examiners
- Supports two judge output formats: structured (recommended) and non-structured
- The evaluation pipeline uses LLMs as automated judges, achieving strong correlation with human scores
Note: This is the v2 release (210 questions, exams 39–44). The original release (105 questions, exams 39–41) is available at the GitHub tag
v1.0.
Dataset Structure
The dataset has two configurations:
questions(210 examples): the exam questions. Each example contains:question_id: unique identifier (e.g.39_direito_administrativo_peca_profissional)category: law area for the given edition (e.g.39_direito_administrativo)statement: the question/prompt textturns: conversation turnsvalues: the maximum score(s) for the itemsystem: system prompt used during generation
guidelines(210 examples): the official evaluation guidelines used by human examiners, keyed by the samequestion_id.
from datasets import load_dataset
questions = load_dataset("maritaca-ai/oab-bench", "questions", split="train")
guidelines = load_dataset("maritaca-ai/oab-bench", "guidelines", split="train")
The full evaluation pipeline (model answer generation, LLM-as-judge, scoring) is available in the GitHub repository.
Results
Evaluation of 12 LLMs on OAB-Bench using GPT-5.2 as judge with structured output:
| Model | Average Score | Passing Rate |
|---|---|---|
| Gemini-3.1-Pro | 9.39 | 42/42 (100%) |
| Claude Opus 4.6 | 8.82 | 42/42 (100%) |
| GPT-5.2 | 8.66 | 42/42 (100%) |
| Claude Sonnet 4.6 | 8.27 | 42/42 (100%) |
| Sabiá-4 | 7.96 | 42/42 (100%) |
| Gemini-3.1-Flash-Lite | 7.60 | 39/42 (93%) |
| Sabiazinho-4 | 6.91 | 34/42 (81%) |
| Sabiá-3.1 | 6.91 | 35/42 (83%) |
| Qwen3.5-397B | 6.69 | 31/42 (74%) |
| GPT-5-Mini | 6.52 | 31/42 (74%) |
| Qwen3.5-35B | 6.17 | 24/42 (57%) |
| Sabiazinho-3 | 6.12 | 26/42 (62%) |
Passing rate indicates the number of exams (out of 42) where the model scored ≥ 6.0. Each exam corresponds to one of the seven areas of law in a given edition.
Citation
If you find this work helpful, please cite our paper:
@inproceedings{10.1145/3769126.3769227,
author = {Pires, Ramon and Malaquias Junior, Roseval and Nogueira, Rodrigo},
title = {Automatic Legal Writing Evaluation of LLMs},
year = {2026},
isbn = {9798400719394},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3769126.3769227},
doi = {10.1145/3769126.3769227},
booktitle = {Proceedings of the Twentieth International Conference on Artificial Intelligence and Law},
pages = {420--424},
numpages = {5},
keywords = {Open-ended Tasks, Legal Writing, Automatic Evaluation, Brazilian Bar Exam, LLM Judge, Large Language Models},
series = {ICAIL '25}
}
- Downloads last month
- 109