Sub topic 7
Turning Questions into Prompts Without Losing Customer Wording
This chapter assumes you understand basic AI assistant behavior, can read simple Python, and know why personal data must be removed before questions enter a test set. The goal is to turn cleaned customer questions into reliable prompts without replacing natural language with internal terminology.
Preserve the customer’s intent
A customer question contains more than a topic. Its wording can reveal:
- The words customers actually use.
- The information they expect an answer to contain.
- Their level of knowledge.
- Their urgency or concern.
- Ambiguity that an AI system must handle.
For example, a product team might write:
> Explain the supported email-change workflow for subscription accounts.
A customer might ask:
> Can I move my subscription to a different email address?
The first prompt tests whether the system knows internal process language. The second tests whether the system understands a real request. Keep the second wording as the primary prompt.
A prompt record should separate the original text from metadata and optional variants.
| Field | Purpose | Example |
|---|---|---|
| `text` | Customer wording used in the test | `Can I move my subscription to a different email address?` |
| `intent` | What the customer wants to do | `how_to` |
| `cluster` | Related subject area | `account_management` |
| `source` | Where the question came from | `support_tickets` |
| `variant_type` | Whether wording is original or controlled | `canonical` |
Do not silently “improve” grammar, expand abbreviations, or replace informal terms. A cleaned question may have personal information removed, but its meaning and voice should remain.
Use a canonical prompt and controlled variants
A canonical prompt is the retained customer question that best represents a group of equivalent questions. Select one that is complete, understandable, and close to the wording people used.
Create variants only when they test a deliberate condition. Useful variants include:
- A shortened version that reflects common search behavior.
- A version with a different but realistic customer context.
- A follow-up question that tests conversational continuity.
- A spelling or phrasing variant that appears frequently in the source data.
- A version for a different journey stage, such as evaluation instead of troubleshooting.
Label every variant. This prevents a synthetic rewrite from being mistaken for observed demand.
def make_prompt_record(row, variant_text=None, variant_type="canonical"):
text = variant_text if variant_text is not None else row["text"]
return {
"id": row["id"],
"text": text,
"source_text": row["text"],
"source": row["source"],
"intent": row["intent"],
"cluster": row["cluster"],
"count": row["count"],
"variant_type": variant_type,
}
question = {
"id": "q-0042",
"text": "Can I move my subscription to a different email address?",
"source": "support_tickets",
"intent": "how_to",
"cluster": "account_management",
"count": 37,
}
canonical = make_prompt_record(question)
short_variant = make_prompt_record(
question,
variant_text="Can I change the email on my subscription?",
variant_type="controlled_paraphrase",
)
print(canonical["text"])
print(short_variant["variant_type"], short_variant["text"])The source_text field provides an audit trail. If someone later questions a prompt, you can compare it with the original cleaned record.
Add context without leading the system
Some questions are too vague to test fairly. Add context as a separate field rather than inserting an answer into the wording.
For example:
- Prompt: “How do I cancel?”
- Context: “The customer has an annual subscription and is signed in.”
- Expected intent: “cancellation policy or procedure”
Avoid leading prompts such as:
- “Explain why the annual plan cannot be refunded.”
- “Tell the customer to contact support to cancel.”
These prompts assume the answer and test compliance with the test author’s belief. A neutral prompt lets the system demonstrate whether it knows the correct policy.
Review each transformation
For every proposed prompt, ask:
- Would a real customer plausibly say this?
- Did the transformation preserve the original intent?
- Did it add facts the customer did not provide?
- Is the change needed for a defined test?
- Is the variant labelled and traceable to its source?
A review can reject a prompt even when its grammar is better. Natural language variation is part of what the test set must measure.
Exercise
Exercise
A customer asks, “Why can’t I download my invoices yet?” An editor changes it to “Explain the invoice-download delay for new accounts.” What is the main problem, and how should it be recorded?
Show answer
The edit adds “new accounts,” which the customer did not mention, and changes the wording. Keep the original as the canonical prompt. If the new wording tests a deliberate new-account context, store it as a labelled variant with that context recorded separately.