At the Gates of the Emerald City, Part 3: Technicolor Vision for the GenAI Tester
So, let’s do a quick recap of our current gloom and doom situation:
In the first part of the series we noted that all testing is sampling, that every “ship it” is an inductive projection, and that we have no good argument against Hume’s claim that those projections can’t be rationally justified. We used a recurring metaphor that each passing test is a green stone we’ve examined, and “the system works” maps to claiming the entire city is Emerald.
We did salvage something practical through Popper’s take on the problem of induction: stop looking for green stones, instead go looking for red ones to refute the claim. But, like, REALLY look for them. The amount of stress a test applies is severity, and we want to dial it up to 11.
In the second part we basically conceded to Hume and just took for granted that inductive inferences (i.e. projections) worked. Unfortunately, that just turned a bad situation into an utter disaster. If one inductive projection is justified, then infinitely many of them are, each painting the world in its own tinted colour. We bring our human-flavoured bias tints, and GenAI brings its own variety.
The machine’s tints aren’t a human green, but an alien grue and quus (grue is Goodman’s idea and quus is Kripke-Wittgenstein’s idea of weird-ass rules that our evidence / the model behaviour supports equally well as the human-rules of green or plus). The whole point being that since grue and green agree on all our evidence but disagree outside it, we have zero known offset to calibrate against.
The canonical example is the Waterbirds benchmark, where a model trained to tell waterbirds from landbirds learned to look at the background more than the bird, so it could ace any test drawn from the same distribution, but still mistakenly categorise a duck standing on the grass as a landbird. No amount of evidence from the same distribution will ever tell green from grue, and the machine’s grue is so alien that we can’t even see the distributions these rules draw on, let alone step outside of them.
Not only that, but even at runtime, finite behaviour doesn’t tell us which rule is actually being followed. Data doesn’t determine which rule will be learned or used, so an external tiebreaker is always applied. Human tiebreakers are very much alike, as they draw from a shared form of life (Wittgenstein’s term we don’t need to get nitty-gritty about) and a common human rationality. GenAI doesn’t share any of that, and uses tiebreakers we would never imagine, fuelled by tracking categories and taxonomies we consider to be noise, if anything at all.
We did salvage something out of this train wreck. Last part’s epilogue used all the series’ mileage to sketch out the shape of a possible solution (well, mitigation). We noted that the Waterbirds benchmark nailed the AI grue rule being followed because somebody already suspected what was going on, and that it’s like winning the lottery. This part will be extremely practical, and focus on ways to procure lots of these lottery tickets, even if most of them seem absurd or irrelevant. Aggregated, they’ll allow us to dial the severity to 11, and hopefully catch some of the grue rules in our systems and our test tools.
Prologue
If you recall, The Wizard of Oz opens in sepia (yes, we’re still beating this dead horse of an analogy 🤷♂️). Kansas is flat monochrome, and it isn’t until Dorothy opens the farmhouse door onto Munchkinland that the film transforms into Technicolor. It’s not that Kansas was wrong per-se, but rather that we added more channels that allowed us to better expose reality. This part attempts something similar - not to invalidate the traditional way we do testing, but to enrich and enhance it with more parallel channels.
Why do this whole multi-channel dance instead of just reading reality itself in a more factual / unbiased manner? Remember that part 2 established we can’t completely ditch our biases or theories of the world and just observe it for “what it is”; i.e. we don’t get to take off our tinted glasses. What we can do is stop looking through a single channel, and instead deliberately gather multiple, differently-biased views, chosen so that their blind spots don’t coincide, and probing at the boundaries where rival rules come apart. That’s technicolor vision; enough channels aimed at the right places, so that a grue-shaped rule has almost nowhere left to hide.
Let’s dive into the practicalities. Rather than walking through techniques one at a time, I’m going to distil the issues we faced in this series into concrete problem statements, and organise everything around those.
Part A: Testing GenAI
GenAI plays dual roles in this piece, both as the thing being tested, and as the thing doing the testing. We’ll start, as people usually do, from the first.
Problem: there is no expected result
Classical testing is mostly straight up verification: for any input you care about, somebody can tell you the right answer in advance, so you can just verify the system’s outputs match that expected answer. Yes, the oracle is a form of theory someone had about the spec, and yes, it’s not necessarily the right one. As we explored in part 2, there’s no such thing as a raw failure, only behaviour some theory has classified as wrong. Nitpicky nuance aside, that worked (mostly) well for ages, until GenAI and machine learning made a relatively niche problem universal.
To begin with, for most of the inputs you’d genuinely want to test, nobody has the deterministic 100% expected result for summarisers and generators, as that’s the whole point of having a model do those non-bounded jobs. Meaning, if you could just compute the correct summary of this contract, or the correct reply to this customer (the “the” here implies singular), you wouldn’t be utilising a model to produce it.
Even worse, the model won’t give you the same answer twice, because a sampled model’s output changes from run to run on the very same question, even if you haven’t changed anything (well, changed anything meaningful to a human, at least). So even with a hypothetical perfect oracle (that doesn’t and can’t exist) you’d still be comparing against a moving target.
So, without an expected result, how can we test?
Benchmarking over verification
Before going into the non-trivial, let’s state the obvious. This isn’t the first time in history where software testing (or any kind of quality control mechanisms) had to deal with “fuzzy” expected results. The straightforward answer has usually been the same: pick up a subset of inputs for which you do have some rough idea of how the desired outputs should look like; run them through the system; calculate the success rate (sometimes this will involve some fuzzy judgement calls); and track the success rate.
Personally I’ve been doing it for years testing genetic variants classification algorithms, and I’m sure you had your share of components that you benchmarked (whether they could’ve been technically fully tested or not).
Nothing to write home about (unless home is where the test suite is, in which case for sure write home about that).
From here on out we’ll explore more specific, opinionated techniques that might not have made it to your usual suspects lists.
Worst group accuracy as a gate
Let’s start with a non-trivial remark about benchmarks that’s relevant specifically to GenAI components: in the GenAI age the cost to produce an output dramatically dropped, but the cost of being wrong didn’t change one bit. Taken in this context, a model’s average benchmark accuracy score is misleading. The most valuable information is not in the aggregate average, but the distribution behind it, since an 83% ± 3% score tells a different story than an 83% ± 15%. Both may yield the same line item on the leaderboard, but one deserves the confidence its average inspires, and the other for sure doesn’t.
So don’t just gate on the average result (or God forbid cherry pick the best ones) but also gate on the distribution, or even better, on the worst-group (split your test set into meaningful subgroups and gate on the one the model does worst on). Anyway, whatever you do, don’t fall into the convenient “it’s flaky - let’s rerun” shtick. Some of the “wobble” really is noise (and there will be a wobble even with temperature set to 0), but the rest may be the normal behaviour of the alien rule it’s actually following.
Metamorphic testing
Metamorphic testing is all about not testing the thing itself, but how it moves and mutates through relations and proportions. Meaning that while we can’t assert what a specific output for a specific input should be, we can usually still verify the relationships that need to hold between 2 or more inputs<->outputs. You specify transformations under which the correct rule’s output must not change, or must change in some known direction, and then you check whether the model respects them. Let’s see the different ways this can play out:
First there are invariance tests, where you mutate the input in ways the spec says shouldn’t affect the output (or more precisely, not change certain attributes of the output). So for example, when you test for arithmetic logic, changing the flavour text (say, turning Sophie into Liam) shouldn’t change the numeric part of the output answer. For increased severity, we can use logical attributes to make the permutations more grounded (e.g. scalar addition is commutative, so we can switch the number positioning), or attach a completely new and irrelevant clause to an otherwise focused question1 This kind of distractor injection tactic played a role in part 2, and though it is technically an invariance test, it does plays nicely into the concept of grue by exposing that the model’s “truth tracking” is aimed at something different than what us humans would track. So adding a CatAttack-esque clause about cats’ sleeping habits to a question that should not be affected by it is a good, absurd, surprisingly effective invariance test. .
Then you’ve got directional expectation tests, which are somewhat of a mirror image where you mutate the input in ways that force the output to move in a known direction. Add a positive number to a sum and the total has to go up; add a binding constraint to a planning task and the feasible set must not grow; sprinkle some Ted Lasso positivity in a sentence and the sentiment analysis must not go down (when GenAI can accommodate the concept of toxic positivity we will have truly reached AGI).
Making things even more concrete, this kind of testing methodology closely correlates with and can be implemented through property-based testing (which is increasingly being adopted). You can find helper tools and libraries that allow you to generate variations in a system’s inputs (through API, chat interfaces or even UI functionality random noise), and monitor attributes mutation patterns for what can be loosely considered “expected results”. These techniques are old and well-tooled; what’s new is aiming them at inductive inference (projectibility), and incorporating them into random, or at least fuzzy, mechanised generators.
And don’t forget, since the machine grue and quus may latch on to alien distributions, make sure to mutate your inputs in ways that seem completely absurd: don’t just paraphrase, switch between active and passive or swap synonyms; but rather inject typos and whitespace, add a stray apostrophe, reorder clauses, etc. The more absurd, the better; each of these is another lottery ticket, and we’re in it for the sheer volume and spread.
To be clear, none of this will prove a model’s learnt rule is green (nothing will), but each relation verification it survives is one specific shade of grue we managed to rule out, and each one it fails is a grue caught red-handed (pardon the pun I worked really hard to construct).
Real-world Popperian partial oracles
Even when you can’t spec what the correct output looks like, putting that output to work in the real world can sometimes tell you it’s wrong. So for example, a code generation model output is very hard to verify as true, but if it fails to compile it’s for sure just broken. Similarly, symbolic checks, schema validations, running a generated SQL, rendering generated assets, these are all partial oracles: none of them tells you the output is correct, but each of them can tell you that some outputs are not.
Granted, these are usually very low bars to meet. Sadly (or from a testing perspective, not so sadly), they’re still very effective, and many outputs do and will fail to meet them.
Problem: green and grue agree on everything you’re testing
Suppose the problem of the expected result was not only mitigated, but 100% solved, and you had a perfect oracle for every input. You’d still face this second problem, namely that too many things agree with the oracle within the testing scope, while disagreeing outside it.
So this problem comes down to two questions. How do you get evidence from outside the alien distribution the model found meaningful, and how do you find the dimensions the rule will break on if you didn’t know to suspect them in advance?
Explicitly write the inductive bridge
A mitigation so stupid it might just work: make the projection explicit; i.e. when you claim green, state the inductive scaffolding explicitly rather than leaving it implied. This includes what you observed (which inputs, which environment and which build), why you observed those specifically (how that sample was drawn, as it certainly wasn’t drawn randomly), what you therefore claim (what property you attribute to what population, within what margin), and which uniformity assumption makes that whole projection valid.
A mouthful, I know, and it’s for sure not something you’ve read in any TSR throughout your career. Not only that, I can guarantee you’ll feel incredibly stupid writing the thing down, but this kind of distance may be exactly what can make you and people reading it stop and take notice. Something just explicitly putting into words “Assuming the untested payment providers behave like the tested ones”, or “Assuming production traffic resembles our fixtures” will make you go and prove yourself wrong.
It also has a counterfactual counterpart worth asking while you’re at it: what would have to be true for this projection to be wrong. An assumption that rules out exactly nothing isn’t doing any work at all, and fails at the very low Popperian bar of “is this refutable, even if only in principle”.
Be paranoid about contamination
There’ll always be some grue rule (well, many of them) that agrees with our green, but that doesn’t mean we should just accept it, douse this fire with gasoline, then feed that with pure oxygen for good measure. Not doing that means making sure that when we evaluate our models, we do so on completely novel inputs, not inputs that were in our training data. Otherwise we’re not even measuring projection to unseen cases, just variations on recall.
And remember that contamination may be super tricky to prevent. For example, it may be hiding not in specific numbers, but in paraphrased, translated or restructured near-duplicates of them. Just as grue rules are alien and latch onto things that are meaningless to us humans, so could the bits and pieces that would lead to contaminated benchmarks.
In addition to suspicion about our own benchmarks’ purity, this also calls for treating every public benchmark figure as possibly contaminated until shown otherwise, including building your own private evaluation sets out of data generated or collected after the model’s training cutoff. Also, be paranoid about those private evals: if you have to store an eval somewhere it might leak, plant canaries and honeypots in it, like unique strings you can later look for in a future model’s outputs (the paper towns of the GenAI benchmark world). After the 10th PR hype cycle of gold-star benchmark scores that crash and burn in real world use, this is no longer paranoia, but bare minimum prudence.
Worst group accuracy as a guide
If we were smart enough (or alien enough) to see the boundary where grue and green stop agreeing, we could sample beyond it and use that as a direct mitigation to this overall problem. Sadly, we are not smart enough (or alien enough), and prompting ourselves to “not make mistakes” unfortunately doesn’t work in reality. Nothing that’s accessible or meaningful to our rationality seems to point to that boundary, or to the data distributions that form it. Or does it?
Well, there are those worst-group results we talked about gating with. Why exactly are they so much worse off than the rest of the clusters in our data? In one sense, there being a worst-group is a tautology in any heterogeneous, ordered result set; but in another sense, maybe something made this group the worst-group, even if that something is meaningless to humans. You may have had some crude taxonomy idea when you defined this group, investigating its results may yield a more alien reason.
Actually, since we’re looking for something that’s aligned with grue, if that reason is meaningless to humans, that is meaningful. Or put more concretely: use your worst-group as a guide to cut your data into absurd distributions and along ridiculous axes. It’s a good way to focus in the general direction of something that might be out there, but that we can’t directly perceive with our puny human rationalities.
Manufacture counterfactuals through ablation
This is technically a form of metamorphic testing, but here focused on distinguishing green from grue by forcing the model to project across unobserved inputs in ways that we can still judge the answer for. Basically we’re trying to present the model with an alternate reality where some things are kept the same, some things are different, and assert what that would entail. This is a counterfactual, and sometimes we can use those to uncover dividing lines between grue and green rules2 Goodman thought that the grue<->green projectibility distinction, the lawlike<->accidental generalisation distinction, and the ways counterfactuals are cashed out as 3 manifestations of a singular underlying principle. It’s unsurprising, then, that counterfactuals can be weaponised to explore green and grue. .
So, how can we construct a counterfactual we know what to expect of? We could do that by adding or mutating information, but that has its practical limits, is sometimes hard to define, and very hard to do in a scoped manner. Compared to that, ablation (i.e., removing data and information) is much more easily mechanically varied across, can be effectively scoped in a granular fashion, and can be extremely informative.
Combine ablation with worst-group accuracy as a guide, and you’d end up stumbling across the waterbird backgrounds grue rule without having to be that much of a bright person at all. Anyone who destroys clusters of pixels arbitrarily, takes the worst group resulting from classifying the new dataset and tries to see what data ablation caused it would’ve figured out the model accuracy hangs off the backgrounds. Well, I wouldn’t, but you might have 🤷♂️.
Be lazy and let the failures define the groups
More generally, we can weaponise the model’s alien way of structuring the world against it, and hand the grouping itself to the machine, which is what’s usually called slice discovery.
Rather than naming our groups up front, slice discovery mines the model’s mistakes for coherent clusters. So we train the model, pile up the mistakes, and treat those as a group in their own right. That kind of grouping isn’t the product of our human rationality, but rather a product of the model’s alien operation on our initial inputs. Then you just upweight those, train again, thus slowly dragging your models, kicking and screaming, towards a greener shade of grue. That’s the simplest form of slice discovery, as it skips mining for inner clusters and just takes the entire group as one. There are more effective and sophisticated ones, it’s just that I personally love this version because it had the best TL;DR summary baked into the actual paper title: Just Train Twice3 It’s a nice enough read even when you get past the banger of a title, so enjoy. For extra credit, you might even get a verbalisation of the grue clusters it learned, even if that paper’s title isn’t as fun. .
Be lazy and use unpaid labour
After all, there’s a party in my late stage capitalism and everyone’s invited. Not really though; what I’m actually referring to are your real world users, who more often than not are also your unpaid QA team 🤷♂️. Well, if the problem is we can’t distinguish green from grue before going out into the world, let’s at least make sure we can distinguish between them afterwards.
So best to treat production as an evidence source and instrument it accordingly; collect detailed logs, mirror traffic, and use canary and progressive rollout as a way to sample reality while maintaining a hedged blast radius. The nice thing is, the real world usage data doesn’t only shed light on which rule the model learned, but it’s also runtime data that illuminates which rule the model’s actually following. It’s still finite data, and won’t solve the problem altogether, but will help you narrow and mitigate it.
And building on this concept of the users being unpaid testers, every escaped defect that does make it through into production can be seen as maybe being a winning lottery ticket we got for free (well, the users paid for it): a potential grue nobody suspected, caught in the act. Too late for that incident report, but it still might help you prevent the next ones.
Part B: Testing with GenAI
That’s all well and good, but as we said in the beginning, increasingly these days, the model isn’t (just) the product, but the instrument doing the testing. It generates the test cases, reviews the diffs, writes the assertions from a spec, and in evaluation pipelines it serves as the judge (sometimes even playing the judge in more traditional, previously deterministic verification). And naturally, as it writes all code in general, it’s also writing the code that does the test automation. This brings a whole host of additional problems.
Problem: you’re looking through glasses from the same box
At home, you probably generate documents with Gemini, do a 1st review pass with Claude, then ask for a final critique from ChatGPT. That’s just common sense, these are different machines, and you want to pit them against each other to get a kind of Hegelian synthesis result (OMG, this was supposed to be a philosophy-free post, and out of all the things I chose to sneak in Hegel4 Yeah yeah, that whole thesis-antithesis-synthesis thing isn’t even the OG Hegel. I’m insufferable in more than one way etc. makes the cut?!).
Then you go to work, and more often than not your organisation’s policy (and budget) follows the path of least resistance, authorising just one AI platform (and sometimes even just a few of the models it offers). What you end up getting is a depressingly common setup where you have one model family generating your test cases, and the very same family (often the very same model) judges whether the outputs are deemed worthy. For extra fun, usually this would also be a situation where the system under test was built with… well, you guessed it. Everything comes back looking green, and everybody goes home happy.
So you obviously already know why this is a baaaad idea, because at home you’d never do that. Still, let’s share with the rest of the class: the only reason running multiple checks gives you more assurance is that different checks fail in different ways. If two tests share a blind spot, they don’t give you two observations, it’s just one observation that got reported twice.
When a generator, a judge and a product from the same family share training data, architecture, tokeniser and a whole pile of habits, their blind spots tend to overlap. The same missing stackoverflow thread that could have prevented the model from introducing that DB race condition, would’ve also made the model generate the edge case test to guard against it. But that thread wasn’t in that model’s training data (or if it was, it was buried and got under-weighted), so the bug did get introduced and the edge case wasn’t covered. At the end of the day, the cases the generator doesn’t think to write are disproportionately the cases the product handles badly, and the mistakes the judge won’t flag are disproportionately the mistakes the product makes. It’s near unanimous agreement, with close to zero information.
But chin up buddy, surprisingly, there’s even more bad news headed our way. Turns out the judge doesn’t just share the blind spots, but rather actively prefers what it recognises. There’s well documented self-preference bias in GenAI evaluators, where a model scores its own outputs higher than others’ while human annotators rate them as equal. Put in measurement terms, our instrument’s reading depends on how much the thing being measured resembles the instrument itself, which is another form of bias there’s no easy way to calibrate for.
Never let a model grade its own homework
So, an immediate practical conclusion from all of the above is to never use a model to judge, grade or evaluate work assets it generated, and for sure never do that when it has access to the context of the generation session. If your organisation only has one GenAI provider, advocate for adding a second; if it has only one model from one provider, advocate for at least a few different models; if that one model is a free one, advocate some other place to hire you.
Better still, run several deliberately different judges (different providers, different sizes, different versions) and first and foremost focus where they disagree.
BTW, this is becoming a real menace and extremely hard to circumvent, as stronger models are slowly converging in their mistakes (partly because the more esoteric ones are slowly being rooted out). The title might as well warn against a model grading its own homework, or its classmates.
Reading and writing is also a form of testing
Every time the spec gets translated or interpreted is, to some degree, a form of testing. When the system architect gets to cash out business terms into technological foundations, that may clash with how the tester cashes out these terms (and with the way the developer implementing the behaviour did). Those clashes are defect detectors at design and plan time and should be treated as such. The mere acts of translating, paraphrasing, putting words into sentences in a relevant context, these all are test executions.
So, if the rule is to never let a model grade or test its work, it follows that we should use different models for all these different activities. If the same model cashes out the spec into high level architecture, as well as into the test cases and the detailed implementation design, you’re missing out on all the different ways the spec could have been misinterpreted or just read differently. As usual, the value to extract hides in the clashes and the miscommunications.
Cheap powerups and bias workarounds
For any GenAI judge you do end up keeping, there are all sorts of workarounds, hacks and powerups that can act as cheap force multipliers for our purposes. Some examples include swapping the order in which candidates are presented to the judge’s pipeline and requiring the composite verdict to survive both orderings; grading against some reference answer instead of asking for an abstract detached preference; breaking the judgement into discrete go/no-go checks instead of one holistic scaled rating. All of these are pretty good and relatively easy ways to mitigate some of the more common biases (position bias, verbosity bias, scoring inconsistency and others).
Partial oracles, back with a vengeance
We did a pass through the value of real-world Popperian partial oracles in part A, where GenAI was the system under test: does it compile, does the generated SQL run, does the asset render, etc. We can bring them back, and with a vengeance. Previously their value was that they could declare outputs as wrong without anybody knowing what a right output looked like. In our current context, their value is that their failure paths are completely different from those of our judge model: a compiler doesn’t share a tokeniser with the model we use, and neither would an SQL syntax validator. If we mix them in with and between our judges whenever applicable, we gain added failure vectors that cover some of our model’s blindspots.
Put our shared human form of life to good use
Humans share a form of life with each other, and that allows us to fill in all kinds of implicit context the alien machine can’t; mainly, it allows humans to understand what’s important to other humans in a way and fidelity the machine never could (exaggerated for dramatic effect etc.).
So, let your alien machine run amok and generate test cases from here till the end of time, then have your human testers apply their understanding of what’s actually important to human users to prune the test suite accordingly. Output is relatively cheap (machine-compute-wise), deleting things is relatively cheap (human-mentally-wise); combine them both and sprinkle some human exploratory testing on top, and you’ll be golden (at least you’ll be a grue shade of gold).
Problem: you’re generating volume without severity
The last point is a good one to pivot on towards a related but different problem with GenAI as the testers: output is cheap, compute wise, for sure, and if you ask a model to write a test suite you’ll get tons of tests very quickly. Awesome possum. But come on, that’s a test suite you can clock as AI generated a lightyear away (yes, that measures distance; yes, that’s how far).
The reason you can clock it as AI generated is the hideous value-to-noise ratio. Often the suite has so many redundancies that it can be collapsed onto itself, and a lot of whatever’s left is probably so improbable, if any of those tests fail we’re facing the end of civilisation as the laws of nature have stopped working. All of this to say, with GenAI test suites you usually get a lot of tests for your buck, but that doesn’t translate to a lot of bang. Your coverage does go up, and the dashboard does look greener than ever before, but turns out the confidence you get from it is even less warranted than before.
So the question practically becomes how to measure severity rather than volume, and how to make an AI generated suite earn our trust.
Ask what would realistically make it fail
Again starting with the “it’s so stupid it might just work” easy fix: before writing (or accepting) any test, ask what the world would have to look like for it to fail. If there’s no realistic answer, the test can’t catch anything, and you’ve just written yourself another green stone instead of testing for one. Even more to the point, if the way this test fails requires the system as a whole to be a complete non-starter trainwreck, then the test might be technically meaningful, but it’s practically meaningless, prune it (well, leave one smoke test and prune the others).
Unsurprisingly, this mirrors the counterfactual point about the inductive bridge from part A, just turned on your own suite instead of on the release claim. If the answer to in what slightly different world this test would break is “in no world”, that’s volume over severity.
Mutation testing
One way to look at our problem is that coverage measures what ran, not whether anything would have been caught. Of course it does, right? I mean, it’s not like we know what’s out there to be caught so we could measure against that. In the words of every annoying person you’ve ever talked with at a party: well, actually…
There is a technique that partly measures this second thing: mutation testing, where you deliberately inject faults into the code, config or environment (flip a comparison, introduce an off-by-one at a boundary, negate a condition, etc.) and check if the suite catches them. The mutants that survive are now an itemised list of the types of bugs the test suite can’t see.
This is a nice callback to something we said in part 1: stop counting green stones, go looking for red ones; only now taken to the extreme. Instead of hoping to stumble on a red stone, we manufacture red stones and check our detector notices them, in a “who watches the watchers” type of scenario. Or if you’d rather another POV, this technique manifests counterfactuals in actuality, and throws them at our AI generated suite. Muy cool.
For an extra freebie bonus: a test that caught no mutants is the volume-without-severity test you clocked without any manual human review, so prune away (just make sure your tool records every test that kills a mutant, not only the first).
Audit the shape…
If a model is generating your tests, reviewing them one by one won’t be much help, not only because of time and resource constraints (deleting is still relatively cheap, even in bulk), but because they each, examined independently, look perfectly fine. Instead, audit the distribution: does the suite contain empty inputs, hostile inputs, boundary values, absurd magnitudes, wrong orderings, inputs in a language nobody on the team speaks? If not, you might have sheer volume, but no real severity, and you’ll need to inject the corners yourself, by hand or with property-based generation. Again this mirrors part A with its absurd-mutation advice for metamorphic testing, applied now to your tests rather than to the model’s inputs.
…and keep the weird ones
If you’re building a test suite of a system under test that was written by GenAI itself (a different model of course because that’s a mistake we’ll never do etc.), your hard earned human intuition and lessons learned become a liability. That was the whole point of the previous article and of part A in this piece.
However, if you’re generating the test suite with the help of AI, keeping the weird absurd tests can actually work in your favour. Pit one alien rationality against another, and maximise the volume and spread of the lottery tickets your test suite buys. This seems to go against everything we said above, and for sure there’s some nuance to be had5 The extreme TL;DR of it is that an implausible input is a lottery ticket while an implausible failure is dead weight. , but an absurd test looks different than one that can’t fail, or one that tests the exact same thing the dozen before it did. The absurd one is a keeper.
Track which tests have ever caught anything
So, callback time, remember that Goodman was for things that have shown their usefulness over time (he referred to that as being entrenched with regard to being inductively projectible). If we think of tests in a similar manner, and demand that our trust in a test be earned, then the obvious question becomes which of the suite’s tests has ever caught a real defect.
Surprisingly, even when an organisation can answer that question through a traceability matrix or some other means, few seem interested in the answer. People usually treat a defect as a frozen instance in time that tells you nothing about the system or the test suite in the future. But that neglects the fact that the test has proven it points to something real, and that’s not nothing, even if the specific defect that was found will never regress.
BTW, you can and should run it in the other direction as well. Every escaped defect your unpaid testers found (read: users) can become an actionable question: which test should have caught this (or more importantly, which shape of tests), and why didn’t it exist?
Put another way, the test suite doesn’t get to be trustworthy because it’s big, but rather earns trust by repeatedly surviving contact with the world and providing value through that contact and friction. Cut a test if it duplicates others, if it could only fail in a world where the whole system is already a smoking crater; and question a test that’s run green for years without ever catching anything. Keep a test, however weird it looks, if its input is strange but its failure is plausible.
Epilogue
So, what now? Going back to where the series started, we still can’t test everything, so we’re still sampling, and our sample is still biased in ways we can’t introspect our way out of. When a machine is involved anywhere in the loop, either as the system under test, the test generator or the judge, those biases aren’t even human-shaped. At the end of the series, there’s still no objective POV from nowhere waiting to be discovered and save the day.
Specifically when GenAI is at play, it poses new challenges through 4 core issues we try to tackle and mitigate:
- There’s no expected result, so we benchmark, gate on the distribution, and assert relations instead of answers.
- Green and grue agree on everything we’ve seen, so we go looking where they don’t, along axes we’d never have picked and in production where reality picks for us.
- Our instruments come from the same box, so we buy independence back on purpose.
- And volume masquerades as severity, so we measure severity directly and make every test earn its trust.
Everything kinda boils down to these principles: vary the sample along axes where a lookalike rule has to reveal itself, decorrelate the instruments so their blind spots don’t coincide, and probe the boundaries rather than the interior where every rival hypothesis agrees.
We ended part 2 saying there’s no way to tell if our test suite is green or grue, and there’s still nothing that can resolve that completely. We can, however, put in an effort and embrace technicolor vision; i.e. it still matters how many ways we’ve tried to find out, how severe our attempts were, and if we wrote down what we were assuming throughout.
The city still isn’t made of emerald, only a few stones are, but with enough channels pointed at the right places, you at least have a better chance of finding out which ones. Still a lot of work to be had, even, and especially, in the age of GenAI.
Told you it’d be a hoot.

Comments
(must be logged on to comment)