Prompt
What if I need to separate branded and non-branded prompts?
Latest observation
If you need to separate branded and non-branded prompts, the usual approach is to classify each prompt into one of those two buckets before using it in reporting, routing, or analysis.
Simple definition
- Branded prompt: Mentions your brand, product name, company name, or other protected terms.
- Non-branded prompt: Does not mention any brand-specific terms.
Common ways to do it
1) Rule-based keyword matching
Create a list of brand terms and flag any prompt containing them.
Example:
- Brand terms:
["acme", "acme pro", "acme app"] - Prompt:
"How does Acme Pro compare to competitors?"→ Branded - Prompt:
"Best project management tools for teams"→ Non-branded
This is the easiest method if your brand terms are well-defined.
2) Regex / pattern matching
Useful if brand names have variants, abbreviations, or common misspellings.
Example:
- Match
acme,acme pro,a.c.m.e. - Can also catch plurals, spacing differences, and punctuation variants
3) NLP / LLM-based classification
If prompts are messy or the brand references are indirect, you can ask a model to classify each prompt as branded or non-branded.
Example label set:
brandednon_branded
This works better when:
- Users reference products indirectly
- There are many brand aliases
- You want higher recall beyond keyword matching
4) Hybrid approach
Best in practice:
- Use keyword rules first
- Fall back to an LLM classifier for ambiguous cases
This gives you speed, consistency, and flexibility.
Recommended output structure
For each prompt, store:
prompt_textbrand_flag=true/falsebrand_type=branded/non_brandedmatched_term= the term that triggered the classificationconfidence= optional
Example:
| prompt | brand_flag | matched_term |
|---|---|---|
| “Acme pricing plans” | true | Acme |
| “Best CRM for small business” | false | — |
If you want, I can help you with one of these next:
- A SQL query to separate branded vs non-branded prompts
- A Python script for classification
- A prompt template for an LLM-based classifier
- A recommended taxonomy for your brand terms
If you share your brand names or an example dataset, I can make it specific.