Sub topic 4
Running Prompts Under a Controlled, Documented Protocol
This chapter assumes you have already defined what brand visibility means (mention, recommendation, citation, accuracy, sentiment) and built a labelled prompt set with discovery, comparison, problem and branded prompts. You should also be comfortable reading JSON. The Python in this chapter is optional.
A prompt set only becomes a measurement when you run it the same way every time. This chapter covers how to fix the conditions of a test, write them down, and run the prompts in a repeatable order. Repeating each prompt to handle answer variability, and the full record format, get their own chapters. Here we set up the protocol that those chapters depend on.
Why a protocol matters
Two people can paste the same prompt into the same assistant and get different answers. The cause may be randomness in the model, but it may also be a difference in the test setup: one person had web search on and the other did not, or one was logged in with saved memory and the other was not.
If you change these settings between runs and don't record them, you can't tell a real change in visibility from a change in your setup. A protocol does two jobs:
- It reduces avoidable variation, so the variation left over is mostly the assistant's own.
- It documents the conditions, so someone else (or you in three months) can repeat the test and compare results fairly.
The variables you control
Treat every setting that can change an answer as a variable. Fix it, or record it if you can't fix it.
| Variable | Why it changes answers | What to do |
|---|---|---|
| Assistant and product | Different assistants use different models and sources | Name each one explicitly |
| Mode | Web search, "deep research", or offline-only modes draw on different information | Pick one mode per test series and record it |
| Model setting | Many products let users pick a model or default to an automatic choice | Record the label shown in the interface |
| Account state | Logged-in accounts may carry memory, saved preferences or history | Use one consistent account state |
| Memory and custom instructions | Stored preferences can push answers toward or away from a brand | Turn off or clear them, and record that you did |
| Language and region | Answers and cited sources differ by locale | Fix both and record them |
| Prompt wording | Small edits change which brands appear | Use the exact text from the prompt file |
| Session state | Earlier messages in a conversation influence later ones | Start a fresh session for each run |
| Date and time | Models and indexes update | Record the date of every run |
You will not control everything. Some products give no model choice, and results can differ by data centre. For those variables, write down that you could not control them. An unrecorded variable is a hidden source of error, but a recorded one is a known limit.
Choosing assistants and modes
Pick the assistants your customers actually use. For most brands that means two to four. Testing more assistants gives broader coverage, but each one multiplies the number of runs, and you have to run and record every one of them.
Mode deserves care. An assistant with web search on will often cite pages and may mention brands that appeared in recent results. The same assistant with search off relies on what the model learned in training. These two modes can give different brand lists for the same prompt. Treat each assistant-and-mode combination as its own test target and report them separately. Do not average a search-on result with a search-off result.
The model label is whatever the interface shows, such as an automatic setting or a named version. If the interface hides it, record "not shown". You are not claiming to know the exact model, only what you saw.
Starting clean: sessions, accounts and memory
Conversation history is the most common contaminant. If you ask a discovery prompt and then a comparison prompt in the same chat, the second answer may be shaped by the first. Follow these rules:
- Open a new conversation for every run of every prompt.
- Paste one prompt per conversation. Do not add follow-up messages unless a follow-up is itself part of the test design.
- Prefer one consistent account state. A logged-out or dedicated test account is easiest to keep clean.
- If the product has memory or personalisation, turn it off, or clear it before the series, and note this in the protocol.
- Do not use an account where you have previously searched for or praised your own brand. Your own history is the kind of signal personalisation picks up.
Browser extensions that rewrite pages, VPNs that change your apparent region, and shared accounts used by several colleagues all add noise. Decide which ones are in or out and write it down.
Using prompts verbatim
Copy the prompt text from the prompt file and paste it without edits. Do not fix a typo, rephrase, or add context "to help". If a prompt turns out to be badly written, change it in the prompt file, give the file a new version, and start a new series. Mixing old and new wording in one series makes the results incomparable.
Also avoid adding hints that make the assistant more likely to name you. A prompt like "What are the best analytics tools, including Acme?" tests whether the assistant can describe Acme when asked, not whether it brings Acme up unprompted. The prompt types you designed earlier cover that difference: discovery and problem prompts test unprompted visibility, while branded prompts test what the assistant knows about you.
Writing the protocol down
Put the protocol in a file next to the prompt set. A short JSON file works well because you can check it with a script and store it in version control.
{
"protocol_version": "1.0",
"prompt_file": "prompts.json",
"runs_per_prompt": 5,
"fresh_session_per_run": true,
"prompt_text_edited": false,
"language": "en-GB",
"region": "UK",
"operator": "J. Doe",
"targets": [
{
"name": "Assistant A",
"mode": "web search on",
"model_label": "default, as shown in interface",
"logged_in": false,
"memory": "off",
"custom_instructions": "none"
},
{
"name": "Assistant B",
"mode": "web search off",
"model_label": "not shown",
"logged_in": true,
"memory": "off",
"custom_instructions": "none"
}
]
}Each target is one assistant in one mode with one account state. The top-level fields apply to the whole series. If you later change runs_per_prompt or add a target, bump protocol_version so old results stay tied to the rules that produced them.
The runs_per_prompt value here is a placeholder. How to choose it is the subject of the next chapter.
Checking that the protocol is complete
A protocol with blank fields is a common failure. This script reports any required field that is missing or empty, at the top level or in a target. It is optional, but it catches mistakes before you spend an afternoon on runs.
import json
TOP_REQUIRED = [
"protocol_version", "prompt_file", "runs_per_prompt",
"fresh_session_per_run", "prompt_text_edited",
"language", "region", "operator", "targets",
]
TARGET_REQUIRED = [
"name", "mode", "model_label", "logged_in",
"memory", "custom_instructions",
]
def missing_fields(protocol: dict) -> list[str]:
"""Return a list of missing or empty required fields."""
problems = []
for key in TOP_REQUIRED:
if key not in protocol or protocol[key] in (None, "", []):
problems.append(key)
for i, target in enumerate(protocol.get("targets", [])):
for key in TARGET_REQUIRED:
if key not in target or target[key] in (None, ""):
problems.append(f"targets[{i}]: {key}")
return problems
protocol = json.loads("""
{
"protocol_version": "1.0",
"prompt_file": "prompts.json",
"runs_per_prompt": 5,
"fresh_session_per_run": true,
"prompt_text_edited": false,
"language": "en-GB",
"region": "UK",
"operator": "J. Doe",
"targets": [
{"name": "Assistant A", "mode": "web search on",
"model_label": "default", "logged_in": false,
"memory": "off", "custom_instructions": "none"},
{"name": "Assistant B", "mode": "web search off",
"model_label": "not shown", "logged_in": true,
"custom_instructions": "none"}
]
}
""")
print(missing_fields(protocol))
# ['targets[1]: memory']Note that False values such as "logged_in": false pass the check. A false is an answer, not a blank.
The run procedure
Follow the same sequence for every run. Consistency in order matters because fatigue and drift in how you copy and paste are real error sources in manual testing.
Practical rules for the sequence:
- Save the full answer, including any list of sources or links the assistant shows. Do not record only "yes, we were mentioned". You will want to rescore later, and you cannot rescore a summary.
- Wait for the answer to finish before copying. Streamed answers can change as they grow, and brands often appear late in a list.
- Do not regenerate or press "try again" and keep only the answer you like. A regenerated answer is a new run and must be recorded as one.
- Interleave rather than batch. Run prompt 1 on each target, then prompt 2 on each target, and so on, or randomise the order. If you run every prompt on Assistant A in the morning and Assistant B in the evening, a time-of-day effect looks like an assistant difference.
- Finish a series in a short window. Aim for one sitting or a day or two. A series spread across weeks mixes in model and index updates.
Handling deviations
Things go wrong: a session times out, the assistant refuses, the interface changes mid-series, or you realise you used the wrong mode for three runs. Do not quietly discard or patch these runs. Instead:
- Note what happened next to the affected runs.
- Mark the runs as invalid, or rerun them under the correct setup and keep both records.
- If the interface changed in a way that affects the test (for example, a new default mode), say so in the protocol notes and consider starting a new series.
Keeping failed runs visible protects you from a subtle bias: if you only keep the runs that look right, you are choosing results, not measuring them.
Common errors
- Changing settings mid-series. Switching from search off to search on after a few prompts makes the early and late results incomparable.
- Shared conversations. Running several prompts in one chat leaks context from earlier answers into later ones.
- Editing prompts "slightly". Even changing one word can alter which brands appear. Edit the file and version it instead.
- Testing only your own account state. A heavily personalised account may over-report your brand. A clean state is a more conservative baseline.
- Treating one assistant as all assistants. Results for one assistant and mode say nothing certain about another.
- Leaving the protocol undocumented. Without the file, a repeat test months later cannot be matched to the original conditions.
What a protocol cannot do
A tight protocol reduces your own contribution to variation. It does not make an assistant deterministic, and it does not reveal how the assistant works inside. Two runs under identical conditions can still differ, and results can still shift when the provider updates a model. That is why the next chapters cover repeated runs and careful reading of results. The protocol makes those later steps meaningful, because you know what stayed constant.
Exercise
A colleague runs your discovery prompts on Assistant A with web search on in the morning, then runs the same prompts on Assistant B with web search off in the evening, all in one long conversation per assistant. Name four protocol problems with this approach and say how to fix each one.
Show answer
(1) Mode differs between assistants (search on vs off), so the assistants are not compared fairly. Treat each assistant-and-mode combination as a separate target, or use the same mode on both. (2) One long conversation per assistant lets earlier prompts and answers influence later ones. Open a fresh session for every run. (3) Running one assistant in the morning and the other in the evening mixes a time-of-day or update effect with the assistant difference. Interleave the runs or randomise the order, and finish within a short window. (4) Nothing about the conditions was recorded (model label, account state, memory, language, region, date). Write these in a protocol file and record the date and conditions for each run.
Exercise
Why does the check in missing_fields accept "logged_in": false but reject "memory": ""?
Show answer
false is a real answer: the test was run logged out. An empty string means the field was never filled in, so the conditions are unknown. The check looks for None, empty strings and empty lists, not for falsy values in general.