FlyRank ML Internship — Capstone Research Page

Which pages have the greatest opportunity to improve their click-through rate?

Abstract. FlyRank researches, writes, and publishes content into client websites at scale, then watches search performance and optimizes — but published pages quietly decay, and today's product decides what to fix first with hand-tuned rule flags (a health_score, quick-win tags). This project asks the question those rules can't answer on their own: across a 32-client, 30,000-page content portfolio, which pages have the greatest opportunity to improve click-through rate, and can a learned model out-rank the existing rule at picking which ones a human should review first? A client-grouped, leakage-checked random forest was trained on 90-day traffic and search-console signals and compared against a transparent CTR-gap-by-position-tier rule — the same kind of rule the product uses today — on the same held-out split. On unseen clients, the model reaches precision@50 of 0.82 against a 0.51 base rate and a 0.82 baseline-rule precision@50 — matching the simple rule at that depth while beating it at K=20 (0.95 vs 0.85) and K=100 (0.85 vs 0.75), and a naive (non-grouped) split is shown to overstate performance by 10–24 points at the same K, which is why the grouped split is used throughout. The output is packaged as a ranked, reason-coded action queue with six page archetypes and an explicit no-go list — a decision-support triage aid for a human reviewer, not an autonomous publishing system.

01Introduction

The decision this supports

FlyRank runs content as infrastructure: it researches, writes, and publishes pages into a client's site, then keeps watching search data after publication. That's where the hard part starts. A page that ranked well on day one can quietly decay — rankings slip, clicks drop — and across a portfolio of thousands of pages spanning dozens of clients, nobody can manually review every one every week. Some pages are already ranking well in search but converting almost none of their impressions into clicks — a title, snippet, or intent mismatch is quietly leaving traffic on the table. Others are simply stale, buried, or genuinely low-demand. Reviewing all of them costs time the team doesn't have; reviewing the wrong ones costs opportunity the team can't get back.

Today that triage runs on hand-tuned rule flags — a health_score, quick-win tags, needs-attention thresholds someone chose by hand. They work, and they run in production, but rules run out where signals get many, tangled, and shifting. This project asks the narrow, answerable version of that gap: given a page's traffic and search signals, can a learned model rank pages by how likely they are to be declining, well enough that a human reviewer working from the top of the list finds real problems far more often than chance — and does it beat the rule already in production? The output is not a verdict on any single page — it is a shortlist, with a plain-language reason attached to each entry, meant to make a Monday-morning review meeting more productive.

Cost of getting it wrong: a false positive near the top of the queue wastes an editor's review time on a page that didn't need it. A false negative means a genuinely declining page never gets looked at. Both costs are real but recoverable — which is exactly why this is framed as decision-support, not automation (see Limitations).

02Data

One portfolio, one 90-day window, fully pseudonymous

The analysis uses the FlyRank ML Internship starter release: content_refresh_anonymized.csv, a single trailing-90-day snapshot combining Google Search Console-style metrics (impressions, clicks, CTR, average position) with on-site analytics (sessions, engagement rate, scroll behavior) and content metadata (word count, content type, age, last-update date) for every page in the portfolio.

30,000
pages (rows)
32
pseudonymous clients
90 days
trailing window, one export date
45
columns in the raw release

What was excluded, and why:

Column(s)Why excluded
trend_direction, trend_pctThese define the label (is_declining_label = trend_direction == "down"). Using them as inputs would be direct leakage.
content_id, client_idPseudonymous identifiers — used only for grouping the train/test split and joins, never as model features.
provider_used, model_usedMarked "not a model feature" in the dataset's own data dictionary.
baseline_score, ctr_gap, reason_codeDecision-derived outputs from the Week-4 rule itself — encode a prior judgment, not raw signal.
Public-safety note: every identifier in this dataset and in every artifact this page shows is a pseudonymous, generated ID (client_id, content_id) — no client names, URLs, or raw search queries appear anywhere in this analysis or its outputs.

03Methodology

Label, features, baseline, split — in that order

Label. is_declining_label = 1 if trend_direction == "down" (a 30-day vs. previous-30-day impression trend already computed in the dataset), else 0. This is a proxy for "worth reviewing," not a ground-truth business outcome like revenue or ranking loss — see Limitations.

Features (29 numeric + 8 categorical, one-hot encoded). Search and traffic volume (impressions, clicks, sessions, users, engaged sessions), CTR and position, engagement and scroll behavior, content metadata (word count, age, days since last update), and tier labels (position/impression/freshness/word-count tiers). Missing numeric values are imputed to 0 with an explicit "has this field" flag; missing categoricals become an explicit "unknown" category — a page's own missingness is a real, potentially informative pattern, not something to hide.

Baseline. A transparent Week-4 rule: for each position_tier (top_3, page_1, striking, page_3_5, deep), compute the tier's own average CTR from the training clients only, flag a page if its impressions ≥ 500 (enough traffic to trust the ratio) and its CTR sits below its tier's benchmark, and score flagged pages by the size of that gap. This is the standard a real editor could run by hand in a spreadsheet — the model has to beat it to earn its complexity.

Validation design. Rows are grouped by client_id before splitting — 25 clients (23,837 rows) in training, 7 different, unseen clients (6,163 rows) held out for testing. This matters: a naive random 80/20 split puts 31 of the 32 clients on both sides, letting the model partly memorize client-specific quirks instead of learning transferable signal. The chart in Results shows exactly how much that inflates the numbers.

Leakage checks. Beyond excluding the label-defining columns, the strongest feature by permutation importance (impressions_last_30d) was dropped and the model retrained: precision@50 fell from 0.82 to 0.62 — a real drop, consistent with a genuinely informative (if aggressive) feature rather than a collapse straight back to the 0.51 base rate, which is what outright leakage would look like. This is a judgment call, not a proof, and is revisited honestly in Limitations.

Models compared, same split, same metric. The Week-4 rule (baseline), logistic regression (scaled features), and a random forest (300 trees, max depth 8, min 20 samples/leaf, all seeded at random_state=42). Precision@K (K = 20, 50, 100) is the primary metric, reported next to the base rate every time — a high score next to a high base rate says nothing on its own.

04Results

Model vs. baseline, same held-out clients

Bar chart comparing precision at K=20,50,100 for the Week-4 baseline rule, logistic regression, and random forest, against the 0.51 base rate, on the honest client-grouped held-out split.
Takeaway: the random forest matches the baseline rule at K=50 (0.82 vs 0.82) and beats it at K=20 (0.95 vs 0.85) and K=100 (0.85 vs 0.75); logistic regression scores a suspiciously perfect 1.0 at every K — read as a warning sign, not a win (see note below).
KBase rateBaseline ruleLogistic regressionRandom forest
200.510.851.000.95
500.510.821.000.82
1000.510.751.000.85
Why the random forest, not the perfect-looking logistic regression, is the headline model: logistic regression's precision@K of exactly 1.00 at every K is a red flag, not a win — its top two coefficients by weight are impressions_last_30d and impressions_prev_30d, the same 30-day windows the label's own trend calculation is built from. It is likely riding very close to the label's own arithmetic rather than learning a generalizable pattern. The random forest, with a shallower max depth and a leaf-size floor, is the more conservative, more honestly-behaved model and is used for the ranked queue in Recommendations.
Bar chart comparing precision at K for a naive random 80/20 split versus the honest client-grouped split, same random forest model, same data.
Takeaway: the identical random forest, scored on a naive random split where 31 of 32 clients leak across train/test, reports precision@K 10–24 points higher than the honest client-grouped split at the same K — the split, not the model, is doing part of the "work" in the naive version.

Error read. In the honest split's top-20 queue, 1 of 20 flagged pages was a false positive — a page_3_5 page with zero CTR that the dataset actually labels "stable," not declining. That is a low, workable false-positive rate for a triage tool a human still reviews before acting.

05Limitations & honest framing

What this work cannot claim

Every claim on this page uses careful language on purpose: observed, measured, directional, decision-support — never "predicts," "proves," or "causes."

06Ranked recommendations

The action playbook this model supports

The validated model's held-out scores are turned into a ranked, reason-coded queue: 2,968 pages get a specific suggested action; 3,195 more are set aside as "insufficient data" (under 500 impressions — not enough traffic to trust a CTR read) rather than force-ranked. Every reason code traces to a raw, checkable column, never to the model's internal score alone.

Reason codeSuggested actionTypical effort
high_impressions_low_ctrRewrite title / meta descriptionLow
buried_high_demand_pageImprove position / internal linksMedium
weak_engagement_vs_type_medianImprove on-page engagementMedium
stale_content_181d_plusRefresh contentMedium–High
low_visibility_insufficient_dataMonitor only~Zero

Cheapest lever first: title/meta rewrites are worth trying on almost any flagged page with real traffic, before committing to an expensive content refresh — the same ranked score, triaged by effort, reviews more pages per hour of editor time.

Six page archetypes

Bar and line chart showing the size (log scale) and decline rate of six page archetypes found by clustering.
Takeaway: the two largest archetypes — Weak/No-Demand (18.7k pages) and Stale/Engagement-Problem (9.0k pages) — also carry the highest decline rates (55% and 62%), while the 413 "Champion" pages carrying the most traffic decline least (41%).

Weak / No-Demand

~18.7k pages, near-zero CTR & engagementmonitor

Hidden Gems

~30 pages, high search volume, ~0% CTRrewrite title/meta

Stale, Engagement-Problem

~9.0k pages, highest decline rate (62%)refresh + engagement fix

Champions

~413 pages, most traffic, lowest declineprotect / light monitor

Low-Volume Noise

~125 pages, 1–3 impressions, data artifactsexclude / data-quality only

Engaged Niche

~466 pages, standout engagement, modest trafficimprove links/position

The decay/refresh finding

Bar chart of decline rate by freshness tier, showing a non-monotonic pattern that peaks at 91-180 days and drops at 181+ days.
Takeaway: decline rate rises from 51.1% (0–30 days stale) to 61.1% (91–180 days) — then drops to 47.1% at 181+ days, the most stale bucket. Staleness alone does not predict decline in this data.

A blanket "refresh anything untouched for six-plus months" rule would spend effort on the bucket that, here, is least likely to be declining. Staleness is kept as one tiebreaker inside the model-ranked queue, never a standalone trigger.

What should never be automated

Before acting on any row, a human checks: sample-size sanity, live SERP context (featured snippets, strong competitors), data artifacts (e.g. missing fields), cannibalization from sibling URLs, and brand/legal sign-off where relevant.

Monitoring / retrain triggers (illustrative, not production-tuned): precision@50 dropping more than ~10 points below this snapshot's value on a fresh labeled sample; more than ~20% of the portfolio being new clients unseen in training; or a full quarter passing regardless of drift.

07Reproducibility

Rerun it from a fresh clone

Every number and chart on this page traces back to a notebook in the repo, in this order:

  1. w01_research_question.ipynb — lane choice and research question
  2. w03_data_contract.ipynb — data contract and exclusions
  3. w04_baseline_score.ipynb — the transparent baseline rule
  4. w05_model.ipynb — model training and comparison
  5. w06_validation_audit.ipynb — grouped split, leakage audit, claim rewrites
  6. w07_action_playbook.ipynb — ranked queue, archetypes, no-go list
  7. capstone.ipynb — the notebook this page mirrors, end to end

Every model in this project is seeded with random_state=42. Rerunning any notebook top to bottom from a fresh clone of the repo reproduces every number on this page exactly, using the same starter CSV (data/raw/content_refresh_anonymized.csv) and the same client-grouped split.