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.

Title slide of the presentation about AI for Programmatic SEO, from data to content at scale.

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.

Earlier talks on programmatic SEO, AI tools, and product-led SEO analytics.
The context-engineering approach combines lessons from programmatic systems, tool choice, and analytics.

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.

Prompting guide with persona, task, context, and format.
A clear prompt is still necessary, but it is only one layer of a reliable workflow.

Modern interfaces that generate code, research, or plans from short prompts.
Prompt generation is becoming a commodity feature across AI products.

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.

The distinction between prompt engineering and context engineering.
The goal is not a perfect sentence but a working environment that reliably supplies the right information.

A context window illustrated as the amount of input and output a model can process.
Context is finite, so selection and structure matter as much as total volume.

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.

A data warehouse combining search, log, crawl, internal, competitor, and business sources.
Programmatic SEO needs a shared analytical layer rather than disconnected exports.

Examples of warehouse technologies: ClickHouse, BigQuery, and PostgreSQL.
The correct tool depends on volume, collaboration, latency, and maintenance-not fashion.

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.

Warehouse tools around the statement that warehousing is a process, not a place.
Governed ingestion and reusable analysis define the warehouse more than the product name.

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.

A schema-aware SQL request with fields, formats, joins, and an expected result.
Explicit database context reduces invented columns and makes generated queries reviewable.

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.

A knowledge warehouse combining Markdown, live data, personas, examples, and templates.
Durable project knowledge complements live metrics: one explains how the system works, the other describes its current state.

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.

A knowledge-warehouse example for analyzing a traffic drop.
Past tasks and their outcomes become diagnostic context for the next incident.

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.

Creating reusable checklists from accumulated knowledge.
A checklist turns an expert’s successful path into a repeatable team artifact.

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.

A basic RAG pipeline marked as unnecessary for some cases.
Architecture should follow the information problem; a small knowledge base may not need a retrieval layer.

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.”

A four-step content update process: structure, topical analysis, gap analysis, and actionable tasks.
The workflow converts competitive evidence into bounded editorial changes instead of a full blind rewrite.

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.

An n8n workflow with fewer manual steps.
The goal of orchestration is to reduce repetitive transfer while preserving control points.

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.

Personas and intents connected to SEO and conversion optimization.
A useful page model links the search job to the person, product decision, and conversion path.

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.

A comparison between very large and 12B models.
Model size should match the task’s ambiguity, knowledge requirement, output constraints, and volume.

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.

LM Studio running a local model.
Local model runners are useful for controlled experiments before a workflow is deployed at scale.

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.

Screaming Frog AI adding model output to crawl data.
The crawler supplies page context and scale; the model adds a bounded analytical transformation.

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.

An agentic browser working with a live page.
Browser agents combine observation and action, which makes them powerful but harder to reproduce than a static parser.

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.

AI-assisted comparison of multiple pages.
Comparison is strongest when it uses the same evidence and evaluation dimensions for every page.

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.

A flow from website HTML and CSS through AI to a browser prototype.
A working visual prototype reduces ambiguity in a product or SEO request.

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.

A learning coach interface.
Learning becomes faster when the assistant can see the exact code, data, or page under discussion.

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.

A static-site generation flow from Markdown and templates to a website.
Structured content plus templates is a transparent and scalable publishing architecture.

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.

Windsurf as an AI-assisted development environment.
Repository-aware assistance is most reliable when project instructions, source files, and verification steps are available together.

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.