Skip to content
citedomPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Citedom

Research-backed Generative Engine Optimization (GEO / AEO / C-SEO) analyzer. Evaluates any website's visibility in AI-powered search engines like ChatGPT, Perplexity, Google AI Overviews, and Bing Copilot, then generates a prioritized report with actionable, research-cited recommendations.

Quick start

# Install
cd citedom
uv sync

# Quick single-page analysis
uv run citedom quick https://steel.dev

# Full site analysis (all discovered pages, parallel scraping)
uv run citedom analyze https://steel.dev

# Cap to 10 pages, save report
uv run citedom analyze https://steel.dev --pages 10 -o report.md

Requirements

  • Python 3.12+
  • Astral uv
  • OPENAI_API_KEY environment variable (uses gpt-5.4-mini for analysis, gpt-5.4 for report)
  • STEEL_API_KEY environment variable + Steel CLI installed
  • lxml (installed automatically via uv sync)

What it does

URL → Steel scrape → GEO-16 evaluation → LLM analysis → Research-backed report
         (parallel)    (16 pillars + domain     (uniqueness +      (gpt-5.4 reasoning)
                        classification)        site detection)
  1. Discovers all pages via sitemap.xml (with sitemap index support) or homepage link crawling
  2. Scrapes pages in parallel (5 concurrent) using Steel CLI with proxy support
  3. Evaluates each page against the GEO-16 quality framework (16 pillar scores with LLM-enhanced metrics)
  4. Classifies external domains using LLM with JSON caching for smart citation authority scoring
  5. Detects site type (blog, SaaS, agency, ecommerce) for context-aware recommendations
  6. Generates a prioritized report with an executive summary written by gpt-5.4 using the Responses API
  7. Persists everything to a timestamped runs/ directory (raw HTML, markdown, metadata JSON, per-page analysis, final report)

Commands

analyze — full site analysis

uv run citedom analyze <url> [options]
Option Default Description
--pages, -p 0 (all) Max pages to analyze. 0 = all discovered pages
--output, -o — Additional path to save the markdown report
--stealth/--no-stealth --stealth Use Steel residential proxy for scraping
--model, -m gpt-5.4-mini OpenAI model for fast analysis tasks
--verbose, -v off Enable debug logging
--config — Path to custom config.yaml file

quick — single-page analysis

uv run citedom quick <url> [options]

Same options as analyze minus --pages. Scrapes only the given URL with no sitemap discovery.

Custom configuration

All tunable parameters (model names, scoring weights, thresholds, timeouts, concurrency) live in config.yaml at the project root. To override any value without editing the source:

# Copy the bundled config
cp config.yaml my-config.yaml

# Edit as needed (e.g. change model, adjust weights)
# Then pass it to either command
uv run citedom quick https://steel.dev --config my-config.yaml

Only the values you include in your custom YAML are overridden — everything else uses defaults.

Output

Every run creates a timestamped directory:

runs/
  steel.dev_2026-03-18_141500/
    scrapes/
      steel.dev_index.html              # Raw HTML
      steel.dev_index.md                # Extracted markdown
      steel.dev_index_metadata.json     # Title, headings, structured data, links
      steel.dev_docs.html
      steel.dev_docs.md
      steel.dev_docs_metadata.json
    analyses/
      steel.dev_index_analysis.json     # Per-page GEO-16 scores
      steel.dev_docs_analysis.json
    report.json                         # Full structured report
    report.md                           # Rendered markdown report

The --output flag saves an additional copy of report.md to a path of your choice.

GEO-16 quality pillars

The analyzer evaluates each page against 16 signals that predict whether AI search engines will cite it. Based on the empirical GEO-16 framework from Kumar & Palkhouski (2025).

Pillar Type What it measures
Metadata freshness Boolean Meta description, OG tags, last-modified signals
Semantic HTML Boolean Use of <article>, <section>, <nav>, <header>, <footer>, <main>
Structured data Boolean JSON-LD / Schema.org markup
Content depth Float Ratio of substantive text to total HTML
Citation density Float Weighted outbound links (LLM-classified domain authority)
Statistical evidence Float Numbers, percentages, and statistical language
Expertise signals Float Author attribution, credentials, bylines
Readability Float Sentence/word length heuristic (Flesch-Kincaid proxy)
Topical authority Float Content length + heading variety
Content freshness Float Recency of dates mentioned in content
Multimedia integration Float Images with alt text, videos, embeds
Internal linking Float Internal link ratio and count
Mobile friendliness Float Viewport meta tag and responsive signals
Page speed signals Float Inline CSS/JS bloat, lazy loading
Trustworthiness Float HTTPS, privacy policy, contact links
Uniqueness Float Content originality (LLM-evaluated)

Target: overall score >= 0.70 with >= 12 pillars passing (> 0.5 threshold).

Key GEO findings

Research shows these optimizations have the highest impact:

Optimization Visibility improvement
Add authoritative citations 30-40%
Include statistical evidence 30-40%
Add expert quotations 30-40%
Improve content fluency 15-30%
Differentiate with unique insights 10-20%

Important: Traditional SEO keyword stuffing does NOT work for generative engines. LLMs evaluate content quality, not keyword density.

Smart domain classification

Citation authority scoring uses LLM-based domain classification instead of hardcoded lists:

domain_cache/
  classifications.json      # Cached domain categories (committed to git)

How it works:

  1. Common domains (github.com, wikipedia.org, etc.) use fast heuristics
  2. Unknown domains are classified by LLM into categories: academic (1.0), news (0.8), industry (0.6), blog (0.4), social (0.1), etc.
  3. Results are cached in JSON for future runs

This means the system gets smarter over time and adapts to new domains without config changes.

Context-aware recommendations

The analyzer detects site type and provides tailored recommendations:

Site type Example recommendations
Blog Cite research papers, add author bylines, include sources sections
SaaS Add case studies with metrics, include customer testimonials, create comparison pages
Agency Showcase portfolio with results, add client logos, create industry landing pages
Ecommerce Add product specs with tables, include review breakdowns, create buying guides

Architecture

citedom/
├── config.yaml                    # All tunable parameters
├── domain_cache/
│   └── classifications.json        # LLM-classified domains (committed)
├── examples/                       # Example generated reports
├── runs/                           # Per-run analysis outputs (new runs ignored locally)
└── src/citedom/
    ├── cli.py                      # Typer CLI with analyze/quick commands
    ├── scraper.py                  # Steel CLI integration + BeautifulSoup parsing
    ├── metrics.py                  # GEO-16 heuristic evaluation (16 pillar scorers)
    ├── analyzer.py                 # Core engine: heuristics + LLM uniqueness + SWOT
    ├── domain_classifier.py        # LLM domain classification with JSON caching
    ├── llm.py                      # OpenAI client (Chat Completions + Responses API)
    ├── report.py                   # Report generation (terminal + markdown)
    ├── run_context.py              # Per-run persistence (timestamped runs/ dirs)
    ├── config.py                   # Pydantic config loader with singleton caching
    └── prompts/                    # All LLM prompts as Jinja2 templates
        ├── __init__.py             # load_prompt() template loader
        ├── uniqueness_*.j2         # Content originality evaluation
        ├── swot_*.j2               # Strengths/weaknesses/opportunities
        ├── queries_*.j2            # Query suggestion
        ├── competitor_*.j2         # Competitor analysis
        ├── executive_*.j2          # Executive summary (gpt-5.4 reasoning)
        └── README.md               # Template documentation

Model usage

Task Model API
Uniqueness, SWOT, scoring gpt-5.4-mini Responses API (low reasoning)
Domain classification gpt-5.4-mini Responses API (low reasoning)
Executive summary gpt-5.4 Responses API (high reasoning)

The Responses API with reasoning effort produces more thorough, research-grounded analysis. All scoring uses deterministic reasoning settings for consistent results.

Testing

uv run pytest tests/ -v

116 tests covering configuration loading, metrics evaluation, domain classification, scraper parsing, report formatting, run context persistence, and prompt template loading. All tests use real sample data — no mocks.

References

This tool encodes findings from 7 Generative Engine Optimization research papers (a mix of peer-reviewed publications and preprints). Full paper summaries are available in the papers/ directory.

[1] GEO: Generative Engine Optimization

Aggarwal, P., Murahari, V., Rajpurohit, T., et al. (2023) arXiv:2311.09735 The foundational GEO paper. Introduces a black-box optimization framework for improving content visibility in generative search engines. Establishes that citations, statistics, and quotations improve source-level visibility by 30-40%, while fluency optimization provides 15-30% improvement. Critically demonstrates that traditional SEO keyword stuffing does not work for generative engines.

[2] AI Answer Engine Citation Behavior: The GEO-16 Framework

Kumar, A., Palkhouski, L. (2025) arXiv:2509.10762 — summary Empirically validates citation patterns across three AI answer engines. Introduces the GEO-16 auditing framework with 16 quality pillars (metadata freshness, semantic HTML, structured data, content depth, etc.) that predict whether a page will be cited. Establishes the target: GEO-16 score >= 0.70 with >= 12 passing pillars.

[3] C-SEO Bench: Does Conversational SEO Work?

Puerto, H., Gubri, M., Green, T., et al. (2025) arXiv:2506.11097 — summary Extends GEO to multi-actor competitive scenarios. Evaluates C-SEO methods across multiple domains and tasks in conversational search. Demonstrates that competitive dynamics change optimization strategy — what works for one site may not work when competitors also optimize.

[4] AutoGEO: What Generative Search Engines Like

Wu, Y., Zhong, S., Kim, Y., et al. (2025) arXiv:2510.11438 — summary Introduces the AutoGEO framework that automatically learns and extracts generative engine preferences by prompting frontier LLMs. Shows that content uniqueness and differentiation are key signals that automated systems can optimize for.

[5] Caption Injection for Optimization in Generative Search Engine

Chen, X., Liao, Y. (2025) arXiv:2511.04080 — summary First multimodal GEO method. Addresses the gap where existing approaches are text-only but generative search engines now integrate text, images, audio, and video. Demonstrates that image captions significantly boost AI visibility.

[6] When Attention Becomes Exposure in Generative Search

Alipour, S., Kargar, M., Zihayat, M. (2026) arXiv:2601.01750 — summary Audits real-world exposure bias in generative search engines within Web3 creator ecosystems. Examines how incentive-driven communities and external attention markets affect citation visibility, revealing structural biases in how AI engines allocate exposure.

[7] CORE: Controlling Output Rankings in Generative Engines

Jin, H., Chen, R., Zhang, P., et al. (2026) arXiv:2602.03608 — summary Advances GEO methodology for product search by introducing the CORE optimization framework. Addresses initial retrieval order bias that disadvantages small businesses and provides strategies to counteract ranking manipulation in LLM-based search.

License

See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages