Download README.en.md from Changetheblock/LicitaBench: direct link, hf CLI and curl.
- Browser
- Download file 14.8 kB
-
https://huggingface.co/datasets/Changetheblock/LicitaBench/resolve/main/README.en.md
- Command line
-
hf download hf://datasets/Changetheblock/LicitaBench/README.en.md
-
curl -L -o README.en.md https://huggingface.co/datasets/Changetheblock/LicitaBench/resolve/main/README.en.md
LicitaBench
An open benchmark for reading Spanish public procurement documents. It measures whether a language model extracts from a tender's administrative clauses document (PCAP, pliego de cláusulas administrativas particulares) what a bid manager needs before deciding to bid: how much, until when, for how long, which procedure, which award criteria score points, and what is required to be admitted.
Provisional name. Version 0: public PLACSP data, reproducible code, verifiable results. Versión en castellano.
Built by ChangeTheBlock (Insurechain S.L., Madrid). Code under the MIT license; data (labels, evidence and metadata) under CC BY 4.0.
What it measures
| Task | Question to the model | Reference label | Metric |
|---|---|---|---|
| T1 Notice fields | Base budget excluding VAT or estimated value, submission deadline, duration, main CPV code, procedure type, contracting authority | Automatic: CODICE fields from the PLACSP notice, accepted only when they appear in the document text | Per-field accuracy (amount within 0.5 %, accepted when it matches either the base budget or the estimated value returned by the model; dates to the day; 8-digit CPV; authority name with token tolerance) |
| T2 Award criteria | List of criteria with points and type (automatic or value judgement), points per type, price formula, technical threshold | Proposed by Claude, verified by a person | Set F1 over criteria (strict and by points plus type), accuracy of sums, token F1 of the formula |
| T3 Admission | Economic standing and its threshold, technical capacity, required certifications (ENS and level, ISO 27001, ISO 9001...), professional authorisation | Proposed by Claude, verified by a person | Accuracy per requirement, F1 over certifications (with and without the mandatory flag), threshold within 1 % |
| T4 Bid committee questions (optional) | "Can a company founded in 2019 with a turnover of 1.1 million bid?": yes or no with a justification | Question and answer proposed by Claude from T3, verified by a person | Accuracy |
The input to every task is the full PCAP text (20,000 to 250,000 characters). Models with a short context are evaluated on truncated text and the truncation is recorded in the result.
Data
- Documents: PCAP PDFs published on Spain's Public Sector Procurement Platform (PLACSP, contrataciondelestado.es) and on the regional platforms that PLACSP aggregates (Catalonia, Basque Country, Madrid region). Tenders published between February and October 2026.
- T1 labels: the structured CODICE data that PLACSP publishes as open data in its ATOM feeds next to each notice. They are the benchmark's "free" reference: nobody typed them by hand, but every value was checked against the document text before being accepted.
- T2, T3 and T4 labels: initial labelling with Claude (Claude Code headless mode,
claude -p, on a subscription) and a human verification queue inverificacion/pendientes.jsonl. No item counts as verified without the reviewer's name. - Where the list of tenders comes from: the database of ChangeTheBlock's tender agent, which reads the PLACSP feeds daily and filters by keywords and IT-services CPV codes. The sample therefore has more services, consulting and IT supplies than works: it is not representative of all public procurement.
The dataset card, with fields, construction method, reuse conditions and limitations, is in DATASET_CARD.md (in Spanish).
Version 0 figures (built on 2026-11-22)
- Tenders in the source database: 5.072; with a linked PCAP: 1.221.
- PDFs downloaded: 1.183. Tenders with no downloadable PDF: 38 (documents in other formats discarded: 18; broken or non-PDF links: 27).
- T1 items accepted: 1.013 (at least 3 of the 6 CODICE fields match the text). Documents discarded for fewer than 3 aligned fields: 164.
- Detected language of the accepted items: es 861, ca 138, eu 11, gl 3.
- Extraction (documents with text): pdfplumber 1160, tesseract 17.
Aligned fields (a label exists for a field only when its value appears in the document):
| Field | Items with label | % of items | Main discard reason |
|---|---|---|---|
| Amount | 977 | 96 % | importe_no_aparece (184) |
| Procedure | 947 | 93 % | procedimiento_no_aparece (53) |
| Contracting authority | 920 | 91 % | organo_no_aparece (159) |
| Main CPV | 894 | 88 % | cpv_no_aparece (280) |
| Duration | 572 | 56 % | duracion_sin_contexto (315) |
| Submission deadline | 93 | 9 % | fecha_no_aparece (1084) |
What failed or is worth knowing:
- The submission deadline is almost never in the PCAP (it is in the notice), hence its low support.
- The notice amount may be the estimated value or the base budget excluding VAT. By context in the document: ambiguo 375, valor_estimado 317, presupuesto_base 195, unidentified 90.
- The notice duration came without a unit; it was searched in the text as months, years or days (detected: meses 332, años 240). Cases in days were discarded.
- The notice procedure 'Abierto' (open) is discarded when the document mentions the simplified open procedure at least as often (
texto_dice_simplificado).
Human verification queue (labels proposed by Claude, not yet verified): T2 0, T3 0, T4 0. Verified: T2 58, T3 60, T4 29.
T1 baseline
Accuracy in % per field over the sampled items that have that label (support in brackets). 'Media campos' is the mean of the six columns; 'Micro' is accuracy over all labels pooled. Full and per-item tables in results/.
| Modelo | n | Importe | Plazo | Duración | CPV | Procedimiento | Órgano | Media campos | Micro | Errores | Fecha |
|---|---|---|---|---|---|---|---|---|---|---|---|
| claude:claude-opus-5-5 (es) | 100 | 100.0 (95) | 88.9 (9) | 96.7 (61) | 92.0 (87) | 100.0 (90) | 63.5 (96) | 90.2 | 89.7 (438) | 0 | 2026-11-22 |
T2 baseline
Percentages over the T2 documents verified by a person. Full and per-item tables in results/.
| Modelo | n | F1 criterios | F1 puntos+tipo | Pts. autom. | Pts. juicio | F1 fórmula | Umbral | Errores | Fecha |
|---|---|---|---|---|---|---|---|---|---|
| claude:claude-opus-5-5 | 58 | 97.1 | 97.5 | 100.0 | 96.6 | 87.2 | 100.0 | 0 | 2026-11-25 |
How to read Claude's row: the T2 reference was built by reviewing proposals from the same model with the same prompt, so the figure is inflated by anchoring. On the 48 items the person kept as Claude proposed them, criteria F1 100.0 and formula F1 94.7; on the 10 that were corrected, 83.4 and 51.5. The anchoring-free measure is the blind sample of 20 items (annotated by the person without seeing any proposal): Claude 87.4 criteria F1 against the person. For other models the reference is not biased in their favour.
T3 baseline
Percentages over the 60 T3 documents verified by a person. The T3 prompt includes the approved annotation conventions (lot 1, threshold calculation, company certifications, alternative routes, ENS, licensing).
| Modelo | n | Solv. econ. | Umbral | Solv. técn. | F1 certif. | F1 certif.+oblig. | Habilitación | Errores | Fecha |
|---|---|---|---|---|---|---|---|---|---|
| claude:claude-opus-5-5 | 60 | 100.0 | 91.7 | 100.0 | 98.0 | 98.0 | 98.3 | 0 | 2026-11-26 |
How to read Claude's T3 row: the reference comes from reviewing Claude's proposals, so the figure is inflated by anchoring. Threshold, certification F1 and licensing: 90.9 / 99.7 / 100.0 on the 44 items kept as Claude proposed them; 93.8 / 93.2 / 93.8 on the 16 corrected ones. Three reference labels (19835153, 20743254 and 19931080) were corrected after seeing this baseline, once it was checked that they did not apply the lot-1 rule; all three now match the prediction, so this row counts them in Claude's favour. The anchoring-free measure is the 10-item blind sample: threshold 80 %, certification F1 56.7 % and licensing 70 % (earlier Claude, without the rules in the prompt).
T4 baseline
Yes/no accuracy over the 29 verified questions (one was rejected as ambiguous). The prompt includes the T4 rules and the T3 conventions.
| Modelo | n | Exactitud | Errores | Fecha |
|---|---|---|---|---|
| claude:claude-opus-5-5 | 29 | 100.0 | 0 | 2026-11-26 |
How to read Claude's T4 row: Claude wrote each question knowing its answer, from its own T3 labels, so 100 % mainly measures self-consistency. In the blind sample a person answered 10 questions without seeing the answers and agreed with Claude on the 9 not marked as ambiguous.
How to reproduce
Requirements: Python 3.11 or later, pdfplumber, pyarrow, requests. For OCR of image-only
PDFs, tesseract and pdftoppm (poppler) on the PATH. To evaluate Claude, claude (Claude
Code) with an active login. No GPU.
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
Build the dataset (downloads the public PDFs, extracts text, aligns with CODICE, removes signatory names and writes
data/dataset/t1.jsonl,t1.parquet,documentos.jsonlandestadisticas.json). It needs the copy of the source database atdata/origen/ctb.db; without it, the repository already ships the labels and links, and the text is regenerated from the URLs int1.jsonl..venv/bin/python -m licitabench.build_datasetEvaluate a model on T1 (fixed sample of 100 Spanish-language items, seed 42):
.venv/bin/python -m licitabench.evaluate --tarea T1 --modelo claude:claude-opus-5-5 --n 100 --idioma esIf the run is interrupted (for example by the subscription's usage limit), the batch stops, the log says how many items remain, and rerunning the same command resumes where it stopped;
--solo-cachescores what is already there without calling the model.Other runners:
openai:<model>@<base_url>for any OpenAI-compatible server (vLLM, llama.cpp, TGI) andtransformers:<model>for small local tests. Ready-made commands for ALIA-40b, Salamandra-7b, Qwen and Llama are in scripts/servir_modelos_abiertos.md; they have not been run: compute is the evaluator's decision.Label T2, T3 and T4 with Claude and verify them (verification walks the queue item by item in the terminal: it shows the proposal and the document fragments that support it, and records yes, no or a correction):
.venv/bin/python -m licitabench.etiquetar --tarea T2 --n 60 .venv/bin/python -m licitabench.etiquetar --tarea T3 --n 60 .venv/bin/python -m licitabench.etiquetar --tarea T4 --n 30 .venv/bin/python -m licitabench.verificar revisar --tarea T2 --por "Name Surname"The verification workflow is in verificacion/README.md.
evaluate.pyuses only verified items for T2, T3 and T4; with--incluir-pendientesit also scores against the proposals and marks the result as provisional.Regenerate the results table:
.venv/bin/python -m licitabench.evaluate --tablawritesresults/RESULTADOS.mdfrom everyresults/T*_*.json.
Raw model outputs are cached in results/raw/ and are not repeated on later runs, so an
interrupted evaluation resumes where it stopped.
Tests: .venv/bin/python -m pytest -q tests.
Why it matters
- Public procurement is a real use of AI in the public sector. In Spain the Public Sector Procurement Platform centralises tender publicity under article 347 of Law 9/2017 on Public Sector Contracts, and publishes the data openly. Reading tender documents is the first step for any company that wants to bid, and for any authority that wants to compare or review its own. A model that confuses the estimated value with the base budget, or one solvency threshold with another, excludes the wrong bidder or loses the tender.
- The EU AI Act (Regulation (EU) 2024/1689, in force since 1 August 2024) requires public bodies deploying high-risk systems to carry out a fundamental rights impact assessment (article 27) and to be transparent about how the systems work. Measuring, with public data and a reproducible method, what a model gets right and wrong on real administrative documents is part of that diligence.
- Open models in Spanish need tests in Spanish. ALIA-40b, from the Barcelona Supercomputing Center, was trained on 35 European languages with Spanish, Catalan, Galician and Basque oversampled, under an Apache 2.0 license; Salamandra-7b-instruct is its smaller sibling. A tender benchmark allows these models to be compared with frontier models on a task where data cannot leave the organisation, which is the case for many deployments in public administrations and in the companies that work with them.
- We found no other. In the search we ran on 22 November 2026 we did not find a public benchmark for reading Spanish tender documents; if one exists, please tell us so we can cite it. There is a German one for the public sector (MÖVE, arXiv:2606.13111, June 2026, evaluating 39 models on summarisation, question answering and topic extraction) and entity-extraction work on tenders noting that procurement data is rarely open. In Spain it is: PLACSP publishes notices and documents openly, and that makes this benchmark possible.
Internal review
.venv/bin/python scripts/revisar.py generates a local REVISAR.md (in Spanish, not published): every
claim in the README with where to check it, 20 T1 items with the label, Claude's answer and the document
fragment, and the T2 items as one screen per item.
Rules followed
- Only public documents from PLACSP and the aggregated platforms. No ChangeTheBlock bids, no client projects, no internal data.
- No personal data in what is published: links and labels are published; the extracted text is regenerated locally and signatory names are removed before it is stored.
- Every statement in this README has been checked: the reuse conditions were consulted at the
source on 22 November 2026 and are quoted in the dataset card; the figures come from
data/dataset/estadisticas.jsonandresults/. - Claude is used through
claude -pwith a Claude Code subscription; no key or token is stored in the repository. The runner always removesANTHROPIC_API_KEYfrom the subprocess environment and checks access with a minimal call before every batch: on 22 November 2026 an earlier version let the environment key through and 76 calls were billed to the API until its monthly spend limit was reached.
Citation
If you use LicitaBench, cite the repository and the data source: "Origen de los datos: Plataforma de Contratación del Sector Público, Ministerio de Hacienda".