White Hat Search Engine Optimization using Large Language Models

Niv Bardas, Tommy Mordo, Oren Kurland, Moshe Tennenholtz, Gal ZurarXiv 2025 · DOI

Abstract

Search Engine Optimization (SEO) is critical for document visibility but often involves a trade-off between ranking performance and content quality. This paper introduces a "white hat" SEO approach using Large Language Models (LLMs) to optimize documents for "black-box" ranking functions. By leveraging historical ranking data through comparative prompting, LLM-based "bots" can significantly improve search rankings while maintaining high human-judged quality and relevance, frequently outperforming both traditional feature-based methods and human experts.

Introduction

In the digital landscape, the position of a document in search results determines its reach. SEO strategies are generally categorized into "black hat"—deceptive techniques like keyword stuffing that degrade user experience—and "white hat"—legitimate content improvements. However, modern ranking algorithms are proprietary black boxes, making effective white-hat SEO difficult without manual feature engineering. This research explores whether LLMs can serve as sophisticated editors that infer the preferences of these hidden rankers by observing past performance, thereby automating high-quality SEO.

Methodology

The researchers employed GPT-4o to modify documents based on a two-tiered prompting strategy. Every prompt included a Shared Directive to optimize for a top rank while maintaining a 150-word limit and factual faithfulness. To help the model understand the hidden ranking function, the authors introduced Context-Specific Hints:

  • Pointwise: Providing the top-ranked document from a previous iteration.
  • Pairwise: Presenting pairs of documents with their relative rankings.
  • Listwise: Offering a full ordered list of documents from prior rounds.
  • Temporal: Showing the ranking trajectory of a single document over successive edits.

These LLM-driven "bots" were evaluated against SentReplace, a state-of-the-art feature-based baseline, and human students in a competitive setting.

Experimental Setup

The study utilized three distinct evaluation frameworks:

  1. LambdaMARTComp: Based on the LambdaMART learning-to-rank algorithm using TREC web tracks.
  2. E5Comp: Focused on "dense retrieval" systems using E5 embeddings, which prioritize semantic meaning over simple keyword matching.
  3. Online Competition: A real-time event where LLM bots competed against human participants, with outputs evaluated by crowdsourced human judges for quality and relevance.

Results and Discussion

The experimental results demonstrate that LLMs are highly effective at "probing" black-box rankers. The Pairwise and Listwise prompting methods proved most successful, suggesting that the model benefits more from seeing the contrast between documents than from seeing a single "winner."

Performance comparison on the LambdaMARTComp dataset, showing LLM bots outperforming the SentReplace baseline and human students in rank promotion.

As shown in Figure 1, the LLM bots achieved superior Scaled Promotion compared to the SentReplace baseline and human students in the LambdaMARTComp dataset. Notably, human students often struggled to improve rankings, sometimes resulting in negative promotion.

In the Online Competition, the LLM bots not only improved rankings but also produced content that humans preferred.

Results from the Online Competition, highlighting that the Listwise LLM bot achieved higher human-judged quality (Q) and relevance (R) scores than human participants.

According to Figure 2, the Listwise bot outperformed human students across all key metrics in the live competition. It achieved a quality score of 0.911 (vs. 0.732 for humans) and a relevance score of 0.8 (vs. 0.66 for humans). This effectively breaks the traditional trade-off where SEO improvements typically come at the cost of readability or factual accuracy.

Conclusion

This research highlights the potential of LLMs as powerful tools for white-hat SEO. By analyzing relative ranking data, these models can reverse-engineer the preferences of complex search algorithms and generate optimized content that remains faithful and high-quality. While challenges remain regarding the computational cost and the evolving nature of real-world search engines, this approach marks a significant step toward automated, quality-preserving search optimization.

Summary updated

BibTeX
@misc{bardas2025white,
  author = {Niv Bardas and Tommy Mordo and Oren Kurland and Moshe Tennenholtz and Gal Zur},
  title = {{White Hat Search Engine Optimization using Large Language Models}},
  year = {2025},
  eprint = {2502.07315},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.07315},
}
Figure