The Oracle

Shared data platform and forecasts evaluated over time

Role
Data, modelling, evaluation, product
Tools
  • Python
  • SQLite (WAL)
  • LightGBM
  • scikit-learn
  • PyTorch
  • MiniLM
  • TimesFM
  • MLX (LoRA)
  • MCP
  • REST
  • launchd
Status
Functional
The dashboard, live channel: exact stats, velocity and expected 28-day views for every recent video.
The dashboard, live channel: exact stats, velocity and expected 28-day views for every recent video.
error on 28-day views against the rolling median: log10 MAE 0.499 → 0.393 (102 test videos)
−21%
measured coverage of the 80% interval (71% before), and narrower: ×4.64 vs ×5.04
81%
models compared walk-forward, decided by a statistical quality gate
13
for the full backtest on CPU (335 s before)
≈ 90 s
The problem
Knowing what a forecast is really worth takes a single data platform and an evaluation that respects time.
For whom
The LaRefVlog channel: deciding every morning what to talk about and how many views to expect, with data that stays local.
The outcome
One platform, thirteen models judged walk-forward and a quality gate written in advance. The “channel regime” predictor brings log10 MAE from 0.499 to 0.393: −21% error against the rolling median, with an 80% interval covered 81% of the time.

Context

Before shooting a short, two questions: what to talk about today, and how many views to expect from an idea, with quantified uncertainty.

The 20 October overhaul starts from the protocol: one store shared with Radar, a time-ordered evaluation, and a selection rule written before measuring. A learned model only goes to production if the 90% confidence interval of its gain excludes zero.

What I built

  • Platform shared with Radar: 348 videos, 1,457 timestamped snapshots, 904 articles from 30 sources, trends and Wikipedia; health of every source on every run.
  • “Channel regime” predictor: daily views over the last 7 days divided by videos active over 28 days. Known on the day, it removes the rolling median’s 28-day lag: −21% error, 90% CI of the gain [0.044; 0.166] in log10.
  • Purged walk-forward backtest (28-day embargo, 4 folds): 13 models, from median baselines to regularised LightGBM on the gap to the regime, all judged on the same 102 videos.
  • Signals tested on equal terms: press coverage rebuilt for 348 videos, a title effect learned on 2,182 shorts from 10 comparable channels; the quality gate keeps only what wins.
  • 80% interval by asymmetric rolling conformal on the last 60 residuals, and nowcasting: a recent video’s latest count is projected to 28 days by a growth curve fitted on the snapshots.
  • Ranked ideas: hot topics, drafting, filters, P10–P50–P90 range and explained score; a LoRA trained on the channel’s titles for drafting.
  • Product: one CLI, a four-view dashboard, a REST API, a 9-tool MCP server and a scheduled service outside ~/Documents; 49 tests.

Architecture 7 blocks

  1. 01 · InputCollectorsChannel and snapshots, French press, trends, Wikipedia
  2. 02 · DataPlatformOne SQLite store shared with Radar, source health
  3. 03 · ModelWalk-forward13 models: channel regime, medians, Ridge, HistGB, LightGBM, MLP, blend; 28-day embargo
  4. 04 · ToolSelection ruleA learned model only if the 90% CI of its gain excludes 0
  5. 05 · ModelIntervals and nowcastRolling 80% conformal, growth curve
  6. 06 · ModelIdeasHot topics, LLM or template drafting, filters, ranking
  7. 07 · OutputServingCLI, dashboard, REST API, 9-tool MCP

Heavy computations (TimesFM, LoRA, LLM generation) go through a GPU queue, one job at a time.

Pipeline 6 steps

  1. CollectionChannel, press, trends, Wikipedia.
  2. PlatformOne SQLite store, one configuration.
  3. Walk-forwardThirteen models, 28-day embargo.
  4. IntervalsRolling conformal at 80%, 81% coverage.
  5. NowcastVideos under 28 days old.
  6. IdeasDrafting, filters, ranking.

Decisions the choice, the reason, the alternative ruled out

  1. D1
    Evaluate over time (purged walk-forward, 28-day embargo) rather than with shuffled cross-validation.

    The channel’s level drifts over time: only a time-ordered evaluation measures the real error. Walk-forward, the rolling median reaches a CTR MAE of 1.44, against 2.25 for the blend.

    Ruled outShuffled cross-validation, optimistic on a drifting series.

  2. D2
    Write the selection rule before measuring: the baseline stays in production until a gain is significant.

    The gate decides without bias: the channel regime, the best measured predictor (−21% error against the rolling median, 90% CI of the gain [0.044; 0.166]), is in production.

    Ruled outPicking the most sophisticated model.

  3. D3
    Predict from the day’s regime (7-day daily views ÷ videos active over 28 days) rather than the median of mature videos.

    The median follows the channel with a 28-day lag; the regime is known on the day and tracks trend changes: log10 MAE from 0.499 to 0.393.

    Ruled outThe rolling median of the last 30 videos.

  4. D4
    An asymmetric rolling conformal interval, on the last 60 known residuals, with its actual coverage published.

    Measured coverage of 81% for an 80% target (71% before), with a narrower range: ×4.64 vs ×5.04.

  5. D5
    Train the ideas LoRA on a model that fits the machine.

    Sized for 16 GB: 4-bit Qwen3 4B trains in 47 min with a 4.5 GB peak; on 36 held-out cases, 97% of titles follow the channel format (0% for the base model). A 9B model belongs on a 24 GB GPU.

    Ruled outA 9B LoRA, which needs a dedicated GPU.

Results

28-day views, walk-forward (102 test videos, 4 folds)

Model (from the 13)MAE log10Gap to channel regime [90% CI]
Channel regime (views per active video)0.393—
Regularised LightGBM, shrunk gap0.403−0.010 [−0.029; 0.009]
Ridge on the gap to the regime0.455−0.062 [−0.112; −0.010]
Rolling median, 30 videos0.499−0.106 [−0.166; −0.044]
Rolling median by format0.506−0.113 [−0.173; −0.050]
Quantile LightGBM0.579−0.186 [−0.269; −0.103]
Blend (Ridge, HGB, MLP, LGBM)0.587−0.194 [−0.274; −0.109]
MLP, 5 seeds0.710−0.317 [−0.395; −0.231]

The quality gate puts the channel regime into production: a learned model is only kept if the 90% CI of its gain excludes zero. 0.30 in log10 is a factor of 2.

Before / after (same 4 folds, same 102 test videos)

MeasureBefore: rolling medianAfter: channel regime
MAE log100.4990.393 (−21%)
80% interval coverage71%81%
Interval width×5.04×4.64
Interval methodSplit conformalAsymmetric rolling conformal, 60 residuals
Full backtest on CPU335 s≈ 90 s

MAE gain of 0.106 log10, paired bootstrap 90% CI [0.044; 0.166].

CTR: shuffled vs time-ordered validation (222 videos)

ProtocolModelMAE (CTR points)
5 shuffled folds (published 19 Oct)MLP + HistGB blend1.355
Walk-forward, 9 foldsMLP + HistGB blend2.247
Walk-forward, 9 foldsRolling median, 30 videos1.441

CTR level drifts over time: time-ordered validation stops the model from seeing future videos. It is the reference for every published number.

Ideas LoRA on Qwen3 4B: base vs LoRA, 36 held-out videos

MetricBaseLoRA
Channel title format respected0%97%
Valid titles6 %89 %
Similarity to the real title0.510.79
Gap to channel style (↓)69.45.1
Test-set loss (↓)4.731.48

The LoRA learns the channel’s format, tone and style: titles ready to use, with no loss of diversity. Same protocol as the previous LFM2.5 1.2B version, beaten on every metric.

Deliverables 5

  • Shared data platform (Oracle and Radar) with migrations, run log and source health.
  • Results regenerated from files: RESULTS, model card, dataset card.
  • Four-view dashboard, REST API, 9-tool MCP server, scheduled service ready to install.
  • Qwen3 4B LoRA adapter and its base-vs-LoRA evaluation, compared with the LFM2.5 version; memory sizing log.
  • 49 offline tests; full backtest in ≈ 90 s on CPU (335 s before).

Environment

Hardware and measurement setup

  • Ideas LoRA trained on Qwen3 4B (MLX 4-bit) on a MacBook Pro M1 Pro 16 GB: 300 iterations, 47 min, 4.5 GB peak. A LoRA on a 9B model calls for a 24 GB GPU.
  • The views model runs entirely on CPU: full backtest in ≈ 90 s on a MacBook Pro M1 Pro.
  • Channel data and YouTube Studio exports kept local; service scheduled by launchd, heavy jobs on a GPU queue, one at a time.

Reproduce README commands

Private code: read access under NDA, or a 30-minute live demo. Request access →

.venv/bin/python -m oracle.cli collecte chaine --mode complet
.venv/bin/python -m oracle.cli collecte news
.venv/bin/python -m oracle.cli sujets
.venv/bin/python -m oracle.cli vues backtest
.venv/bin/python -m oracle.cli ctr walkforward
.venv/bin/python -m oracle.cli docs
.venv/bin/python -m oracle.cli dashboard
.venv/bin/python -m pytest
  • CTR and the daily series come from the channel owner’s YouTube Studio exports; that data stays local.
  • Dashboard and API on 127.0.0.1:8333; LoRA and TimesFM run through the gpu_jobs scripts, one at a time.

Gallery 3

Hot topics over 72 h: agreement across source families, freshness, velocity.
Ranked ideas with their P10–P50–P90 range and score breakdown (20 Oct, morning, before the switch to the channel regime).
Daily channel series: TimesFM compared with simple baselines; exponential smoothing is selected (MAE 39,128 views/day).

What this project means for you

The same know-how, on your problem.

01

A number that holds

An evaluation that respects time and a selection rule written in advance: you know what a model adds before relying on it, and the simplest thing that wins stays in production.

02

A platform before models

One store, one configuration, the health of every source: your tools stop contradicting each other.

03

Prediction inside your tools

MCP server for your assistants, REST API or dashboard: the forecast lands where the team already decides.