Prompt
Need to measure which prompts trigger brand mentions
Latest observation
Oct 22, 2026
OpenAI APIWeb search: off
To measure which prompts trigger brand mentions, you can set up a simple detection and tracking pipeline.
1) Define what counts as a brand mention
Decide upfront whether to count:
- Exact brand names only
- Common misspellings / aliases
- Product names
- Subsidiaries or parent brands
- Competitor brands
Example rule:
- “Apple” counts
- “iPhone” counts if you consider it a brand/product mention
- “AAPL” counts only if relevant
2) Collect prompt-response pairs
For each prompt, store:
- Prompt text
- Model response
- Timestamp
- Prompt category / source
- Model/version
3) Detect brand mentions in responses
Use one or more methods:
- Dictionary matching: Compare against a list of known brands
- NER (Named Entity Recognition): Identify organization/product names
- Regex / alias matching: Catch variations and abbreviations
- LLM-based classification: Ask a model whether a response contains a brand mention
For reliability, combine dictionary matching with manual review for ambiguous cases.
4) Calculate metrics
Useful metrics:
- Brand mention rate = prompts that produce at least one brand mention / total prompts
- Brand frequency = total number of mentions per brand
- Prompt-to-mention conversion = how often a specific prompt type triggers mentions
- Top triggering prompts = prompts most associated with brand mentions
- Brand mention by category = rates by prompt topic, length, style, etc.
5) Rank prompts by trigger strength
Create a table like:
| Prompt | Total Runs | Brand Mention Rate | Most Mentioned Brand |
|---|---|---|---|
| Prompt A | 200 | 42% | Nike |
| Prompt B | 150 | 18% | Apple |
This helps identify which prompts are most likely to trigger brand mentions.
6) Investigate prompt patterns
Look for prompt features that correlate with mentions:
- Requests for comparisons
- “Best” / “top” / “recommend” phrasing
- Category-specific prompts
- Prompts mentioning a product class
- Prompts with explicit brand context
7) Automate with a scoring pipeline
A practical workflow:
- Ingest prompt-response logs
- Run brand detection
- Label each response with:
contains_brand_mention: true/falsebrands_detected: [...]
- Aggregate by prompt and compute rates
- Review edge cases manually
8) Example pseudocode
brands = ["Apple", "Nike", "Samsung"]
def detect_brands(text):
found = []
for b in brands:
if b.lower() in text.lower():
found.append(b)
return found
results = []
for row in dataset:
brands_found = detect_brands(row["response"])
results.append({
"prompt": row["prompt"],
"contains_brand": len(brands_found) > 0,
"brands": brands_found
})
9) Watch out for false positives
Common issues:
- “Apple” as a fruit vs brand
- Generic words that overlap with brand names
- Quotes or citations mentioning brands but not the model’s own output
- Brand mentions in the prompt itself vs in the response
If you want, I can help you design:
- a SQL query,
- a Python script,
- or a full evaluation framework to measure brand mentions at scale.