I Asked Gemini to Read 300-Year-Old Portuguese Parish Records | Mario Filho | Machine Learning
Table of Contents
Why This Extraction Matters
The Benchmark Data
What The Model Is Asked To Do
How Scoring Works
Experiment Results
Do Older Records Score Worse?
What Separates T0 And T1, Exactly?
Why Did I Test Only Gemini Models?
A Few Interesting Rollouts
When Decomposition Recovers Structure
One Page Where T1 Was Worse
A Rare Self-Correction
The Opening Page, Side by Side
Limitations and Conclusions
A Note On Verifiers
Can you read this page?
This page was written in a Portuguese parish in 1693.
It holds three baptism records in running cursive, densely abbreviated.
The first child was baptized “aos 30 de agosto de 1693 annos” — on August 30, 1693.
The second, “aos 2 de 7.bro” — 7bre being the period abbreviation for September.
The third entry records only one parent, and the ink has faded to the edge of legibility.
In the left margin, the priest repeated each child’s name and hamlet — An.to / Vila, Mathias / Poutena — a seventeenth-century finding aid.
I ask language models to turn pages like this into structured genealogical data—not a full transcription, but the people and relationships needed to identify someone and connect them to a family.
For this page, the expected answer is:
"arquivo": "PT-ADAVR-PAND13-1-3_m00009.jpg",<br>"assentos": [<br>"tipo": "batismo",<br>"data": "1693-08-30",<br>"local": "Bemposta",<br>"nome_principal": "Maria",<br>"nome_do_pai": "Domingos Jorge",<br>"nome_da_mae": "Isabel Francisca"<br>},<br>"tipo": "batismo",<br>"data": "1693-09-02",<br>"local": "Vila",<br>"nome_principal": "Antonio",<br>"nome_do_pai": "Antonio Francisco",<br>"nome_da_mae": "Maria Francisca"<br>},<br>"tipo": "batismo",<br>"data": "1693-09-22",<br>"local": "Poutena",<br>"nome_principal": "Matias",<br>"nome_do_pai": "Manoel José"
This JSON is the human reference: my reading of the page, record by record.
Three choices in this reference shape the evaluation.
First, the schema is in Portuguese—the language of the corpus and my native language.
Each assento (record) includes a tipo (type), date, place, nome_principal (the person the record concerns), and any parents named in the document.
Second, the reference records only what the page states. The third entry names a father but no mother, so the annotation preserves that absence rather than filling the gap.
Third, the task requires more than character recognition.
Abbreviations must be expanded (7.bro → September, M.a → Maria), historical spellings modernized, and place names recovered from cramped marginalia—in the third entry, from ink that is barely visible.
This image is one of 84 in the benchmark. The rest of this article examines what models get right, what they get wrong, and what changes when I let them investigate the image instead of answering in one shot.
Why This Extraction Matters#
I started building my own family tree in 2022.
That hobby quickly led me to Portuguese parish records, to the slow, rewarding work of reading them by hand, and to the question behind this article: can current AI reliably extract the people mentioned in these documents?
For anyone researching Portuguese ancestry, parish records are the backbone source.
From the sixteenth century until civil registration took over in the early twentieth century, the local parish was where baptisms, marriages and deaths were written down.
Many of these books are now digitized and published online by Portuguese archives, including the two whose collections I use here: the Aveiro District Archive (ADAVR) and the University of Coimbra Archive (AUC).
But digitized pages are not searchable data (yet).
Finding an ancestor today usually means guessing which books might mention them and then reading, page after page of this pleasant calligraphy.
What an (amateur) genealogist actually needs from each record is relational:
Record type<br>Fields that matter most<br>Why
Baptism<br>Child’s name; baptism date; parents’ names; location<br>In early records the baptism date is often the only dated fact about a person; the parents link the child to the previous generation
Baptism, after ~1700<br>Paternal and maternal grandparents, when present<br>Later records increasingly name them, expanding the tree two generations at once
Marriage<br>The couple’s names; each spouse’s parents<br>Marriages connect two lineages — and are often found by tracing all of a couple’s children
Death<br>The deceased’s name; spouse or father, when present<br>These disambiguate the person and preserve family links
An isolated name rarely solves a search; a name, plus parents, plus a place usually does.
That is why this benchmark measures the extraction of people and relationships, not full-text transcription quality.
The Benchmark Data#
I built the reference set by reading 84 digitized images from 17 parish books — nine from ADAVR, eight from AUC — and manually extracting the same structured fields shown...