Skip to content

Methodology

How TugaBench is built and scored. The benchmark measures how well AI models handle European Portuguese (PT-PT) and Portugal-specific knowledge and tasks.

Tasks

Version 1 has five tasks. Each item belongs to a category inside its task, used for the breakdowns on model and task pages.

A fifth task, pt-support (multi-turn customer-support conversations in the style of tau-bench), is planned for v2.

Scorers

Wherever possible items are scored by code. A judge model is only used where the answer is open-ended.

Every item score is between 0 and 1. A task score is the mean of its item scores; the overall score is the mean of the task scores, so every task weighs the same regardless of how many items it has. That includes Current affairs, which mostly measures how recent a model's knowledge is: most models score close to zero there, so it moves the overall ranking more than its size suggests.

How models are run

Every model gets the same system prompt per task, in European Portuguese, and the same questions, through an OpenAI-compatible endpoint (the LayerX AI Gateway). Sampling temperature is 0.7, except where a provider fixes it. Answers are cached, so adding a model or a question only runs what is new; earlier results do not change.

Where the questions come from

Exam grade (out of 200)

The Exams task also shows a grade per paper, computed as the official criteria do: every compulsory item counts with its points, and of the optional items only the best ones count, as many as the paper says. Items left out (figures, images) are taken out of both the points earned and the points available, so the grade is the grade on the part of the paper we can ask, scaled to 0–200.

Judge

The judge model, judge prompt version, temperature and max tokens are fixed per benchmark version and written into every results file (currently anthropic/claude-opus-5.5, prompt judge-v1). The judge also appears on the leaderboard and so grades its own answers on judged tasks; LLM judges can favour their own style, so read its scores on those tasks with that in mind. Agreement between the judge and human graders will be measured on a sample and published here; that check has not been run yet.

Epochs and confidence intervals

Every item runs several times (epochs, 3 by default) to absorb sampling noise. Epoch scores are averaged per item first, so repeats do not make intervals look narrower than they are.

Intervals are 95% percentile bootstrap intervals over items (2,000 resamples with a fixed seed, so they are reproducible). When two models' intervals overlap, the ranking between them is not conclusive. Small categories have wide intervals; read category breakdowns as indicative.

Public dev split and private test split

Each task has a public dev split, published with the questions, every model's answers and the grading, for transparency and reproduction. A private test split, kept out of the public repository to limit contamination, is planned: v0.1 has none yet, so every score on this site comes from public items. When it exists, test items will keep their scores in published results with their inputs and outputs removed. Dataset files carry a canary string so they can be filtered from training data.

Versioning

Each results file records the benchmark version and a SHA-256 hash of the dataset items that were run. Scores from different benchmark versions are never mixed in one table; the site defaults to the newest version and offers a selector when older versions exist. When a model was run more than once on the same version, the most recent run is shown. Runs that include draft (not yet reviewed) items are marked as not official.

Time-sensitive items (tax rates, deadlines, office holders) carry an “as of” date showing when the answer was checked.

Cost and latency

Cost is the model's token cost for one complete run (all tasks and epochs), as reported by the endpoint (or the list price per million tokens when it reports none); judge cost is reported separately. Self-hosted models have no per-token price and show n/a. Latency is the median time per request and depends on the endpoint used as much as on the model.

Brazilian Portuguese markers (PT-BR drift)

A fixed list of forms that natural European Portuguese text would not contain: 144 words and expressions (vocabulary, spelling, Brazilian institutions) and 11 grammar patterns. 25 words that exist in both varieties with a different meaning (arquivo, time, fato, celular as an adjective…) are left out on purpose, with the reason. It is used twice: as 30% of the score of the PT-PT writing questions, and as the PT-BR column of the leaderboard, which counts markers per 10,000 words in every answer of every task (words the question contains do not count). List version 3; it still needs review by native speakers.

Grammar patterns

The full list, with the excluded words and the reasons, is in datasets/pt-language/ptbr-markers.json.

Licensing

Code is Apache-2.0. Data written by LayerX is CC-BY-4.0; third-party sources are listed per item with their licence. The exam questions reproduce official national exam papers and grading criteria (IAVE and EduQA, I.P.), which are official texts excluded from copyright (Portuguese Copyright Code, art. 8; Parecer PGR n.º 31/2016). Excerpts of other authors quoted in those papers are shown with their reference on each question page, under the quotation exception (art. 75(2)(g)).