Sub topic 8
Variability Between Runs and How to Sample for It
Assume you understand prompts, AI answer engines, mentions, citations, and basic percentages. This chapter focuses on a measurement problem: the same prompt can produce different answers at different times or across repeated runs.
Why repeated runs differ
AI answers are not always deterministic. Variation can come from:
- Randomness in text generation.
- Changes to the model or its system instructions.
- Different search results or retrieved documents.
- Changes in the answer engine's source index.
- Location, language, account, or personalization settings.
- Temporary outages or tool failures.
A brand may be mentioned in one response but omitted in the next. A citation may also change even when the main answer stays similar. Therefore, one response is an observation, not a stable measurement.
Use a run to mean one execution of one prompt under one set of conditions. A repeat is another run of the same prompt. For example, running “best CRM for small teams” 20 times creates 20 observations for that prompt.
Separate prompt sampling from run sampling
Two types of sampling answer different questions.
Prompt sampling asks whether your prompt set represents the questions your audience asks. It should cover topics, search intents, products, customer stages, and competitor comparisons.
Run sampling asks how much an answer changes when the same prompt is executed repeatedly. It measures response variability.
A useful design keeps a stable prompt set and repeats a subset of prompts. For example:
| Sampling layer | Example design | What it measures |
|---|---|---|
| Prompt set | 100 prompts across five intents | Coverage of real questions |
| Repeated prompts | 20 prompts run 10 times each | Run-to-run variability |
| Scheduled reruns | Full set every week | Change over time |
Do not compensate for a poorly designed prompt set by running each prompt many times. Repetition reduces uncertainty for the selected prompts, but it does not make those prompts representative.
A practical sampling workflow
- Build a versioned prompt set. Record the prompt text, topic, intent, language, location, engine, and model settings.
- Select repeated prompts using strata. A stratum is a subgroup, such as “comparison” or “pricing.” Include prompts from every important subgroup.
- Run the repeated sample under the same conditions. Keep engine, account state, region, and time window consistent.
- Record the full answer, cited URLs, timestamp, model or engine, and any error status.
- Parse each response into observations such as brand mentioned, brand position, citation present, and citation domain.
- Report both the central estimate and its uncertainty.
A stratified sample prevents a large topic group from hiding a smaller but important group. If pricing prompts are only 5% of your set, you may still give them a fixed minimum number of repeated prompts because pricing visibility matters commercially.
Report uncertainty, not just a percentage
Suppose a brand appears in 12 of 40 repeated responses. The observed mention rate is 30%. That percentage can move substantially with another sample, especially when the sample is small.
A confidence interval gives a range that reflects sampling uncertainty. For a proportion, the Wilson interval is often more useful than the simple range produced by p ± standard error, particularly when the rate is near 0% or 100%.
import math
def wilson_interval(successes, trials, z=1.96):
if trials == 0:
return (0.0, 0.0)
p = successes / trials
denominator = 1 + z * z / trials
centre = p + z * z / (2 * trials)
margin = z * math.sqrt(
p * (1 - p) / trials + z * z / (4 * trials * trials)
)
return (
(centre - margin) / denominator,
(centre + margin) / denominator,
)
low, high = wilson_interval(12, 40)
print(f"Observed rate: 30%")
print(f"Approximate 95% interval: {low:.0%} to {high:.0%}")Treat this interval as a sampling aid, not a guarantee that the engine's future behavior must fall inside it. The calculation assumes observations are comparable. Repeated runs can also be correlated, so ten runs taken seconds apart may provide less independent evidence than ten runs spread across several controlled time windows.
Common errors and decision rules
Avoid these mistakes:
- Comparing this week's 10 prompts with last week's different 10 prompts.
- Mixing ChatGPT, Gemini, and Perplexity results into one unexplained rate.
- Treating a single missing mention as a visibility loss.
- Reporting more decimal places than the sample supports.
- Changing prompts, aliases, or matching rules halfway through a trend.
- Ignoring failed runs or silently counting them as no mention.
Keep a prompt-set version and a parser version with every report. Compare rates only when the engine, conditions, prompt definitions, and parsing rules are sufficiently consistent. When a change matters, rerun the affected prompts and inspect the individual answers before assigning a cause.
Exercise
You run 20 prompts once and find a 40% mention rate. What should you do before claiming that visibility improved from last month’s 35%?
Show answer
Confirm that the prompt set, engine, settings, and matching rules are comparable. Then repeat a stratified sample of prompts and report the new rate with uncertainty.