Sub topic 2
Labelling questions by intent and journey stage
This chapter assumes you have cleaned and deduplicated a list of customer questions, and that you can read simple Python. Intent is the goal behind a question, such as learning how to do something or comparing options. A journey stage is where the customer is in their buying or usage path. Both labels help you choose which questions belong in your prompt set.
Labelling by intent
Give each question one primary intent label. Keep the list short, so each label has enough examples to be useful.
| Intent | Typical question | Journey stage |
|---|---|---|
| how_to | How do I move my subscription? | Using the product |
| pricing | How much does the plan cost? | Considering |
| comparison | Is this better than the alternative? | Considering |
| troubleshooting | Why does checkout fail? | Using the product |
A keyword rule gives a rough first pass:
INTENT_RULES = {
"how_to": ["how do i", "how can i", "how to"],
"pricing": ["price", "cost", "how much"],
"comparison": ["vs", "versus", "better than", "alternative"],
"troubleshooting": ["error", "not working", "fail", "broken"],
}
def label_intent(question):
text = question.lower()
for intent, keywords in INTENT_RULES.items():
if any(k in text for k in keywords):
return intent
return "other"
print(label_intent("How do I move my subscription?")) # how_to
print(label_intent("Why does checkout fail?")) # troubleshootingGrouping similar questions into topic clusters
A topic cluster is a set of questions about the same subject, regardless of intent. Group questions by shared product terms or by similarity scores from an embedding model. Name each cluster in plain words, such as "account management" or "billing errors", and record how many real questions fall into it. The counts later drive how many prompts each cluster receives.
Turning questions into prompts without losing customer wording
Use the customer's exact phrasing as the base prompt. Fix only spelling and remove personal details. Do not rewrite a question into formal language, because formal wording tests a different question than the one customers ask. You may add controlled variants, such as a shorter version or one with a persona, but record each variant and its origin.
Exercise
A cluster holds 40 questions, and 30 of them are labelled how_to. Should the prompt set keep the cluster's intent mix?
Show answer
Yes. Sample prompts in proportion to real frequency, so the set reflects how often customers ask each kind of question. Keep a minimum number for rare intents so they stay covered.