A production LLM pipeline for SEO game-wiki articles
An automated content pipeline for OnlyFarms.gg: it reads gaming terms from a CSV, generates a validated SEO article for each with two sequential GPT-4o calls, and publishes straight to the admin API.
- Stack
- Python · GPT-4o · FastAPI · GCS · LangChain
- Replaces
- 20–40 min of writer time per term
- Output
- validated HTML + SEO metadata, auto-published
Hand-writing wiki SEO content doesn't scale
A game wiki lives on breadth: hundreds of terms, each needing its own article. And each article is more than prose — it needs a structured HTML body, correct internal links to existing wiki pages, a slug, a meta description, and a call-to-action, all consistent with platform conventions.
A writer doing this by hand spends 20–40 minutes per term. That is fine for a handful of pages and impossible for a catalog that keeps growing. The work is repetitive and rule-bound, which is exactly the kind of work that passes the tests for automating a process — provided the output is trustworthy enough to publish without a human reading every line.
From a CSV of terms to published articles
The pipeline reads gaming terms from a CSV — either from a GCP Cloud Storage bucket for automated daily runs, or a local file for manual batches. Each term carries its own context: game name, category ID, related service URLs for choosing the CTA, and an optional steering prompt.
For each term, two sequential GPT-4o calls run. The first generates the full HTML body. The second generates the SEO metadata — h1, slug, long title, meta description, and the CTA text and URL. Between the two, a link-validation step runs, so only checked HTML reaches the metadata call and the final publish.

The model invents links — so we don't let it
The signature failure mode of a language model writing wiki content is that it invents internal links: plausible-looking URLs to pages that don't exist. Left unchecked, that fills a wiki with dead links and quietly erodes both SEO and reader trust.
We handle it in two places. Before the body call, a parser fetches the live onlyfarms.gg/sitemap.xml and injects matching wiki URLs into the prompt, so the model links to pages that actually exist instead of guessing. Then the output is checked: every <a> tag gets a live HTTP GET, and any link that returns a 404 or points outside the known sitemap is unwrapped — the anchor text stays, the broken link is removed. Only validated HTML moves on.
Structured output that publishes itself
The metadata call runs with response_format=json_object, so the model's output is always parseable JSON — there is no regex extraction from freeform text, and no brittle parsing step to fail silently in production.
The full payload — the seo object, the validated content, categories, CTA, and image — is POSTed to the OnlyFarms admin API with Bearer-token auth. That is what "production LLM pipeline" means here: not a prompt someone runs by hand, but grounded generation, live link checking, and structured, machine-parseable output, wired end to end so an article can go from a row in a CSV to a published page without a person in the loop.
See what this would look like in your operations.
30 minutes · we map your 3 best automation opportunities · no obligation