Most responses to AI-driven search disruption follow the same playbook: publish more, build authority, optimize for featured snippets. These strategies miss the point. AI platforms don't rank; they synthesize, select, and cite based on information gain standards that keyword-based optimization was never designed to meet. Generative Engine Optimization with Python by Andreas Voniatis treats this as a data science problem, not a content strategy one. Using Python-based methods, you'll reverse-engineer how ChatGPT, Gemini, Perplexity, and Claude select and cite sources, identify which communities and platforms AI systems treat as authoritative, and build monitoring infrastructure that makes citation probability measurable and improvable. The outcome is marketing visibility. The method is rigorous science.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A data-science playbook for marketers and analysts who want to measure—and improve—how often AI assistants like ChatGPT, Gemini, Perplexity, and Claude mention and cite their brand. It replaces "publish more" instincts with Python pipelines, sampling, and dashboards.
【Book Arc】
- **Opening (~0%–5%)**: Frames the shift from SEO to GEO—AI engines synthesize and cite rather than rank—and previews a seven-chapter structure from topic research through measurement and future-proofing.
- **Early (~5%–16%)**: Establishes why a single visibility score is misleading and introduces the four metrics to track: mentions, citations, position, and sentiment.
- **Early (~16%–32%)**: Sets up the measurement pipeline's inputs—API keys, brand/domain alias maps, target and competitive prompts, sample counts, and rate-limit pacing.
- **Middle (~32%–53%)**: Builds the extraction layer: URL/domain parsing, mention detection, position scoring, format classification, and a HuggingFace sentiment classifier scoped to brand-mention sentences.
- **Middle (~53%–63%)**: Writes platform-specific adapters (OpenAI, Gemini, Claude, Perplexity) with retry/backoff and bounded conversation history, normalizing each API's citation output into a common record.
- **Late (beyond ~63%)**: Excerpts do not cover the aggregation, visualization, and dashboard-export stages, nor the other six chapters listed in the table of contents.
【Book Arc】 (note: the excerpt set is heavily concentrated in one chapter; the arc above reflects what is actually present)
【Key Takeaways】
- **AI search is a citation problem, not a ranking problem** (Opening): Engines select and synthesize sources by information-gain standards, so keyword tactics miss the target; success means being mentioned and cited inside generated answers.
- **Track four metrics, not one score** (Early): Mentions, citations, position within recommendation lists, and sentiment each reveal different failure modes—being listed among "companies to avoid" is a vivid example of why sentiment matters.
- **Generative output is stochastic, so sample repeatedly** (Early): Because identical prompts yield different answers, the pipeline issues multiple requests per prompt (10 by default, up to 100 if fast) to estimate rates rather than trusting a single response.
- **Brand aliases are the linchpin of detection** (Early–Middle): Models rarely print domain names, so a domain-to-alias map plus word-boundary regex drives mention detection and position scoring; getting aliases right determines data quality.
- **Use a trained sentiment model, not word lists** (Middle): A lightweight DistilBERT SST-2 classifier handles negation, irony, and domain phrasing that hard-coded positive/negative banks would miss, and runs only on brand-mention sentences to control cost.
- **Normalize heterogeneous APIs behind adapters** (Middle): Each platform exposes citations differently (inline URLs, grounding metadata, search-result blocks), so per-platform query functions return a shared record shape with retries and history trimming.
- **Bound cost and rate limits deliberately** (Middle): Sleep intervals per platform, exponential backoff on 429 errors, and a six-turn history cap keep an 880-call run feasible and reproducible.
- **Measurement lets you falsify best practices** (Early): A repeatable framework shows whether GEO activities actually move metrics—and tests the stream of online advice rather than accepting it.
【Reading Tips】
- **Deep-read the pipeline chapter**: The code walkthrough is the book's practical core; type out the helper functions rather than skimming, since alias mapping and position scoring are easy to get subtly wrong.
- **Skim the setup boilerplate**: API key configuration and import blocks are mechanical; focus attention on parameter choices (sample size, sleep seconds, history cap) and why they exist.
- **Treat the prompt lists as a template**: The construction/NetSuite example shows how to segment research-stage questions from commercial queries—adapt the structure to your own domain.
- **Plan for cost before running**: Paid API subscriptions and hundreds of calls per run are prerequisites; prototype with fewer prompts and samples first.
【Coverage Limits】
The available excerpts cover only the measurement chapter (Chapter 6 in the final numbering), and even there the aggregation, visualization, and dashboard stages are largely absent. Chapters 1–5 and 7 are listed in the table of contents but marked unavailable, so this guide cannot describe their content.
Excerpt 1
al sales department: 800-998-9938 or corporate@oreilly.com . Acquisitions Editor: Aaron Black Development Editor: Sara Hunter Production Editor: Christopher...
to have an API key which is usually paid under subscription. From the platforms, you’ll extract search responses for mentioned, citations, position, and sent...
ly asked by the target audience during their research phase. TARGET_QUESTIONS = [ # Fragmented data pain points "why is my construction business data spread...
on the brand mention context rather than the entire answer. sentiment_classifier = hf_pipeline( "sentiment-analysis", model="distilbert-base-uncased-finetune...
ted.append({"url": chunk.web.uri or "", "domain": chunk.web.title}) domains = list({c["domain"] for c in cited if c["domain"]}) urls = list({c["url"] for c i...
e API calls. print_progress() print(f"\nCollection complete.") print(f" Response records : {len(response_rows):,}") print(f" Citation records : {len(citation...
pertise in how AI systems process and recommend information. He is the author of “Data Driven SEO with Python” (Springer, 2022), Data Science For SEO (O’Reil...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Generative Engine Optimization with Python (Andreas Voniatis)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
Generative Engine Optimization with Python (Andreas Voniatis)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Generative Engine Optimization with Python (Andreas Voniatis)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment