Bourne Forge AI
Chapter 2of 8 chapters

The Science of Prompt Experiments

By Mark Bourne

“If you don't know what changed, you don't know why the result improved.”

One of the defining characteristics of engineering is the use of controlled experiments. Whether designing a network protocol, tuning a database, or testing a new aircraft component, engineers rarely change everything at once. Instead, they isolate variables, measure outcomes, and build confidence through repeatable testing.

Surprisingly, this disciplined approach is largely absent from the way many people use AI.

A typical interaction might look like this:

  • Change the prompt.
  • Switch to a different AI model.
  • Add more context.
  • Ask for a different output format.
  • Continue the conversation.
  • Receive a better answer.

The natural conclusion is often:

“That new prompt worked much better.”

But did it?

Without understanding which variable actually influenced the result, the improvement could have come from any combination of changes. Perhaps the additional context mattered more than the wording. Perhaps the newer model performed better on that task. Perhaps continuing the conversation gave the AI access to useful earlier information.

This is the central problem with many prompt discussions—they confuse correlation with causation.

Thinking Like an Experimenter

Imagine a chef trying to improve a cake recipe.

Instead of changing one ingredient, they simultaneously:

  • use a different flour,
  • increase the oven temperature,
  • reduce the cooking time,
  • add more sugar,
  • switch to a different baking tin,
  • and change the mixing technique.

The cake turns out better.

Which change was responsible?

There is no reliable way to know.

Prompt engineering works exactly the same way.

If five things change between one AI interaction and the next, you have learned almost nothing about which change actually mattered.

Experienced AI practitioners therefore treat prompting as a series of controlled experiments.

Defining the Objective

Every experiment begins with a clear question.

Not:

“Can I get a better answer?”

Instead:

“Does adding a domain-specific role improve technical accuracy?”

or

“Does providing examples reduce hallucinations?”

or

“Does asking for an outline before writing improve article structure?”

Each experiment should attempt to answer one question.

The narrower the question, the more meaningful the result.

Identifying Variables

An experiment has two broad categories of variables.

Independent Variables

These are the factors you intentionally change.

Examples include:

  • prompt wording,
  • assigned role,
  • amount of context,
  • requested output format,
  • model selection,
  • conversation length,
  • temperature (where configurable),
  • use of examples,
  • reasoning instructions.

Dependent Variables

These are the outcomes you measure.

For AI, common measures include:

  • factual accuracy,
  • completeness,
  • readability,
  • reasoning quality,
  • consistency,
  • response time,
  • ease of editing,
  • usefulness for the intended audience.

Separating these two categories helps avoid vague conclusions such as:

“It felt better.”

Instead, you can make more precise observations:

“Adding audience context improved readability but had little effect on technical accuracy.”

That is a useful finding.

The One-Variable Rule

One of the simplest and most valuable habits is changing only one significant variable at a time.

Suppose you are evaluating whether assigning the AI a role improves documentation.

Your baseline prompt might be:

Explain Docker networking.

The experimental version becomes:

Act as a senior cloud infrastructure engineer. Explain Docker networking.

Nothing else changes.

Now the comparison is meaningful.

If you also change the model, add examples, increase the context, and ask for diagrams, any improvement becomes impossible to attribute with confidence.

Small, controlled changes produce useful knowledge.

Large, uncontrolled changes produce speculation.

Establishing a Baseline

Professional testing always begins with a baseline.

Without a baseline, there is nothing to compare against.

For AI experiments, the baseline should be deliberately simple.

For example:

Explain why HTTPS is important.

Record the response.

Then introduce a single modification.

Perhaps:

Explain why HTTPS is important for small business owners who manage an e-commerce website.

Now compare the two outputs.

Did the explanation become more practical?

Did technical detail increase?

Did readability improve?

Did the AI introduce assumptions that were not present before?

The baseline is your reference point.

Everything else is measured against it.

Measuring What Matters

A common mistake is evaluating AI responses using only one criterion.

For example:

“Prompt A is longer.”

Longer does not necessarily mean better.

Instead, consider a balanced set of evaluation criteria.

CriterionQuestions to Ask
AccuracyAre the facts correct?
CompletenessWere important topics omitted?
ClarityWould the intended audience understand it?
StructureIs the information organised logically?
RelevanceDoes the response stay on topic?
Practical ValueCan someone act on the advice?
ConsistencyWould repeated runs produce similar quality?

These criteria help separate subjective preference from objective improvement.

Repeatability Matters

A prompt that performs brilliantly once but poorly the next three times is difficult to rely on.

Experienced AI users therefore look for consistency.

Imagine testing two workflows.

Workflow A produces excellent documentation once but average results thereafter.

Workflow B consistently produces good documentation every time.

In professional environments, Workflow B is often the better choice.

Reliability is frequently more valuable than occasional brilliance.

This principle has guided engineering disciplines for decades, and it applies equally well to AI-assisted work.

Designing Fair Comparisons

When comparing Claude and ChatGPT—or even two versions of the same model—fairness matters.

A meaningful comparison requires:

  • the same task,
  • the same prompt,
  • the same reference material,
  • the same success criteria,
  • and independent evaluation.

Changing multiple factors at once makes comparisons less useful.

A disciplined comparison might look like this:

VariableClaudeChatGPT
PromptIdenticalIdentical
ContextIdenticalIdentical
Source MaterialIdenticalIdentical
Evaluation CriteriaIdenticalIdentical

Only then can differences in the outputs be attributed primarily to the models themselves.

Beyond Winning and Losing

One of the least helpful ways to compare AI systems is to declare an overall winner.

Questions like:

  • Which AI is best?
  • Which model is smarter?
  • Which chatbot wins?

sound appealing but rarely produce useful answers.

Different models have different strengths.

One may excel at long-form writing.

Another may produce clearer code.

A third may reason more cautiously under uncertainty.

The better question is not:

“Which model is best?”

Instead ask:

“Which model performs best for this specific workflow?”

That subtle shift changes the entire evaluation process.

Keeping an Experiment Log

As your experiments grow, memory becomes unreliable.

Keeping a simple experiment log transforms isolated observations into accumulated knowledge.

A practical log might include:

DateTaskVariable ChangedOutcomeNotes
4 AugTechnical articleAdded audience definitionImproved clarityLess jargon
5 AugPython codeRequested architecture firstBetter structureEasier debugging
6 AugProduct comparisonAsked for decision matrixMore actionableFaster review

Over weeks and months, this record becomes a personalised guide to what genuinely works for your own tasks.

Rather than relying on internet trends or viral prompt collections, you build evidence from your own experience.

What Actually Changed the Result? Seven variables that influence an AI outcome — prompt, context, model, tools, workflow, human review and verification, all feeding into the result — with the reminder to ask what you're trying to improve and how you'll know it worked before changing anything.

Key Takeaways

Prompt experiments are most valuable when they are treated as controlled tests rather than random trial and error.

Change one meaningful variable at a time.

Define clear success criteria.

Measure outcomes objectively.

Keep records of what you learn.

Most importantly, remember that the goal is not to discover a mythical “perfect prompt.” It is to understand why certain approaches work better than others so that those insights can be incorporated into reliable workflows.

That transition—from isolated prompting to evidence-based experimentation—is the first step toward becoming an effective AI practitioner rather than simply an enthusiastic user.

About This Book

This page is part of Prompt and Workflow Experiments: What Actually Improves AI Results?, an eight-chapter deep dive on reliable AI engineering.

More from the Notes

Short technical notes and observations, written up as experiments produce something worth documenting.

Back to Notes

Was this useful?

Published