One sentence sorts a real AI feature from an expensive one, and most teams cannot answer it. If the model starts giving worse answers next Tuesday, what turns red? Not who eventually notices. What fails, by itself, before a customer reads the output. My stance is that if you cannot fail your own build when the answers get worse, you do not have a product yet. You have a demo that happens to be running in production.

You are reading this because you are about to fund an AI build, or because you are deciding which person can be trusted to run one. Use the same question for both. At North America’s largest apparel supplier and distributor, where I lead design, I designed and built the company’s first MCP server over our product catalog, and it is in pilot now. I founded Story Genie, where agents write and illustrate a hardcover book for a child and a parent pays real money for the result. There is an AI version of me on this site answering questions from strangers. Every one of those has a file of real inputs behind it, and the file came before the interface.

Normal software breaks loudly. This does not.

Think about your checkout. If it stops charging cards tonight, you know inside ten minutes. Errors spike, the revenue line drops, somebody gets paged, and the whole company agrees on what happened. Now picture the AI feature in the same product getting worse by a quarter. There is no error. The response comes back in the same two seconds, at the same length, in the same confident tone it used when it was right. Nothing in your monitoring has an opinion about it, because from the outside a worse answer and a better answer are the same event.

The ground under the feature also moves without you touching it. D. Sculley and nine colleagues at Google wrote the paper everyone still cites on this, Hidden Technical Debt in Machine Learning Systems (opens in new tab), published at NeurIPS in 2015. Their argument is that it is "dangerous to think of these quick wins as coming for free," because real systems "incur massive ongoing maintenance costs," and the risk factors they list include hidden feedback loops, undeclared consumers and changes in the external world. That paper is about models teams trained themselves. Rent the model instead and the problem gets sharper, because the vendor ships a new version on their calendar, your prompt grows a line somebody added on a Friday, and your data changes shape when another team renames a field.

So define the thing you are testing for plainly. A regression is a change you did not intend, in answers you had already accepted. You cannot catch that by looking at the output once. You catch it by keeping the inputs.

What the harness is, in plain terms

A file of real inputs. For each one, what the answer has to contain and what it must never contain. A runner that pushes them through the code a customer actually hits. A score. A line the score is not allowed to fall under. A build step that stops when it does. That is the whole thing, and on this site it is about a hundred lines of JavaScript.

The bot here runs against eight questions shaped like the ones visitors really send. What do you do. We are hiring a head of design for a forty-person fintech, why would you be a fit. How did you approach this case study. What do you charge. The answers to those are judgment calls, and I read them.

Three of the eight are traps, and those are the ones I built the harness for. One asks for the dollar figure of the biggest revenue impact I have personally driven. One asks how my time went at a company I have never worked at. One asks the exact headcount of the largest team I have managed. A model that wants to be helpful will produce a number and a warm paragraph for all three. The correct output is a refusal that then says what I can actually tell you, and a run where any of the three comes back with a figure is a failed run, no matter how good the other five looked.

The traps are the point. The answers I care about most are the ones where a refusal is the only right answer.

It runs the real handler, not a copy of it. Same system prompt, same streaming, same code path, with only the notifications and the visitor log stubbed out so a test run does not page me or land in the records. Build a mock of the model instead and you have tested your mock. The one thing the harness is allowed to swap is the model setup, which is the entire reason it exists. It rotates the order the setups run in, too, so no option always goes first on a warm cache.

The traps came from a real miss. I had the bot running on a smaller, cheaper, faster model, because speed matters on a page where somebody is deciding whether to email me. It answered a question about my work history with a fact I never gave it. I pulled that model the same day, and the next day those three questions went into the file. That is how most of these get written. Something goes wrong once, and the input that caused it becomes a permanent part of the test. Now a model swap costs an afternoon and a number, rather than a month of skimming transcripts while a wrong version of my career sits live on the internet.

Write it before the UI, because the inputs are the product

Order is the part teams skip, and skipping it is expensive in a way that does not show up for two quarters. Choosing the twenty inputs forces every argument that matters. Who is this for. What does a good answer look like. What is it allowed to say when it does not know. Those are product decisions, and a team that writes the harness first has to settle them in week one. A team that designs the screen first settles them by accident, in a prompt, under deadline.

Anthropic publishes its own guidance for building these, and the advice is less precious than most people expect. Define success criteria and build evaluations (opens in new tab) tells you to "design evals that mirror your real-world task distribution," not to forget edge cases, and then says something that gets teams unstuck: "Prioritize volume over quality: More questions with slightly lower signal automated grading is better than fewer questions with high-quality human hand-graded evals." The edge cases they name are the boring ones. Irrelevant or nonexistent input data. Input that runs far too long. Poor or harmful user input. Cases where humans would not agree either.

The catalog work made that concrete for me. At the apparel platform, product descriptions for a launch used to take two writers most of a month, and I built an agent that brought a launch down to about an hour. The rows that mattered for testing were never the tidy ones. Our old descriptions ran from twenty words to two hundred, some of them in all caps, written by many people with no process behind them. The ugly rows were the test set, because they were the actual job. I went through how I pick that kind of workflow in pointing your first AI build at an internal workflow.

If your team cannot produce twenty real inputs and say what a good answer looks like for each, that is the finding. No amount of interface work turns that into a spec. It just hides the gap behind something nice to look at.

Scoring, without pretending the answer is a number

Most of what you want to catch is checkable exactly, and that part is cheap. Did the product code in the answer exist in the catalog. Did the price land above the floor. Did the refusal appear on a question that must be refused. Did the response come back in the shape the page needs. Deterministic checks find most real drift, they cost nothing to run, and nobody has to interpret them.

Those checks only work when the rule is written somewhere a test can reach. A price floor enforced in the server is a line a test can call. A price floor described in a system prompt is a paragraph a test can only read, and reading it proves nothing about Tuesday. That is the same argument I made in getting the rules out of the prompt, arriving from the testing side instead of the security side. Put a rule in code and you get an owner, a commit, and a test that goes red.

Then there is the part no string match can grade: whether the answer was useful, whether it sounded like the brand, whether it actually addressed the question. Have a second model grade those against a written rubric. The method has been measured. Lianmin Zheng and twelve co-authors, in the NeurIPS 2023 paper Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (opens in new tab), found that "strong LLM judges like GPT-4 can match both controlled and crowdsourced human preferences well, achieving over 80% agreement," which they note is about the level of agreement human raters reach with each other.

Read that number for what it is. Agreement in the low eighties makes a fine tripwire for a trend across fifty questions. It is not a grade you should quote to three decimal places in a board deck. Use the model score to tell you something moved, then read ten answers yourself. I still read the bot replies by hand every time the model setup changes, and I always find one thing the rubric had no column for.

Fail the build. Do not email a dashboard.

The threshold has to sit somewhere that blocks. A score written to a report nobody is required to open is not a test, and the first busy week will prove it. Wire the run into the step that ships, let it exit with an error, and let the thing stop.

Google published a rubric for exactly this discipline years before anyone put a chatbot on a marketing site. Eric Breck, Shanqing Cai, Eric Nielsen, Michael Salib and D. Sculley wrote The ML Test Score (opens in new tab) for IEEE Big Data in 2017, offering "28 specific tests and monitoring needs, drawn from experience with a wide range of production ML systems." Twenty-eight. The useful part is not the list. It is that a team with a score can say out loud how ready the thing is, and a team without one is trading opinions about a feeling.

This site runs a small version of that on itself, which is the only reason I am comfortable arguing for it. Essays here get drafted with models, and a draft has to clear two gates before it can become a page. One checks length, structure, em dashes and whether the claims carry real source links. The other scans for the stock phrases that mean a machine wrote it and nobody pushed back. Both exit with an error, and the build itself refuses a duplicate slug or a broken internal link. A draft that drifts cannot quietly turn into a published page. The one you are reading went through both.

A report nobody has to open is not a test. It is a newsletter about your own risk.

What this is worth to the person signing the invoice

Three things, and all three are business outcomes rather than engineering hygiene. You can change models on evidence instead of a feeling in the room, which matters every quarter now, because a cheaper option shows up every quarter now. You can hand the feature to somebody else, since a new engineer inherits a definition of correct instead of a folder of screenshots. And you can give a launch date you believe, because you know what the thing does on the inputs that scare you.

If you have an in-house team and an engineer who owns the feature, ask for the replay file at the next review, before any more features get added. An engineer who shows you the inputs and the last run has already done the hard part. One who says it is not built yet and asks for a week has given you a fine answer too. The answer that should slow you down is a confident explanation of why this particular feature cannot be tested that way.

If you are a founder shipping on your own, build the small version and stop there. Twenty inputs in a file, a script that runs them, five checks that have to pass. One afternoon. If nobody in your building can tell a real harness from a green check mark that proves nothing, that judgment is what I get hired for as an AI design consultant. I pick the inputs with the people who do the work, write what a correct answer is before anyone argues about the interface, and leave the file and the build step running inside your company. The wider version of that read, the questions I ask when someone is showing me a working system, is in how to pressure-test an AI demo.

When I would not build this

A read-only internal lookup where one person reads every answer before it matters does not need a harness. I run internal servers over my own analytics and there is no scoring layer in front of a traffic number. The worst case is that I run the query again. Put ceremony around that and you have spent a day buying nothing.

Week one of a prototype is too early, and I want to be clear about that, because a rule applied too soon gets abandoned. You do not have real inputs yet, and a replay file built from inputs you imagined teaches the feature to pass your imagination. Build until twenty real people have used it, keep what they typed, then write the file that same week. The moment to do it is the moment before the first interface decision, not the moment before the first line of code.

Some outputs genuinely resist scoring. Part of brand voice is taste, and a scorer that claims to measure taste hands you a green light you did not earn, which is worse than no light at all. Test the parts you can state as rules: the claims nobody may make, the words that are off limits, the length, the disclosure, the price. Leave the rest with a person, and say out loud in the review that it sits with a person.

And if no one has written down what a correct answer is, the harness is not your first problem. Get the floor, the claims legal will not allow and what the thing says when it does not know, agreed and written, by the people who own them. That is two meetings. Skip it and you will build a test that enforces whatever the model happened to do on the day you wrote it.

Open your logs tonight and copy twenty real inputs into a file. Write what a right answer has to contain for each one. The first time that file turns red on a change nobody thought was risky, you will know what the last few months of launches were actually running on.