How Àgora checks the promises an AI extracted from party manifestos

Àgora is a Vedratic site for voting informed on 29 November 2026. One part of it is an inventory of the commitments in the manifestos and investiture agreements of 11 parties after the general election of 23 July 2023, set against what those parties have tabled and voted in the XV legislature. As of 8 November 2026 the inventory has 7,065 commitments. An AI extracted each one and an AI decided its status. Nobody reads all 7,065.

That only works if the checks around the AI are mechanical: scripts and tests that fail, not a promise to be careful. This post follows a commitment through them, with real code, and ends with what they do not catch. Status counts come from the site’s open data, /data/promises.json, counted on 8 November. Quote checks, coverage and tests were run on the Àgora repository at commit cb5f1ea (5 November), whose data matches that file.

A quote that isn’t on the page doesn’t get in

Every commitment carries a quote of at most 300 characters and the PDF page it comes from. validate.mjs looks the quote up in the text we extracted from that page. If it is not there word for word, the commitment does not enter. The protocol says there is no allowlist and no exception.

The comparison ignores layout, not words: whitespace, typographic quotes, dashes, bullets and words split at the end of a line are normalised, and […] is accepted between fragments that appear in order. From scripts/promises/lib.mjs:

export function quoteInPage(quote, pageText) {
  const segs = quoteSegments(quote);
  if (!segs.length) return false;
  for (const join of [true, false, null]) {
    const hay = normText(pageText, join);
    let pos = 0;
    let ok = true;
    for (const seg of segs) {
      const i = hay.indexOf(seg, pos);
      if (i < 0) { ok = false; break; }
      pos = i + seg.length;
    }
    if (ok) return true;
  }
  return false;
}

The three values of join are the three ways a line break can be read: join the word, keep the hyphen, or keep “hyphen space” as the PDF extractor wrote it. A test pins the strictness: the fixture page says “rio Arga”, and a quote that says “río” must fail (validate.test.mjs).

Counted with the project’s own loaders: 7,063 of the 7,065 quotes are on the page they cite, and 2 continue onto the next page, which the validator allows. 309 use […]. node scripts/promises/validate.mjs --allow-evaluated reports 0 errors and 1 warning (a summary of 267 characters). The 19 registered documents add up to 1,304 pages, and a test compares the stored text with each document’s SHA-256. One of them, the PSOE–PNV agreement, is a scanned PDF with no text layer. A quote cannot be verified against it, so nothing was extracted from it.

Counting what the extractor left out

A literal quote proves a commitment is real. It says nothing about the ones that were skipped. For that, each document is split into chunks of at most eight pages, a second count is made per chunk, and coverage.mjs compares. Below 90 % the chunk is redone. Simplified from scripts/promises/coverage.mjs:

const ref = independent[c.id];
const ratio = ref === undefined ? null : ref === 0 ? 1 : extracted / ref;
return { id: c.id, extracted, independent: ref ?? null, ratio, ok: ratio !== null && ratio >= min };

Today all 191 chunks pass, the lowest at 95.5 %. That result is weaker than it looks, and we would rather say why:

So coverage is a test of the pipeline, not yet proof that the inventory is complete.

Evidence only from records that exist

For each commitment, a keyword search (BM25, written by hand, no dependencies) proposes up to about eight candidates from data/legislature/: laws, decrees, Council of Ministers agreements, Congress and Senate initiatives and votes. The evaluator may link only a candidate, and the validator checks it anyway. Simplified from scripts/promises/rules.mjs:

if (x.kind === 'llei' || x.kind === 'decret-llei') { const l = ctx.laws.get(x.ref); ok = !!l && l.kind === x.kind; }
else if (x.kind === 'iniciativa') ok = ctx.initiatives.has(x.ref);
else if (x.kind === 'votacio') ok = ctx.votes.has(x.ref);
if (!ok) e(`${where}: la referència ${x.kind} ${x.ref} no existeix`);

The data has 2,709 references: 920 as evidence of compliance, 1,286 initiatives a party tabled and 503 votes. All resolve. Some votes are refused even though they exist: amendments, vetoes, debates on the whole text and procedure votes express no position on a measure. The Government’s own Cumpliendo reports can support a status but never be the only reason for one.

Two evaluators, and “not evaluated” when they differ

Two agents, A and B, read the same batch of 30 commitments with the same candidates, without seeing each other’s output. combine.mjs keeps only what both said: the same status and the references both linked. Anything else becomes sense-avaluar (“not evaluated”) with the note “Avaluació no concloent.” After combining, the result goes through the hard rules once more, and if it fails it is withdrawn. Simplified from scripts/promises/combine.mjs:

const finalErrs = evaluationErrors(result, ctx);
if (finalErrs.length) {
  Object.assign(result, { status: 'sense-avaluar', evidence: [], note: INCONCLUSIVE_NOTE });
}

Disagreements get a third reading, by a different model, that can choose only A, B or sense-avaluar. It cannot write a new answer or add evidence that neither evaluator had. In the data, 487 commitments carry agreement: false. 379 of them have a third-reading decision (184 for A, 190 for B, 5 for sense-avaluar) and 39 still carry the inconclusive note.

One thing the data shows plainly: in 6,044 records the review.model field names a single model, claude-sonnet-5-5, so A and B were the same model. Agreement between them rules out noise. It does not rule out a mistake both would make. We come back to this below.

Hard rules for each status

The strongest control is that a status cannot be written without the right kind of record. The protocol lists 25 hard rules, and the validator applies them to every commitment. In short:

StatusWhat the rules demand
complert (fulfilled)A law or validated decree-law. A royal decree or order only if the pledge is not of kind llei; a Council of Ministers act or BOE section III act only if it is not llei or fiscal
parcial (partly fulfilled)At least one record, and not only Cumpliendo
en-tramit (in progress; shown as lapsed on the site)A bill or private member’s bill expired by the dissolution of the Cortes. Never a motion or a non-binding proposal
no-complert (not fulfilled)A failed initiative, a repealed decree-law, a missed official indicator, or no record at all with a literal note, with extra checks outside laws and taxes
contradit (contradicted)A vote against a measure in line with the pledge, a vote for a contrary one, or a contrary initiative
any status without a recordOnly sense-avaluar or no-avaluable

Simplified from scripts/promises/rules.mjs, the rule for complert:

if (status === 'complert' && !ev.some(lawOk) && !decreeOk && !actOk && !indicatorOk && !pactOk && !noteOk) {
  e('complert exigeix una norma enllaçada: llei o decret llei convalidat de laws.json (o un reial decret o una ordre, ...)');
}
if (status === 'complert' && p.kind === 'llei' && ev.some(isDecree)) e('una llei promesa no es compleix per decret (com a molt, parcial)');

The rank rule has a visible effect. Of the 145 complert commitments, 65 rest on a law or decree-law, 29 on a royal decree or order, 41 on a Council of Ministers or BOE section III act, 7 on an official note that another source confirms, and 3 on one vote: the renewal of the State Pact against gender violence, a written exception tested on its own. Counted in that order when several apply. All 49 complert commitments of kind llei rest on a law or decree-law. Another 23 commitments of kind llei are parcial because a decree, order or act did exactly what was promised but not with the rank promised.

Of the 3,512 commitments of parties outside the Government, none carries a government-only status (complert, parcial, en-tramit, no-complert): the validator forbids it, because an opposition party cannot publish a law. Only 3 commitments are contradit.

npx vitest run scripts/promises runs 378 tests in 21 files, one of which validates all 7,065 commitments against the hard rules.

The error we measured

Before publication, Opus, a different model from the evaluators, reviews a random sample stratified by status, with at least 20 per party. A party passes if its status and summary errors are at most 5 % and its category errors at most 10 %. With 20 per party, one error is already 5 %.

The first sample (27 October, 220 commitments) failed: 10 of 11 parties were over the threshold. Of 34 errors, 28 were summaries that added something the quote did not say, 5 were statuses and 1 was a category. That led to summary-check.mjs, a detector that flags summaries with words, proper nouns or numbers that are not in the quote. Its 27 October snapshot flagged 1,485 of 7,065 summaries, which were rewritten. The second sample, drawn with a different seed, had 7 errors in 220 (3 summaries, 3 statuses, 1 category) and all 11 parties passed.

No sample has been drawn since, and the statuses have changed a lot: a third reading, several re-evaluation rounds and, on 5 November, a round of six rules that moved 652 commitments. The protocol requires a second reading to confirm any change to a compliance state. That is a control, not a measurement.

What these checks do not catch

A literal quote can be a cut one. The check proves the words are on the page, and a quote that stops mid-sentence is still literal. The first status review found cut quotes and completed 152 of them from the PDF.

The search misses acts that are in the data. In a hand diagnosis of 60 pledges with no status, 19 had an act that fulfils them, and for 12 of those the act was already in our data but the search had not offered it. The extrapolation was about 20 % of the unevaluated pledges, with a rough interval of 10 to 30 %. A wider search for acts, added afterwards, found the expected act among its candidates in 6 of 14 held-out cases, against 3 of 14 before. Better, not solved: 873 of the 3,519 Government commitments (24.8 %) are still “not evaluated” as of 8 November. Failing here usually gives “not evaluated”, not a wrong verdict. That is the intended direction of the error.

“Not fulfilled” can mean “not found”. Of the 318 no-complert commitments, 303 have no record at all: 273 of kind llei or fiscal, and 30 of other kinds that passed an extra check (a data search, two web searches and a second reading). The 5 November diagnosis checked four pledges of this type on the web, and three had something. The note says “no norm, decree or initiative on record”, but this is the weakest status.

Same model, same candidates. A and B read the same candidate list and, in 6,044 records, are the same model. A missing record or a shared misreading affects both. This is our inference from those two facts, not something the data measures.

The opposition is read only through the Plenary. The data cover initiatives, votes and oral questions in the Plenary of Congress. They do not cover amendments or committee votes. A hand review of 300 “no initiative or vote” commitments found 7 that were clearly wrong (2.3 %) and 9 more that were ambiguous (16 in all, 5.3 %).

Other known gaps. The budget test compares current euros against the 2022 base, so a rise that inflation absorbs can still pass. The Basque and Galician texts were not read by native speakers. The key points of the norms used as evidence are AI-generated and only partly checked against the BOE.

What is missing. A new Opus sample on today’s data. A coverage recount that is independent for every document. Human reviewers: the plan says they will be added if the section works, and none have been. Until then, every status on the site is labelled as automatic and possibly wrong, with a link to correct it. You can recount the status figures from the open data (CC BY 4.0) or browse the commitments by party at Àgora.