surmenage · · budding · ml · evaluation · applied-ai · nlp

grading an nlp pipeline on world heritage plans against expert labels

the project

This is a volunteer contribution to a research project in architecture at TU Delft. The project applies NLP to UNESCO World Heritage management plans, here 11 Dutch plans, to find where they talk about climate change adaptation. I joined mid-stream, in May 2026, so a lot of the first weeks went into working out what already existed and which parts were finished.

Two things existed and had never been compared.

The first is a manually coded dataset from a 2025 Sustainability paper. It has about 897 labelled sentences using a taxonomy of 26 strategy codes (for example Water management, Monitoring, Legislation, Stakeholder collaboration). The codes came out of an inductive grounded-theory process by a single annotator, and the paper reports no inter-annotator agreement. It is the best ground truth available, but it is not a strong one.

The second is an automated pipeline from a 2025 student capstone group. It extracts text from the PDFs, chunks it (1000 characters, 200 overlap, 2,636 chunks), embeds the chunks with three sentence-transformer models (LaBSE, MiniLM-L6-v2, MPNet-base-v2), and scores each chunk by cosine similarity against 915 concepts from the IPCC AR6 glossary. Dutch is translated to English first for MiniLM and MPNet; LaBSE skips that step. Nobody had validated its output.

the problem

The two sides do not share a vocabulary. The humans labelled with 26 heritage-management codes and the pipeline ranks 915 climate-science concepts. To say whether the pipeline is any good you need a bridge between them, and the bridge is itself an unvalidated artefact.

The working scaffolding had two maps:

  • ψ aligns each labelled sentence to the chunk or chunks that contain it, by substring match. One sentence can land in several overlapping chunks.
  • φ maps each of the 26 codes to a set of IPCC concepts, using exact, fuzzy-string and cosine matching, with confidence bands for each.

ψ and φ were mostly built by a student assistant before I arrived. My part was the evaluation that sits on top of them.

the evaluation plan

I recomputed everything from the stored embeddings instead of using the pipeline’s own result CSVs. Those files are pre-filtered by z-score, so ranking metrics computed on them would silently miss relevant concepts that had already been dropped. The script computes full unfiltered similarity matrices.

There are three set-ups, because the labels are per sentence and the pipeline works per chunk:

optionqueryranked listrelevance comes fromwhat it tests
Achunk embedding915 IPCC conceptsφthe deployed pipeline as it is
Bfreshly embedded labelled sentence915 IPCC conceptsφthe same task without chunk dilution
Ccode definition2,636 chunksψwhether a code can retrieve its own chunks

Metrics are MRR, Hit@1, Hit@3, Hit@10 and NDCG@5/10. I report both micro averages (over sentences) and macro averages (over codes), because a few codes dominate the data: Knowledge transfer has 113 sentences, Research gap has 1. For NDCG, φ_strict (fuzzy and cosine both exact) gets relevance 2 and φ_standard (any band) gets relevance 1. Where a sentence maps to several chunks, I take the max score and say so. 891 of the 897 sentences were usable after dropping rows with missing values.

results

Under the original φ, MPNet was best on A and B and MiniLM was best on C.

modelA: MRRB: MRRC: MRR
LaBSE0.0700.1590.200
MiniLM0.1400.1770.421
MPNet0.1690.1970.347

Absolute numbers are low. A few things explain why, and they matter more than the ranking of models.

Chunk dilution is real. Embedding the sentence instead of its 1000-character chunk raises MRR by 16% for MPNet and 127% for LaBSE. That is a structural weakness of the chunk-level design, not a model choice.

φ is almost all fuzzy string matching. φstandard covers 283 of 915 IPCC concepts. Of the unique concepts in it, 265 come only from fuzzy matching and 1 only from cosine. The cosine strong band (0.90+) matched no code at all, and φ_strict is non-empty for only 3 codes (_Adaptation, Climate change, Restoration). So the strict/standard NDCG distinction means nothing for 23 of the 26 codes.

Some codes are unreachable. Eight codes scored MRR under 0.01 on option B, including Stakeholder collaboration, Human activities and Heritage inclusion. Research gap has zero concepts in φstandard, so its score is zero by construction. The best codes were the ones with an obvious IPCC counterpart: _Soil subsidence at 0.83, Greenery at 0.68.

For codes where φ holds only 1 to 3 concepts out of 915, a random ranker would get an MRR of about 0.003, so the pipeline is far above chance there. Low absolute MRR reflects how hard the mapping is as much as pipeline failure.

the angle I took

The project had a list of candidate contributions: stronger retrieval baselines (BM25, hybrid, BGE-M3), an LLM zero-shot classifier, better concept mapping, a translation-penalty test, domain-adapted embeddings, and framing the whole thing as a reusable evaluation framework. My plan was to get first numbers, then add an LLM baseline and one stronger retriever, then write up with the framework as the contribution, since a method for grading unsupervised retrieval against a small qualitative codebook seems more reusable than yet another heritage pipeline.

The first numbers pointed somewhere else. If φ is the ceiling, improving retrieval models is the wrong first move, so I went after φ.

The original cosine column embedded concept names only, such as “Water management” against “drainage”. I rebuilt it by embedding “name: full definition” strings on both sides with MPNet, keeping matches at cosine 0.50 or higher, and merging with the fuzzy matches. No retrieval model was touched.

original φdefinition-enriched φ
unique IPCC concepts covered283 (30.9%)368 (40.2%)
cosine-only unique concepts1188
MPNet MRR, option B0.1970.289
MPNet MRR, option A0.1690.268

MiniLM and LaBSE improved in the same direction, by up to 116% for LaBSE on option A. Three of the stuck codes were rescued: Human activities went from 0.009 to 0.407, Heritage inclusion from 0.007 to 0.140, and Limited heritage inclusion from 0.005 to 0.199. Four did not move: Stakeholder collaboration, Coherence, Research and Research gap. My reading is that these are heritage-management ideas with no counterpart in the IPCC glossary, so the glossary is an insufficient vocabulary for judging them. That is an interpretation of the numbers; I have not tested it, for example with an LLM mapping or an expert rating.

One caveat on the experiment itself: the 0.50 threshold was my choice and I did not tune it. Since the improved φ is built with the same family of embedding models being graded, some of the gain could be circularity. I have not separated that out.

status

Done: ψ and φ loaded and checked, options A, B and C across three models, φ coverage and per-code analysis, the definition-enriched φ, and a briefing document for the project leads. The scripts are run_eval.py, rich_analysis.py and verify.py, and the full CPU run takes about 7 minutes.

Not done:

  • No LLM zero-shot baseline and no BM25, hybrid or BGE-M3 baseline.
  • No expert rating of φ, so its precision is unknown.
  • No second annotator to check the ground truth.
  • No translation-penalty experiment, so the LaBSE gap is unexplained.
  • Several things are unconfirmed with the project leads: whether the 897-row sheet is the final ψ, the target venue, and whether an adjacent 2025 paper from the group overlaps with the planned angles.
  • Coarser evaluation on the 70 IPCC concept clusters built by the earlier assistant, and the extension beyond the 11 plans, are untouched.

The next thing I would do is an LLM-assisted φ and an LLM zero-shot code classifier, since they address the four codes that definition embeddings could not rescue. No write-up exists yet.