Prologue
A few weeks ago, in Episode 91, I attempted to convince you (and myself) that we humans make a lot more mistakes than we think we do. I provided lots of evidence: spreadsheets with errors, folks claiming they could land a plane, and my favorite: a frog labeled as a cat by multiple people. This week, I want to talk about how we can measure AIs and humans, and what being “right” even means.
There has been a lot of news recently about how the field of mathematics has “fallen to AI.” By fallen, they mean that AI has solved some of the Millennium Prize problems—things considered the hardest math problems of our generation (or more)! One interesting thing about these AI-generated proofs is that they all rely on a technology called Lean. Lean is essentially a programming language designed to express mathematical proofs. That’s how we know that an AI solved a math problem even if we don’t understand how.
Other fields, like GIS, don’t have a formal proof language like this, so knowing that an AI did something right is more subjective than it is with mathematics. I want to propose that we as GIS folks standardize on a formal proof language, but that is for a future newsletter.
This week, let’s start by seeing if we can compare humans vs AI vs “the right answer” on a relatively simple task: classifying land cover!
TL;DR: Agreeing with the map isn’t the same as being right. Statistics (Kappa Scores) can help us take the luck out of measuring agreement so that you can see whether your AI is as good as your humans.
Kappalogue
I created a quiz that pits each of us (I’m hoping that you all play along) against the “true” answer and an AI. We are looking at 12 aerial photos from around Portland, each about 65 meters across, from the USDA’s July 2024 imagery. To take my quiz (it's fun, promise!), you just need to pick the one land-cover class that best describes what’s inside the circle in the middle: tree, shrub, grass, crop, built, bare, water or wetland.
It should be simple, right? Go ahead and take the quiz; I’ll wait!
My first victim customer—other than myself—was Holly. After she took the test, I got on a quick call with her to review her results and collect feedback on the quiz. She said:
58% I agreed with the map. Which means I was only right 58% of the time, I think. […] I’m terrible at this.
She isn’t terrible at this! Agreeing with the map 58% of the time might mean she was wrong, or it might mean the map is wrong. She also agreed with the AI 60% of the time. And the AI agreed with the map 60% of the time. So… who is right? Do we assume the original mapmakers classified it correctly? What if they were in that group from a few weeks ago that called that green frog a cat?
The quiz (Spoilers ahead)

The map answers, as I’ve called them, come from ESA WorldCover, a global land-cover map. I think we in GIS would often rely on a dataset like that as the truth and compare any new data to that reference map to see what matches. But maybe there’s a better way to measure how well they match.
I will also note that this isn’t a perfect test; I had Jaws pick these images, and they don’t line up exactly with the ESA WorldCover grid, but I didn’t catch that until after I had already given the test to Holly, and now it is kind of late on publish day, so I’m gonna just go with it. The point about the Kappa scores and the math is all still valid, and we don’t really need to nitpick over the exact land cover types. What matters is that we disagree!
Before we dive into the numbers here, let’s look at one of these examples: Tile 5.

This was one that Holly “missed.” I would describe this as a house with a yard, but what we care about is what is under the circle. Holly called it a shrub, I said grass, and Claude said built. The map calls it a tree—that’s four different answers! Which one of us is right or wrong? It might depend on the exact definition of each of these classes, true, but the ambiguity still exists, and we want to measure that ambiguity.
The rest of the data
We have a small sample of comparisons we can look at here. I took it twice (about a day apart), Holly took it, and Claude took it 10 times (each time in a fresh session, with no background other than its own training).
| Agreement | Kappa | |
|---|---|---|
| Me vs. me (Sunday vs. Monday) | 92% (11 of 12) | 0.89 |
| Claude vs. Claude | 97% | 0.96 |
| Me vs. Holly | 75% | 0.66 |
| Me vs. Claude | 68% | 0.57 |
| Holly vs. Claude | 60% | 0.44 |
| Me vs. the map | 58% | 0.44 |
| Holly vs. the map | 58% | 0.42 |
| Claude vs. the map | 60% | 0.41 |
| Random guessing vs. the map | 12.5% (1 in 8) | 0.00 |
This is actually pretty interesting to me. First, note that I am internally consistent with a 92% agreement rate between my two runs. Of course, Claude is also consistent with a 97% agreement rate. (On 11 of the 12 tiles, all 10 of Claude's runs gave the same answer. For tile 12 it was split 8 tree / 2 grass.)
Holly and I agree with each other a bit more than either of us agrees with Claude, but not by a lot. Every pair of us is somewhere between 60% and 75%.
All three of us agree with the map about the same amount, right around 60%. As Holly put it, "I was 58%, Claude was only 60%. I guess Claude's not that much better than me at this, or the map's wrong."
One thing we haven’t measured yet is the last row in my table: Random Guessing. Random guessing is the rate at which, if you were to flip a coin (or use some other source of randomness, like lava lamps), you would match with another person (or in our case, the map).
Imagine you had an 8-sided die and rolled it for each tile instead of looking and making an educated choice. That means on each tile, you have a 1 in 8 chance (12.5%) of agreeing with whoever you're compared to (a person, Claude or the map, it doesn't matter).
So even with zero skill, you'd match about 1 tile in 8 just by luck. We can’t distinguish between luck and skill very well, so we assume that luck is baked into every score. We need a way to take it back out. That’s what the Kappa score is for.
So what's kappa?
The problem with measuring using percent agreement is that some of it happens by luck. Kappa (just the Greek letter κ; Jacob Cohen introduced it in 1960) is basically the agreement score with luck taken out. A kappa of 1 means there is perfect agreement, while a kappa of 0 means that the two groups did no better than chance.
Interestingly, kappa also accounts for each person’s habits. For example, if you labeled more locations as “tree” than anything else, kappa assumes your guesses lean toward tree too.
Let’s say that two people flip coins for “tree” or “not tree.” If the coins are perfectly fair, they will match half the time. Now, if we load both coins to say “tree” 9 times out of 10 (similar to how our map answers lean toward tree), they would match 82% of the time.
So, if you two actually looked at the photos and matched 88% of the time, that feels pretty good, but the kappa score would only be 0.33 because it was based on the weighted coin (this is the same as us accounting for our bias of picking tree).
If you based it on the even coin, the kappa score would be 0.76 instead.
The math is a little messy and involves summations, so normally I would call a function (or ask Claude to), but let’s walk through how it’s computed using Holly vs. me from above:
Step 1: How often did we agree? We picked the same answer on 9 of the 12 tiles.
Agreement = 9 ÷ 12 = 0.75
Step 2: How often would we agree by luck? For each class, we multiply how often I picked it by how often Holly picked it, then add those up. Think about it like our coins above. If I pick tree 25% of the time, and Holly picks tree 25% of the time that means two blind guesses both landing on tree is 25% x 25% of the time. Then each class is another way for us to match by luck, so we add them all together.
| Class | Me | Holly | Me × Holly |
|---|---|---|---|
| Tree | 3 of 12 | 3 of 12 | 0.25 × 0.25 = 0.063 |
| Built | 4 of 12 | 6 of 12 | 0.33 × 0.50 = 0.167 |
| Grass | 4 of 12 | 1 of 12 | 0.33 × 0.08 = 0.028 |
| Bare | 1 of 12 | 1 of 12 | 0.08 × 0.08 = 0.007 |
| Shrub | 0 of 12 | 1 of 12 | 0 |
| Chance agreement | 0.264 |
Step 3: Take the luck out.
Kappa = (agreement − chance) ÷ (1 − chance) = (0.75 − 0.264) ÷ (1 − 0.264) = 0.486 ÷ 0.736 = 0.66
Said another way: luck alone would have given us about 26% agreement. That leaves 74% up for grabs, and we agree on about two-thirds of that.
cohen_kappa_score(a, b), or just give Claude the two columns and ask it to compute kappa.Why I like it
Kappa isn’t perfect (we’ll look at some reasons why below), but it is a useful tool for a few reasons:
It lets us use the same measurement for people and AIs, and lets us compare them. We don’t need a special AI benchmark that has been meticulously reviewed; we can quickly get a feel for the quality of the data no matter where it came from. Researchers compared GPT-4’s judgments of chatbot answers with human experts’. It agreed with human experts over 80% of the time, which was about as often as the experts agreed with each other.
You also don’t need perfect data to start understanding quality. You simply need two people (or a person and an AI) to start comparing. If you compare two people and they agree 70% of the time, and an AI also agrees 70% of the time, then the AI is probably doing just fine.
You can also use it on a single person. If you rate the same thing twice (maybe a few days or weeks apart), you’ll see how much you disagree with yourself.
The disagreement itself can also help explain things that are happening. In our case, it can expose an unclear rule for land cover, or genuinely hard cases to identify.
Why I don't
Probably the biggest issue, and also the point I tried to make in the Prologue, is that agreement doesn’t mean right. Two raters can make the same mistake. More raters help, but only if they don't share the same blind spot. Those GPT-4 judges we talked about above agreed with humans a lot, but they also preferred whichever answer came first, or whichever answer was longer, so you have to control for and randomize things to make sure that you are measuring what you think you are measuring.
Remember our weighted coins above? That example can cut both ways. When one class dominates, kappa scores can make good raters look bad. This is a common complaint with kappa scores; the usual fix is to report agreement separately for each class so that one doesn’t push the rest out.
In 2011 there was a paper published called "Death to Kappa” (yes, really). Pontius and Millones' (the authors) point is that for maps, kappa conflates two different questions into one measurement: Did you get the right amount of each class? And did you put it in the right place? They want those two reported separately. I think they have a point, but if you are paying attention to what you are measuring, it still works.
There are also a bunch of problems with my mini-quiz, like too few images and no defined rules for the land cover classes. It isn’t statistically significant, but hopefully it was enough to show that we can measure humans by comparing ourselves to each other and to AIs. This lets us measure how good an AI is at a task like this, at least relative to a human.
Try it yourself
Let’s assume that you have field inspectors who take pictures of street signs to assess their condition. When they take a picture of the sign, they also pick from a few drop-downs to describe the condition and whether it needs repair or replacement.
If you were to write a script that sent the rules you gave the human inspectors, the choices and the images to an AI model like Claude, you’d get back its answers for the same signs. Instead of just counting agreements, use a Kappa score to measure how much Claude and the human agree beyond random chance.
If you want to get real fancy with it, run two different AI models and take a look at the comparison: Human vs AI 1, Human vs AI 2 and AI 1 vs AI 2. This will really show you whether AI is ready to help with QC on your data.
Remember our pros and cons above though! Looking at percent agreement still has value. Just don’t look at it alone; look at it with kappa!
Newsologue
(Written by Jaws)
- Anthropic's AI-assisted encryption paper is not about to break the world's encryption. The headlines last weekend said it would. The actual paper is a theoretical quantum attack on the new post-quantum standards, and it would need problems with more than 10³¹³¹ dimensions (for scale, the universe has about 10⁸⁰ atoms). It still matters, though, because that math was supposed to be exponentially hard, and it is less than that. Although still so hard that we can’t do it, even with quantum computers. Still, it suggests it might have flaws we didn’t know about.
- A new study checked six AI judges against human experts on 150 STEM tutoring answers. On spotting errors, the AI judges and the experts landed at a kappa of 0.39 ("moderate"). The experts themselves ranged anywhere from 0.23 to 0.83 with each other. The authors' advice is basically this whole newsletter: report how well the AI agrees with experts, alongside how well the experts agree with each other.
- Anthropic built a benchmark for research taste: can an AI tell which of two AI safety research proposals is better? Experienced human researchers agreed with each other about 77% of the time across 92 pairs; the best model, Fable 5, got 60%. Yet another example of the AI measured against how often the humans agree instead of a perfect answer key. (This one is actually from August and violates Christopher’s recent news guidelines, but it fits too well to skip.)
Epilogue
I had a totally different version of this newsletter partially written before Holly took the quiz for me, and I realized I wanted to take a different path.
This week, I struggled a bit to get started, so I had Jaws write a draft (actually three different ones) after I talked at it. Then I basically rewrote everything, used Grammarly to help edit, and had Jaws edit it some more. It isn’t my favorite post, but I think it does help convey the point about measuring ourselves and our AI implementations.
Jaws also built the quiz and the live data behind it, ran Claude 10 times, worked out the statistics, and fact-checked the sources.