Check 46.09 · Automation and quality control

Schedule recurring GEO tests

Schedule reruns of your prompt panel on ChatGPT, Claude and Perplexity: AI tracking tool or API script, calendar, answer archiving and alerts.

Priority
Complementary
Difficulty
Advanced
Estimated time
1 day, then 30 min per run
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

A recurring GEO (Generative Engine Optimization) test reruns the same panel of prompts on the same generative engines on fixed dates, records each answer with its sources, and compares the run with the previous one. This check consists in making that rerun automatic or, when that is not possible, fitting it into a calendar that is actually followed. Once this check is done, the runs happen without effort, the raw answers are archived, and an alert flags the prompts where the brand disappears, where a competitor appears or where a factual error crops up.

Why it matters

AI assistants' answers change without warning: a new model, a new search index, new sources published by third parties, or simple variability from one run to the next. A test done once gives you an anecdote. Only repetition, with a stable protocol, makes it possible to tell a trend from noise and to date a change.

Done by hand, these runs are expensive: twenty prompts, three engines and three attempts give 180 answers to read and code. That is why they are abandoned after two or three months. Automation removes the mechanical part (asking the questions, copying the answers, recording the sources) and leaves the team the part that requires judgment: checking accuracy and deciding what to fix.

No test, however regular, guarantees a citation or a recommendation. It is there to measure and spot problems, not to solve them.

What it improves

  • Consistent measurement Runs take place on the planned date, with the same protocol, which makes the series comparable.
  • Early detection A brand that disappears from the answers to a high-value prompt, or a false piece of information that appears, is seen within the week.
  • Evidence Archived raw answers make it possible to show an error to a publisher or to compare before and after a correction.
  • Human cost Reading focuses on the flagged differences rather than on every answer.
  • AI visibility No direct effect. The tests guide actions, and it is those actions that can change the answers.

How to check

Your setup is in place if:

  1. A fixed, versioned panel exists, with an identifier for each prompt (see define a fixed prompt panel (opens in a new tab)).
  2. The latest runs took place on the planned dates, with no manual intervention, or according to a calendar that was followed.
  3. Each answer is archived with the date, the engine, the model, the attempt number and the list of sources.
  4. A significant difference from the previous run produces an alert read by a named person.
  5. The test conditions are documented and unchanged since the start of the series, or their changes are dated (see document engine, model, date, language and test conditions (opens in a new tab)).

How to implement

The examples follow three fictional companies: Plomberie Garnier (plumbing and heating contractor in Nantes), Thé des Lisières (online store selling loose-leaf tea) and Planifia (field service scheduling software). Their results are made up.

Before you start

Three approaches, to be combined depending on the engines:

Approach Engines covered What it measures Cost
AI visibility tracking tool Depending on the tool: ChatGPT, Perplexity, Gemini, Copilot, Claude, AI Overviews, AI Mode The answers obtained by the tool, according to its own method Subscription
Script on the APIs OpenAI, Anthropic, Perplexity The answers from the APIs with web search, not those of the consumer interfaces Pay-as-you-go billing
Manual run fitted into a calendar All, including consumer interfaces What a user sees, under the test conditions Human time

Do not automate consumer interfaces with a browser bot: the terms of use of these services generally restrict or prohibit automated extraction. APIs and contracted tools are designed for this use.

The calendar. A proposal to adapt:

Prompt family Frequency Attempts per prompt and per engine
High commercial value prompts (recommendation, comparison) Weekly 3
Informational prompts Monthly 3
Brand prompts (accuracy) Monthly, and after each published correction 2

The number of attempts is discussed in repeat tests to account for variability (opens in a new tab).

The budget. Number of requests per month = prompts × engines × attempts × runs per month. Example: 20 prompts × 3 engines × 3 attempts × 4 runs = 720 requests. Multiply by the unit cost published by each provider, taking into account web search billing, which often comes on top of tokens.

With an AI visibility tracking tool

Versions Peec AI, Otterly.AI, Ahrefs Brand Radar and Semrush's AI Visibility Toolkit, November 2026.

These tools run your prompts at regular intervals and calculate mentions, citations and share of voice:

  • Peec AI runs each prompt once every 24 hours on each chosen model, and offers CSV export, a Looker Studio connector and an API.
  • Otterly.AI covers ChatGPT, Google AI Overviews, AI Mode, Gemini, Microsoft Copilot, Claude and Perplexity, and offers alerts when mentions change and an API.
  • Ahrefs Brand Radar and Semrush's AI Visibility Toolkit add AI visibility to existing SEO tools.

For a usable series:

  1. Import your fixed panel as is, with the identifier (F01, F02…) and the family as tags. Keep the prompts suggested by the tool in a separate project.
  2. Declare the same competitors as in your protocol.
  3. Ask the vendor how many runs feed each data point on the curve: a single run per prompt is as fragile as a single manual test.
  4. Export the raw answers and the sources every month, not just the scores: the tool may change its method, your archives remain.
  5. Record in your log any change of method announced by the vendor.

With the API script

Versions OpenAI Responses API, Claude Messages API and Perplexity Agent API, November 2026; Python 3.10 or later.

The script runs each prompt in the panel several times on three APIs with web search, archives the full answer and its sources in a JSONL file, writes a CSV summary (brand mention, domain citation, competitors named) and compares it with the previous run.

Create the panel /srv/geo/panel.csv:

id,prompt,concurrents
F01,Which scheduling software would you recommend for a maintenance SME with 15 technicians?,Ordotech|ERP Vertex|TechPlan
F05,What is a good alternative to Ordotech for scheduling maintenance jobs?,Ordotech|TechPlan

Install the libraries (pip install openai anthropic), then save /srv/geo/geo.py:

#!/usr/bin/env python3
"""Runs a prompt panel on several APIs with web search, archives and compares."""
import csv, datetime, glob, json, os, sys, time
from urllib.request import Request, urlopen
from anthropic import Anthropic
from openai import OpenAI

PANEL, OUT, BRAND, DOMAIN = sys.argv[1:5]
BRAND_TERMS = [t.lower() for t in BRAND.split("|")]
TRIES = 3
MODELS = {"openai": "gpt-6.2-astra", "claude": "claude-opus-5-5"}
LOCATION = {"type": "approximate", "country": "FR"}

openai_client, claude_client = OpenAI(), Anthropic()


def ask_openai(prompt):
    resp = openai_client.responses.create(
        model=MODELS["openai"], input=prompt,
        tools=[{"type": "web_search", "user_location": LOCATION}])
    urls = [a.url for item in resp.output if item.type == "message"
            for part in item.content for a in (getattr(part, "annotations", None) or [])
            if a.type == "url_citation"]
    return resp.model, resp.output_text, urls


def ask_claude(prompt):
    content = []
    for _ in range(5):
        messages = [{"role": "user", "content": prompt}]
        if content:
            messages.append({"role": "assistant", "content": content})
        resp = claude_client.messages.create(
            model=MODELS["claude"], max_tokens=16000, messages=messages,
            tools=[{"type": "web_search_20260209", "name": "web_search",
                    "max_uses": 5, "user_location": LOCATION}])
        content += resp.content
        if resp.stop_reason != "pause_turn":
            break
    text, urls = "", []
    for block in content:
        if block.type == "text":
            text += block.text
            urls += [c.url for c in (block.citations or []) if getattr(c, "url", None)]
    return resp.model, text, urls


def ask_perplexity(prompt):
    req = Request("https://api.perplexity.ai/v1/agent",
                  data=json.dumps({"effort": "low", "input": prompt}).encode(),
                  headers={"Authorization": f"Bearer {os.environ['PERPLEXITY_API_KEY']}",
                           "Content-Type": "application/json"})
    data = json.load(urlopen(req, timeout=180))
    text, urls = "", []
    for item in data.get("output", []):
        if item.get("type") == "search_results":
            urls += [r.get("url", "") for r in item.get("results", [])]
        elif item.get("type") == "message":
            text += "".join(p.get("text", "") for p in item.get("content", []))
    return data.get("model", "auto"), text, urls


ENGINES = {"openai": ask_openai, "claude": ask_claude, "perplexity": ask_perplexity}
today = datetime.date.today().isoformat()
os.makedirs(OUT, exist_ok=True)
rows = []

with open(PANEL, encoding="utf-8") as f, \
        open(os.path.join(OUT, f"reponses-{today}.jsonl"), "w", encoding="utf-8") as archive:
    for line in csv.DictReader(f):
        rivals = [c.strip() for c in line["concurrents"].split("|") if c.strip()]
        for engine, ask in ENGINES.items():
            for attempt in range(1, TRIES + 1):
                try:
                    model, text, urls = ask(line["prompt"])
                except Exception as err:
                    print(f"ERROR {engine} {line['id']} attempt {attempt}: {err}", file=sys.stderr)
                    continue
                low = text.lower()
                row = {"date": today, "id": line["id"], "moteur": engine, "modele": model,
                       "essai": attempt, "mention": int(any(t in low for t in BRAND_TERMS)),
                       "citation": int(any(DOMAIN in u.lower() for u in urls)),
                       "concurrents": "|".join(c for c in rivals if c.lower() in low)}
                rows.append(row)
                archive.write(json.dumps({**row, "prompt": line["prompt"], "reponse": text,
                                          "sources": urls}, ensure_ascii=False) + "\n")
                time.sleep(2)

previous = sorted(glob.glob(os.path.join(OUT, "resume-*.csv")))
path = os.path.join(OUT, f"resume-{today}.csv")
with open(path, "w", newline="", encoding="utf-8") as f:
    writer = csv.DictWriter(f, fieldnames=list(rows[0]))
    writer.writeheader()
    writer.writerows(rows)


def rates(records):
    out = {}
    for r in records:
        key = (r["id"], r["moteur"])
        hits, total = out.get(key, (0, 0))
        out[key] = (hits + int(r["mention"]), total + 1)
    return {k: hits / total for k, (hits, total) in out.items()}


alerts, now = [], rates(rows)
if previous and previous[-1] != path:
    with open(previous[-1], encoding="utf-8") as f:
        before = rates(list(csv.DictReader(f)))
    for key, rate in now.items():
        old = before.get(key)
        if old is not None and old >= 0.5 and rate == 0:
            alerts.append(f"MENTION LOST {key[0]} on {key[1]}: {old:.0%} -> 0%")
        if old is not None and old == 0 and rate >= 0.5:
            alerts.append(f"MENTION GAINED {key[0]} on {key[1]}: 0% -> {rate:.0%}")

print(f"{len(rows)} answers archived. Summary: {path}")
print("\n".join(alerts))
sys.exit(1 if any(a.startswith("MENTION LOST") for a in alerts) else 0)

Arguments: the panel, the runs folder, the brand terms separated by | ("Planifia|planifia.example"), the domain to look for in the sources (planifia.example). API keys are read from the OPENAI_API_KEY, ANTHROPIC_API_KEY and PERPLEXITY_API_KEY environment variables.

Points to know before relying on the figures:

  • Models change. The identifiers in MODELS are those in the vendors' documentation in November 2026; check them before each new series and record any change in your log. The modele column records the model actually served. For Perplexity, the Agent API chooses the model according to the effort level: the column records it too.
  • Sources do not mean the same thing everywhere. For OpenAI and Claude, they are the URLs cited in the text; for Perplexity, the list of search results consulted. Compare each engine with itself, not the engines with each other.
  • Detection is naive. A text search counts “Planifia” even in “we do not recommend Planifia”. The summary is for spotting differences; detailed coding (recommendation, sentiment, accuracy) is done by rereading the archived answers.
  • API answers differ from consumer interfaces. Keep these runs in a separate series, with the surface “API”.
  • No fallback model. The script does not turn on any automatic switch to another model in case of refusal: the series must measure a single model per engine.

Schedule the runs

Versions cron on Linux and GitHub Actions, November 2026.

On a server, every Monday at 5 a.m. (crontab -e), with the keys defined in /srv/geo/.env:

0 5 * * 1 cd /srv/geo && set -a && . ./.env && set +a && python3 geo.py panel.csv releves "Planifia|planifia.example" planifia.example > /tmp/geo.log 2>&1 || mail -s "GEO: mention lost" [email protected] < /tmp/geo.log

Without a server, in a private GitHub repository, save the three keys in Settings > Secrets and variables > Actions, then create .github/workflows/geo-hebdo.yml:

name: Weekly GEO tests

on:
  schedule:
    - cron: "0 5 * * 1"
  workflow_dispatch:

permissions:
  contents: write

jobs:
  geo:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-python@v7
        with:
          python-version: "3.13"
      - run: pip install openai anthropic
      - name: Rerun the panel
        id: geo
        continue-on-error: true
        env:
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}
        run: python3 geo.py panel.csv releves "Planifia|planifia.example" planifia.example
      - name: Archive the runs
        run: |
          git config user.name "tests-geo"
          git config user.email "[email protected]"
          git add releves
          git commit -m "GEO run of $(date +%F)" || echo "Nothing to archive"
          git push
      - name: Report a lost mention
        if: steps.geo.outcome == 'failure'
        run: exit 1

The schedule is in UTC and the run can be delayed during periods of high load. The repository must stay private: the archived answers and the panel are strategic data.

Manual run fitted into a calendar

Versions consumer interfaces of ChatGPT, Gemini, Copilot, Claude and Google, November 2026.

Google AI Overviews, AI Mode and consumer interfaces cannot be queried through a testing API. For these surfaces:

  1. Create a recurring event in the calendar of the person in charge, with a link to the protocol and the list of prompts for the run in the description.
  2. Prepare a form (Google Forms, Microsoft Forms) where each submission creates a row: prompt identifier, engine, mode (signed in or not, search turned on), date, mention, citation, competitors, attached screenshot.
  3. Follow the conditions described in test Google AI Overviews and AI Mode if available (opens in a new tab) and the test guides for each engine.

Add the engines' own reports, when they exist: see use Google/Bing AI visibility reports when available (opens in a new tab).

Act on the results

Each run follows the same routine, in about 30 minutes for a panel of twenty prompts:

  1. Read the alerts from the script or the tool: mention lost or gained, new competitor.
  2. Open the archived answers for the prompts in alert and check by reading them: simple variation, or a real change of sources?
  3. Spot factual errors (prices, service area, features) and record them following log hallucinations and outdated information (opens in a new tab).
  4. Note the third-party sources that appear in the answers: these are the ones to enrich or correct (see identify cited URLs and third-party sources (opens in a new tab)).
  5. Update the series and draw conclusions only from several consistent runs, following compare results over time (opens in a new tab).

Warning: a single run showing a drop does not justify rewriting a page. Wait for at least a second consistent run, except for a serious factual error, which should be handled right away.

Common mistakes

  • Changing the prompts in the middle of a series: the curve then compares two different questions. Version the panel.
  • Mixing API runs, tool runs and manual runs in the same metric: each surface has its own series.
  • Keeping only the scores: without the raw answers, it is impossible to check an alert or prove an error.
  • Automating an assistant's consumer interface with a browser bot: contrary to the terms of use of most services, and fragile.
  • Forgetting model changes: a jump in the series often coincides with a new default model.
  • Publishing API keys in the repository instead of storing them in secrets.
  • Running only one attempt per prompt: the variability of the answers makes a single attempt unreliable.

Frequently asked questions

Can you automate brand tracking in ChatGPT?

Yes, in two permitted ways. An AI visibility tracking tool such as Peec AI or Otterly.AI reruns your prompts at regular intervals. A script can also query the OpenAI API with web search and archive the answers. In both cases, the answers differ from those of the consumer interface: keep these runs in a series separate from manual tests.

Are API answers the same as those of ChatGPT or Claude?

No. The APIs use models and settings chosen by the developer, without a user account's history, memory or personalization, and their search tool may differ from the interface's. API runs measure a trend that is comparable from one week to the next, not exactly what a customer sees. Complement them with a few manual runs in the interfaces.

How often should you rerun your GEO tests?

A weekly frequency suits high commercial value prompts, such as recommendations and comparisons, and a monthly frequency suits informational and brand prompts. Also rerun the relevant prompts after each published correction. More important than the frequency: keep the same panel, the same engines and the same number of attempts, so that the runs remain comparable.

How much does automated GEO tracking through APIs cost?

The cost depends on the number of requests: prompts × engines × attempts × runs per month. Twenty prompts, three engines, three attempts and four runs make 720 requests per month. Multiply by the price published by each provider, adding web search billing, which is often separate from tokens. Start small and check the first month's bill before expanding the panel.

Updated on

Topic checklist (PDF)

And now?

In the “Automation and quality control” topic

  1. Schedule automated crawls
  2. Monitor HTTP status codes and uptime
  3. Monitor robots.txt and noindex
  4. Monitor canonicals and sitemaps
  5. Monitor titles and structured data
  6. Monitor performance
  7. Monitor backlinks and brand mentions
  8. Monitor rankings
  9. Schedule recurring GEO tests
  10. Create alerts for traffic and conversion drops
  11. Create deindexing alerts
  12. Integrate SEO, performance and accessibility tests into CI/CD
  13. Review template changes
  14. Keep a history of changes
  15. Keep an incident log
  16. Generate periodic reports
  17. Assign an owner to each issue