Sub topic 12
Versioning the Set and Refreshing It Over Time
This chapter assumes you understand basic prompt evaluation, data privacy, and simple Python. It also assumes that your prompt set already contains cleaned, deduplicated customer questions with intent and topic labels.
A prompt set is a measurement tool, not a permanent list. Customer language changes, products change, and AI search systems change. If you replace prompts without recording what changed, a score change becomes difficult to interpret. Versioning gives every set a stable identity and preserves the history needed for comparison.
What to record in each version
Give each released set a version number, such as 1.0, 1.1, or 2.0. Use the number to communicate the size of the change:
- A major version changes the structure, taxonomy, sampling method, or evaluation goal.
- A minor version adds or removes prompts without changing the evaluation method.
- A patch version corrects wording, metadata, or a privacy problem without changing intended coverage.
Store the prompts in a structured format. Each record should include the prompt text, its source category, intent, topic cluster, frequency information, and the version that introduced it.
| Field | Purpose |
|---|---|
| prompt_id | Stable identifier for tracking a prompt |
| text | Customer wording used in the test |
| intent | What the customer wants to accomplish |
| cluster | Product or subject area |
| source_period | Time range from which the question came |
| frequency_band | Relative demand, such as high, medium, or rare |
| introduced_in | Version where the prompt first appeared |
| status | Active, deprecated, or replaced |
Keep the prompt identifier stable when the meaning has not changed. If you correct spelling, update the text but retain the identifier and record the change. If the question's meaning changes, create a new identifier. This prevents a historical result from silently referring to a different test.
A separate change log should explain why prompts were added, removed, or changed. Record the source data period, the sampling seed, the taxonomy version, and the person or process that approved the release.
Refresh on a schedule and on events
A regular refresh catches gradual changes. Monthly or quarterly refreshes are common, but the correct interval depends on question volume and product change. A high-volume support channel may need monthly review. A stable specialist product may need quarterly review.
Do not wait for the calendar after important events. Trigger an additional review when:
- The product gains or removes a major feature.
- Pricing, eligibility, or policies change.
- A new customer segment becomes important.
- Support reports a new recurring question.
- Search traffic shows a new query pattern.
- A privacy incident reveals that scrubbing rules missed data.
- Evaluation results change sharply after a system update.
During a refresh, compare the incoming question period with the current set. Add emerging topics, retire questions that no longer represent the product, and preserve a small stable core. The stable core allows results from different versions to be compared. The refreshed portion keeps the set representative.
Use a release workflow
Treat a new prompt set like a data release:
- Freeze the source period and export the raw questions.
- Apply privacy scrubbing before reviewers see the data.
- Normalise, deduplicate, classify, and cluster the questions.
- Compare coverage and frequency with the active version.
- Propose additions, removals, and wording changes.
- Review the proposal for privacy, synthetic bias, and leading wording.
- Generate the new version with a recorded seed.
- Run the validation set and compare results with the previous version.
- Publish the set and its change log.
The validation set should remain held out from prompt construction. If you repeatedly use the same validation questions to design prompts, the set becomes tuned to those examples and its results become less trustworthy.
from dataclasses import dataclass
from datetime import date
@dataclass(frozen=True)
class Prompt:
prompt_id: str
text: str
status: str = "active"
@dataclass(frozen=True)
class Release:
version: str
released_on: date
source_period: str
prompts: tuple[Prompt, ...]
def compare_releases(old: Release, new: Release) -> dict[str, set[str]]:
old_ids = {p.prompt_id for p in old.prompts if p.status == "active"}
new_ids = {p.prompt_id for p in new.prompts if p.status == "active"}
return {
"added": new_ids - old_ids,
"removed": old_ids - new_ids,
"unchanged": old_ids & new_ids,
}
previous = Release(
"1.0", date(2026, 1, 15), "2025-Q4",
(Prompt("q-1", "How do I change my plan?"),)
)
current = Release(
"1.1", date(2026, 4, 15), "2026-Q1",
(Prompt("q-1", "How do I change my subscription plan?"),
Prompt("q-2", "Can I pause my subscription?"))
)
print(compare_releases(previous, current))Interpret results across versions
A score from version 1.1 should not be described as a direct trend from version 1.0 unless the versions share a stable core. Report both the overall score and the score for unchanged prompts. The unchanged score shows whether system behavior changed. The overall score shows performance on the current customer question mix.
Track the distribution of intents, clusters, and frequency bands at every release. A large shift may reflect real customer demand, a changed source mix, or a classification problem. Investigate before treating it as a product or AI-search improvement.
Exercise
Exercise
A new release replaces 30% of the prompts after a major pricing change. Which comparison should you report?
Show answer
Report the overall result for the new release and a separate result for the stable core shared with the previous release. Explain that the overall scores are not directly comparable because the tested question mix changed.