Sub topic 1
Why AI Answers Need Their Own Visibility Metrics
Prerequisites
- Familiarity with AI chat assistants and AI-generated search answers
- Understanding of SEO terms such as keywords, rankings, and backlinks
- Comfort reading ratios and percentages
- Optional: basic Python for the code example
Why AI answers need their own metrics
Search engines show a ranked list of links. A brand can track its position for each keyword. AI answer engines, such as ChatGPT, Perplexity, Gemini, and Google AI Overviews, write a single synthesized answer. The answer may name several brands, cite a few pages, or name none at all. A rank number does not describe this output, so teams track two things instead: whether the answer mentions their brand, and whether it cites their pages.
The tracking workflow
A visibility tracker follows four steps:
- Send a fixed set of prompts to each answer engine.
- Store each full answer and its cited URLs.
- Parse each answer for brand mentions and citations.
- Compute metrics across all stored responses.
Keep the prompts and engines fixed between reporting periods. Otherwise, a change in the numbers may come from a change in the inputs.
Building a prompt set
A prompt set is the list of questions the tracker asks. Include prompts from several topics, intents (comparison, how-to, recommendation), and competitors. Write prompts the way real users type them. A set that covers only your brand name measures brand searches, not discovery.
Detecting brand mentions
A mention is a brand name that appears in the answer text. Match each brand against a list of aliases, using word boundaries so that "acme" does not match "acmelike".
import re
ALIASES = {"Acme": ["acme", "acme corp"], "Globex": ["globex"]}
def find_brands(answer):
found = []
for brand, names in ALIASES.items():
for name in names:
if re.search(rf"\b{re.escape(name)}\b", answer, re.IGNORECASE):
found.append(brand)
break
return found
print(find_brands("Acme and Globex both offer free plans."))Exercise
Exercise
The answer "Globex is popular, but acmecorp is new" is parsed with the alias list above. Which brands does find_brands return?
Show answer
It returns ["Globex"]. The alias "acme corp" does not match "acmecorp" because the word boundary requires a space or punctuation after "acme" in the whole alias, and "acme" alone does not appear as a separate word.