Article · 7 minutes
AI for Programmatic SEO: Context Before Content at Scale
A practical context-engineering system for combining SEO data, project knowledge, small models, agents, and repeatable workflows.

Prompt engineering has become a baseline skill. Most specialists already know to define a persona, task, context, and format. The bigger opportunity now is context engineering: building a working environment in which the model receives the right live data, durable project knowledge, examples, constraints, and output structure. At programmatic scale, the quality of that environment matters more than one elegant prompt.
This article is based on my GuruConf lecture “AI for Programmatic SEO: From Data to Content at Scale”. The source talk and deck are in Ukrainian; the slides below were localized into English.

Prompting Is the Interface; Context Is the System
Persona, task, context, and format remain a useful prompt checklist. Zero-shot, one-shot, and few-shot examples help specify the expected result. But repeatedly pasting the same background into a chat is not a system. The system should know where the current schema, rules, examples, and measurements live.


Context engineering means creating the conditions in which even a simple prompt produces a predictable result. The model should receive enough relevant information without drowning in unrelated history.


Build Two Warehouses
The first is a data warehouse. Combine Search Console exports, SERP data, server logs, internal data, crawls, competitors, trends, and business metrics. Use the technology that fits the volume and team: BigQuery, ClickHouse, PostgreSQL, DuckDB, or even SQLite for a bounded local task.


Data warehousing is a process, not a place. The important properties are documented schemas, types, relationships, refresh rules, and repeatable queries. A small local DuckDB database can be more useful than an enterprise platform nobody understands.

When asking an LLM for SQL, provide the database dialect, tables, fields, formats, joins, calculation rules, and desired output. Store successful queries as artifacts. Over time, the assistant stops being a one-off query generator and becomes an interface to a documented analytical system.

The second system is a knowledge warehouse. Markdown files work well because humans, version control, and models can all read them. Store project rules, decision history, personas, intent models, templates, known incidents, tested prompts, and good examples.

Use History to Diagnose and Standardize
Suppose traffic falls. Give the assistant a bounded history of releases, incidents, known failure modes, and previous investigations. Ask it to generate candidate checks, then connect those checks to current data. The value comes from task history and project context, not from the model guessing generic SEO causes.

When an investigation works, convert it into a checklist. The next analysis should begin with a proven sequence rather than a blank chat. Checklists also expose which steps are deterministic and can be scripted.

Do not build a complicated retrieval system merely because RAG is fashionable. If the corpus is small and well structured, direct file access or a selected context bundle may be simpler and more reliable. Add embeddings and retrieval only when the scale and query pattern justify them.

Update Content from Evidence, Not a Generic Rewrite
A useful content-refresh flow begins with the SERP and competitor pages. Extract their topics, terms, entities, and user questions. Compare that structure with the current article. Identify missing concepts, then create targeted tasks for the gaps. This is different from asking a model to “make the article better.”

Automation tools such as n8n can orchestrate the collection, parsing, model calls, review queues, and publication handoff. Keep human approval where errors have brand, legal, factual, or large-scale SEO impact.

Add Personas and Intents to the Knowledge Layer
Search intent labels-informational, transactional, navigational - are useful but too broad on their own. Combine them with personas, market constraints, conversion goals, and real product data. The same query can require different page elements for a first-time visitor, an experienced buyer, or a search bot trying to understand the structure.

Use Large Models for Judgment and Small Models for Volume
Frontier models are valuable for ambiguous analysis, synthesis, and planning. They are often wasteful for repetitive extraction, classification, translation, or rewriting into a fixed schema. A 12-billion-parameter local model may handle a bounded operation that does not need a model hundreds of billions of parameters in size.

LM Studio makes local evaluation accessible. Test a small model on representative cases, define acceptance criteria, measure failures, and calculate the real operating cost. Local processing can improve privacy and unit economics, but it adds hardware and maintenance.

Bring AI into Existing SEO Tools
Screaming Frog can send selected page content to an AI system and add the result to the crawl. That supports classifications, summaries, content checks, or intent labels across a sample. The model output should be treated as another column to validate, not ground truth.

Agentic browsers can inspect a page, interact with it, collect visible elements, and produce a structured result. They help with research and prototypes, but dynamic behavior, authentication, and non-determinism require careful review.

For page comparison, provide saved HTML or screenshots from the current page and competitors. Ask for structural differences tied to user intent, then verify each claim. The output can become a backlog of testable changes.

Prototype Before You Ask for a Full Build
HTML and CSS are readable, editable formats. An AI assistant can produce a static prototype of a new content block or page variation, which the team can test and discuss. The prototype makes the requirement concrete; engineering still decides how it belongs in production.

AI is also a learning interface. Ask it to explain why a query is slow, how a static-site generator works, or what a code block changes. The key is the question: narrow it, supply the artifact, and test the explanation.

Static-site generators can produce lightweight page networks or prototypes from Markdown and templates. The same technique can support legitimate landing-page systems, documentation, experiments, or - when abused - low-quality networks. Technology does not remove the need for a sound product and responsible use.

AI-native editors such as Windsurf place the assistant next to the repository and runtime. That shortens the loop from question to code change to verification. Keep changes small, inspect diffs, and preserve tests and project rules in the same workspace.

The core rule is simple: context before content. Build the data warehouse that describes what is happening, the knowledge warehouse that explains how the project works, and the evaluation process that checks every output. Once those layers exist, AI can help programmatic SEO scale without turning the site into an uncontrolled page factory.



