This technical report presents Sabiá-4 and Sabiazinho-4, a new generation of Portuguese language models with a focus on Brazilian Portuguese language. The models were developed through a four-stage training pipeline: continued pre-training on Portuguese and Brazilian legal corpora, long-context extension to 128K tokens, supervised fine-tuning on instruction data spanning chat, code, legal tasks, and function calling, and preference alignment. We evaluate the models on six benchmark categories: conversational capabilities in Brazilian Portuguese, knowledge of Brazilian legislation, long-context understanding, instruction following, standardized exams, and agentic capabilities including tool use and web navigation. Results show that Sabiá-4 and Sabiazinho-4 achieve a favorable cost-performance trade-off compared to other models, positioning them in the upper-left region of the pricing-accuracy chart. The models show improvements over previous generations in legal document drafting, multi-turn dialogue quality, and agentic task completion.
Figures & tables
Figure 1: Total inference cost versus average benchmark accuracy. Optimal models appear in the upper-left quadrant (cheaper and better). Sabiá models highlighted in green. Currency conversion: BRL/USD = 5.4.
Figure 2: Training pipeline overview. Pre-training consists of Portuguese continual learning on general and legal corpora, followed by long context training. Post-training includes supervised fine-tuning on diverse instruction data and preference alignment.
Benchmark
Description
Metric
OAB Bench
Legal Drafting (Attorney Style)
Average score [0, 10]
Magis Bench
Legal Drafting (Judge Style)
Average score [0, 10]
Brazilian laws
Knowledge of Brazilian law
Accuracy (5 alternatives)
Agentic capabilities
Tool usage in four environments in Portuguese
Pass^3 and success@1
Brazilian exams
13 exams (ENEM, CFC, Revalida, CPNU, OAB etc)
Accuracy (4 and 5 alternatives)
Portuguese Multi-IF
Instruction-following capability
Strict Average over 3 turns
Table 1: List of benchmarks used to evaluate model capabilities across different domains and tasks.
Benchmark
sabiazinho-4
gpt-oss-120b
gpt-4.1-mini
gpt-5-mini
gemini-2.5-flash-lite
OAB-Bench (Lawyer Evaluation)
7.02
6.01
5.50
6.37
6.25
Magis-Bench (Judge Evaluation)
4.50
3.62
3.67
4.47
4.25
Laws (Legal Knowledge)
85.0
52.3
57.0
68.2
72.1
Agent Capabilities (4 environments)
55.2
60.9
59.4
85.1
18.0
Multiple Choice Exams (13 exams)
81.0
77.0
81.0
84.6
76.2
Multi-IF PT (Instruction Following)
81.0
82.0
79.6
85.8
80.8
Table 2: Comparison of models for the same price range: cost-effective models.
Benchmark
sabia-3.1
sabia-4
Qwen3 235b
gpt-4.1
gpt-5.2 (instant)
gpt-5.2 (high)
Gemini-3 Pro (low)
Gemini-3 Pro (high)
kimi-k2 thinking
deepseek v3.2
OAB-Bench
7.21
7.49
6.33
7.30
8.07
8.73
9.05
8.90
6.62
6.40
Magis-Bench
4.97
5.08
4.52
5.55
6.66
6.99
7.79
7.48
4.49
4.88
Laws
77.8
97.4
65.9
80.8
84.0
86.3
74.9
88.6
59.1
67.3
Agent Capabilities
43.1
72.2
67.8
73.3
81.1
85.7
90.4
90.1
77.3
40.5
Multiple Choice Exams
82.4
86.6
82.0
86.1
88.0
92.9
93.3
95.0
83.0
84.0
Multi-IF PT
80.7
82.0
84.4
82.7
83.7
87.2
86.0
88.0
86.0
81.5
Table 3: Comparison of models for the same price range: frontier models
Figure 3: Comparison of Sabiá generations on the MRCR benchmark. Sabiá-4 and Sabiazinho-4 are the new model generations.
Figure 4: Sample from BRACEVal benchmark. Note that the example was translated to English for the paper. Original language is Portuguese.
Figure 5: Sample from Climb benchmark. Note that the example was translated to English for the paper. Original language is Portuguese.
Figure 6: Sample from Magis benchmark. Note that the example was translated to English for the paper. Original language is Portuguese.
Figure 7: Sample from OAB benchmark. Note that the example was translated to English for the paper. Original language is Portuguese.
Figure 8: Sample from Ticket-bench benchmark. Note that the example was translated to English for the paper. Original language is Portuguese.
Figure 9: Sample from Brazilian laws benchmark. Note that the example was translated to English for the paper. Original language is Portuguese.
Figure 10: Sample from MARCA benchmark. Note that the example was translated to English for the paper. Original language is Portuguese.
Figure 11: Sample from Multi-IF benchmark. Note that the example was translated to English for the paper. Original language is Portuguese.
Figure 12: Sample from pix-bench benchmark. Note that the example was translated to English for the paper. Original language is Portuguese.
Model
Input [$/1m]
Output [$/1m]
Provider
Sabiazinho-4
0.19
0.74
Maritaca AI
gpt-oss-120b
0.15
0.6
Together AI
gpt-4.1-mini
0.4
1.6
Openai
gemini-2.5-flash-lite
0.1
0.4
Google
gpt-5-mini
0.25
2
OpenAI
sabiá-3.1
0.93
1.85
Maritaca AI
Table 4: Input and output prices used for evaluations, including the providers considered.
We introduce LegalBench-BR, the first public benchmark for evaluating language models on Brazilian legal text classification. The dataset comprises 3,105 appellate proceedings from the Santa Catarina State Court (TJSC), collected via the DataJud API (CNJ) and annotated across five legal areas through LLM-assisted labeling with heuristic validation. On a class-balanced test set, BERTimbau-LoRA, updating only 0.3% of model parameters, achieves 87.6% accuracy and 0.87 macro-F1 (+22pp over Claude 3.5 Haiku, +28pp over GPT-4o mini). The gap is most striking on administrativo (administrative law): GPT-4o mini scores F1 = 0.00 and Claude 3.5 Haiku scores F1 = 0.08 on this class, while the fine-tuned model reaches F1 = 0.91. Both commercial LLMs exhibit a systematic bias toward civel (civil law), absorbing ambiguous classes rather than discriminating them, a failure mode that domain-adapted fine-tuning eliminates. These results demonstrate that general-purpose LLMs cannot substitute for domain-adapted models in Brazilian legal classification, even when the task is a simple 5-class problem, and that LoRA fine-tuning on a consumer GPU closes the gap at zero marginal inference cost. We release the full dataset, model, and pipeline to enable reproducible research in Portuguese legal NLP.
We introduce CAPITU, a benchmark for evaluating instruction-following capabilities of Large Language Models (LLMs) in Brazilian Portuguese. Unlike existing benchmarks that focus on English or use generic prompts, CAPITU contextualizes all tasks within eight canonical works of Brazilian literature, combining verifiable instruction constraints with culturally-grounded content. The benchmark comprises 59 instruction types organized into seven categories, all designed to be automatically verifiable without requiring LLM judges or human evaluation. Instruction types include Portuguese-specific linguistic constraints (word termination patterns like -ando/-endo/-indo, -inho/-inha, -mente) and structural requirements. We evaluate 18 state-of-the-art models across single-turn and multi-turn settings. Our results show that frontier reasoning models achieve strong performance (GPT-5.2 with reasoning: 98.5% strict accuracy), while Portuguese-specialized models offer competitive cost-efficiency (Sabiazinho-4: 87.0% at $0.13 vs Claude-Haiku-4.5: 73.5% at $1.12). Multi-turn evaluation reveals significant variation in constraint persistence, with conversation-level accuracy ranging from 60% to 96% across models. We identify specific challenges in morphological constraints, exact counting, and constraint persistence degradation across turns. We release the complete benchmark, evaluation code, and baseline results to facilitate research on instruction-following in Portuguese.
Large language models show promise for legal applications, but deploying frontier models raises concerns about cost, latency, and data privacy. We evaluate whether sub-10B parameter models can serve as practical alternatives by testing nine models across three legal benchmarks (ContractNLI, CaseHOLD, and ECtHR) using five prompting strategies (direct, chain-of-thought, few-shot, BM25 RAG, and dense RAG). Across 405 experiments with three random seeds per configuration, we find that a Mixture-of-Experts model activating only 3B parameters matches GPT-4o-mini in mean accuracy while surpassing it on legal holding identification, and that architecture and training quality matter more than raw parameter count. Our largest model (9B parameters) performs worst overall. Chain-of-thought prompting proves sharply task-dependent, improving contract entailment but degrading multiple-choice legal reasoning, while few-shot prompting emerges as the most consistently effective strategy. Comparing BM25 and dense retrieval for RAG, we find near-identical results, suggesting the bottleneck lies in the language model's utilization of retrieved context rather than retrieval quality. All experiments were conducted via cloud inference APIs at a total cost of $62, demonstrating that rigorous LLM evaluation is accessible without dedicated GPU infrastructure.