A custom JavaScript-based analyzer for Screaming Frog that evaluates webpages for Large Language Model Optimization (LLMO) using the Gemini 1.5 Flash API. The script is using a Batched Pairwise approach.
Inspired by recent research:
- Batched Self-Consistency Improves LLM Relevance Assessment and Ranking
- C‑SEO Bench: Does Conversational SEO Work?
This script performs a passage-level, structured audit of your pages using LLM analysis principles and Screaming Frog’s Custom JavaScript Engine.
It extracts content like:
<title>, meta descriptions- H1–H2 headers and surrounding text
- Primary paragraphs and list items
- JSON-LD structured data (schema.org)
- FAQ patterns and semantic blocks
Then, it generates a comprehensive prompt for Gemini to:
- Identify target queries
- Score the content per query (0–5)
- Highlight strongest passages
- Reveal content gaps
- Suggest LLM optimization actions
✅ JS Rendering must be enabled in Screaming Frog!
- Open Screaming Frog
- Go to
Configuration → Custom → Custom JavaScript - Paste the full
llmo-analyzer.jsscript - Enable JavaScript Rendering under
Configuration → Spider → Rendering - Run your crawl
- View
Custom Javascriptoutput tab for Gemini-powered LLMO insights
OVERALL LLMO SCORE: 4.2/5 TOP 3 POTENTIAL: yes RANKING POTENTIAL: high
TARGET QUERIES & SCORES:
- "wireless gaming keyboard" - Score: 4.5/5 (strong)
- "gaming keyboard mouse combo" - Score: 4.2/5 (strong)
CONTENT GAPS:
- No pricing details
- Missing comparison to competitors
RECOMMENDATIONS:
- Add structured FAQ section
- Include product comparison table
- Simulates Batched Pointwise (PW) evaluation from research — passing up to 100 key passages in one structured Gemini prompt.
- Weighted scoring reflects traditional SEO prioritization (e.g.,
<title>><h1>><p>). - Results reflect Gemini’s understanding of how LLMs rank pages semantically.
- Gemini API does not support native multi-document scoring (simulated via prompt structure)
- No true self-consistency (one-shot only)
- Limited to 4096 tokens per page
- Domain-specific variance (best for structured pages like ecommerce/docs)
- Model-specific scores (Gemini 1.5 Flash)
This script is modeled after "mentioned" benchmarks:
- +7.5% NDCG@10 gain from batched vs. pointwise LLM scoring (GPT-4o) // Legal batch
- 2.77x boost in visibility when placed 1st in LLM context window (C‑SEO Bench) // Retail domains!
MIT — use freely with attribution if publishing derivative work.
Open an issue or contact me to implement this across large sites or integrate it with live LLM APIs.
---