Working With Autoresearch
PostHogOfficialPublished by PostHog
- Skill
- Tool integration
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Autoresearch enables users to create, train, and maintain predictive models within PostHog. By defining a target event, a population, and a time horizon, an agent-driven process trains models, selects the best-performing champion, and scores users daily. Predictions are stored as person properties and events, allowing for integration into cohorts, feature flags, and workflows. The system includes built-in validation, performance monitoring, and troubleshooting tools to ensure model quality and reliability.
What it does
- Trains predictive models to forecast specific user actions or events.
- Automatically selects the best model (champion) based on holdout performance.
- Scores populations daily and records results as person properties and events.
- Provides metrics like holdout and realized AUC to validate model quality.
- Allows steering of training runs and troubleshooting of model performance.
- Integrates predictions directly into PostHog cohorts, feature flags, and SQL queries.
When to use it
- When you need to predict churn, feature adoption, or conversion likelihood.
- When you want to automate personalized user experiences based on propensity scores.
- When you need to validate if a specific user segment is likely to perform a key action.
- When you need to diagnose why a predictive model is underperforming or failing to score.
Advantages
- Automates the complex process of feature engineering and model selection.
- Provides clear, actionable metrics for model quality and reliability.
- Seamlessly connects predictions to existing product analytics and activation tools.
- Supports both template-based setup and custom model definitions.
Usage examples
- “Who will do X in the next 7 days?”
- The agent initiates a training run to build a model predicting which users will perform the specified event within the 7-day horizon.
- “Is my churn prediction model any good?”
- The agent retrieves the model's holdout and realized AUC, providing a quality label and performance trend to assess if the model is reliable.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/posthog/working-with-autoresearch/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip working-with-autoresearch.zip -d .agents/skills
Documentation by PostHog
Working with autoresearch
Autoresearch answers one standing question per model: who in a population will do a target within a horizon? For example, "which active users will open a report in the next 7 days?".
The user names a target (an event or a PostHog action), a population and a horizon in days.
A training agent runs in a PostHog sandbox. It writes feature SQL and a model, scores each experiment on a holdout set, keeps what improves holdout AUC and discards the rest.
The server picks the champion from the kept experiments. The agent proposes; the backend decides.
Every cadence (daily by default, at 02:00 UTC), the champion scores the inference population. Each scored person gets an
autoresearch_predictionevent with their probability. When the model'swrite_person_propertyis on, a person who resolves to a current distinct ID also gets the model's output person property, for examplepredicted_p_adopt_insights_14d. It is off by default for new models. Turn it on withautoresearch-partial-updatebefore you target people by score in a flag, cohort, workflow or insight. Turning it off removes the property from the people the model scored. Changing the setting needs theperson:writescope.When a prediction date's horizon has passed, online validation checks the scores against what really happened and records realized AUC.
Training keeps going on a schedule. On each scoring day the model starts a research run (explore) until a run does not promote a better model, or until 5 research runs have run. After that it starts one research run every
research_interval_days(maintain, default 7) after the latest training run, so a run started by hand resets the clock. Withresearch_interval_daysnull the model trains only when someone asks. A champion that cannot score still gets a short rescue run.training_phaseandnext_research_atonposthog:autoresearch-retrievesay where the model is.
In the PostHog UI the entity is a model. The API and tools call it a pipeline. Use "model" when you talk to people.
Autoresearch is behind the autoresearch feature flag.
Training runs in a cloud sandbox, so it also needs PostHog Desktop access.
If the autoresearch-* tools are missing, the project probably does not have access yet.
Pick the job
| The user wants to | Start with | Reference |
|---|---|---|
| Create a model | posthog:autoresearch-resolve-template-create or a custom definition, then posthog:autoresearch-validate-create | defining-a-question.md |
| Know if a model is any good | posthog:autoresearch-retrieve, then posthog:autoresearch-online-performance-retrieve | reading-model-quality.md |
| Use the predictions | The output person property, or posthog:execute-sql on autoresearch_prediction | using-predictions.md |
| Fix or steer a model | posthog:autoresearch-training-runs-list, posthog:autoresearch-runs-list, posthog:autoresearch-suggestions-create | troubleshooting-and-steering.md |
| See what models exist | posthog:autoresearch-list | This page |
Create, train, score
The usual path is short. Each tool's description names its prerequisites and refusals, so read it with info before the first call.
Resolve or define. Templates cover the common questions (activity, inactivity risk, return after first use, feature adoption, repeat behavior). A custom definition works when none fits. See defining-a-question.md.
Validate.
posthog:autoresearch-validate-createwith the same target, horizon, lookback and populations you will create with. It returns the base rate, positive and negative counts and warnings. Fix anything that setscan_proceedto false, and tell the user about the non-blocking warnings.Create.
posthog:autoresearch-create. The new model is adraftuntil training starts.Train.
posthog:autoresearch-train-createstarts an agent run that takes a while (often tens of minutes). It costs real sandbox and LLM time, so confirm with the user before you start one, and never start a second run while one is live. A 403 means either the call came from inside a sandbox (ask the user to click Start training on the model's page) or the user has no PostHog Desktop access (the page will refuse too). Read the error message to tell them apart.Wait. Poll
posthog:autoresearch-training-runs-listat a relaxed pace. While the first run is in progress the model isbootstrapping, and a missing champion is normal.Score. After a champion is promoted, the next daily sweep scores the population.
posthog:autoresearch-score-createscores today now; call it once, then pollposthog:autoresearch-runs-list. A second manual score for the same date can duplicate predictions.
Pause, resume and delete are in the model's menu in the UI only. Pausing stops scoring and new training runs. A training run already in progress keeps running, and it can still promote a champion.
Model status
| Status | Meaning |
|---|---|
draft | Defined, never trained. |
bootstrapping | The first training run is in progress. No champion yet. |
running | A champion exists and scores on the cadence. Retraining can still happen. |
converged | Treated like running: the champion still scores and is still validated. |
paused | No scoring and no new training until someone resumes it in the UI. A run already in progress finishes. |
The training run's iteration_count and best_holdout_score are written only when the run completes.
A healthy run can show 0 iterations while its experiments are already recorded, so do not call a run stuck from the counter alone.
How to talk about results
Holdout AUC is the score on held-back training data. It says how well the model ranked people in the past. Treat it as a promise.
Realized AUC is the score against real outcomes after the horizon passes. Treat it as the proof. It wins over holdout AUC whenever it exists.
The UI labels quality Strong at AUC 0.8 and up, Fair at 0.7 and up, and Weak below that, and says whether the label comes from testing only or is confirmed by real outcomes. Use the same words so the agent and the UI agree.
Lift at 10% is the plain-language headline: "the top 10% are 3.2× more likely to do X than average".
The score is a probability, but on a rare target it is often best read as a ranking. Say so when the base rate is below a few percent.
reading-model-quality.md covers calibration, likelihood segments, coverage and what to say when the numbers disagree.
Guardrails worth keeping in mind
Changing the question means a new model. The fields a model was trained on (target, horizon, populations) are frozen once a model exists. Create a new model rather than editing one.
Autoresearch trains on identified users only. Anonymous traffic does not count toward training data, so raw event volume can overstate what is available. Trust the validation counts.
Scores are keyed on the person. A model whose scores are almost all the same value usually has an identifier problem, not a weak signal. See troubleshooting-and-steering.md.
Read the output property name, do not guess it. Take
output_person_propertyfromposthog:autoresearch-retrieve. A derived name includes the target and the horizon (predicted_p_<target>_<horizon>d), and templates use their own prefix, so two models on one target do not overwrite each other.The research model sets most of the training cost. A training run uses the model's
agent_modelandagent_reasoning_effort. Null uses the default, Claude Opus 5.5 at medium effort, which costs about twice what Claude Sonnet 5.5 costs per run.effective_agent_modelonposthog:autoresearch-retrieveshows what the next run uses, andposthog:autoresearch-partial-updatechanges it. An unknown model or an effort the model does not support returns 400 with the valid choices.posthog:autoresearch-training-runs-listshows the model each run used.A model costs money to train and query to score. A very large population scores in rolling batches (about 45,000 people per run), so not everyone gets a fresh score every day. Validation tells you how many runs a full rescore takes.
Bring your own agent
An agent outside PostHog (on a laptop, for example) can train a model for an existing pipeline.
It opens a run with posthog:autoresearch-training-runs-create, records each experiment with posthog:autoresearch-training-runs-iterations-create, uploads its bundle with posthog:autoresearch-training-runs-artifacts-upload-create, and finishes with posthog:autoresearch-training-runs-complete-create.
It pulls training data with posthog:execute-sql, because posthog:autoresearch-materialize-features writes only into a PostHog sandbox.
Read posthog:autoresearch-training-runs-history first to reuse what earlier runs on the same target learned.
The iteration tool's description is the contract for valid feature SQL: read it in full before the first iteration.
Files
- ATTRIBUTION.mdAdded by AutoGineer869 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md11.3 KiB
- references/defining-a-question.md9.5 KiB
- references/reading-model-quality.md6.3 KiB
- references/troubleshooting-and-steering.md10.3 KiB
- references/using-predictions.md6.6 KiB
references/reading-model-quality.md
Reading model quality
Quality has two stages. The model makes a promise at training time (holdout) and keeps it, or not, in production (realized). Lead with the realized numbers when they exist, and say plainly when they do not exist yet.
Where the numbers live
| Tool | What it gives |
|---|---|
posthog:autoresearch-retrieve | The champion's champion_holdout_auc, champion_realized_auc, champion_lift_at_10, champion_is_preliminary, champion_realized_auc_trend, people_scored, likely_count, first_check_expected_at and coverage. Start here. |
posthog:autoresearch-online-performance-retrieve | One row per model per validated date: realized AUC with a 95% interval, Brier score, calibration error and bins, mean prediction against base rate, lift at 10% and 20%. |
posthog:autoresearch-models-list | Every champion, challenger and archived model with its scores. Use it to see whether a retrain promoted a new champion. |
posthog:autoresearch-models-retrieve | One model's recipe (feature SQL, transforms, model class) and its feature importances. |
posthog:autoresearch-training-runs-history | Each run's distilled summary: what won, what was tried and dropped. |
The quality label
The UI gives each champion a label from AUC, and states its basis:
| Label | AUC |
|---|---|
| Strong | 0.8 and up |
| Fair | 0.7 to 0.8 |
| Weak | below 0.7 |
The basis is confirmed when the champion has realized AUC and
champion_is_preliminaryis false. Otherwise it is testing only and comes from holdout AUC.A new champion has no realized rows until its first horizon has passed.
first_check_expected_atsays when the first check is due.AUC 0.5 is a coin flip. Above about 0.97 on holdout is suspicious: check that the features do not read the target or something that happens because of it.
When realized AUC is missing after the horizon
A validated date where every scored person had the same outcome has no AUC.
Its online performance row carries the warning single_class_no_auc.
This is common on a rare target with a short horizon.
Tell the user that realized AUC needs dates where some people did the target and some did not, and that more dates will fill it in.
When holdout and realized disagree
Realized a little below holdout is normal. A gap of a few hundredths is noise, especially on days with few positives. The interval on each row shows how wide the noise is.
Realized far below holdout, consistently suggests the training data does not look like today's population. Common causes: the inference population differs from the training population, behavior shifted, or the features leaked the outcome during training.
One bad day with a wide interval is not a finding. Look at the trend over 7 or more dates before you draw a conclusion.
Calibration
AUC measures ranking. Calibration measures whether a 30% score means 30% of those people do the target.
Compare
mean_p_ywithbase_rateon each realized row. Ifmean_p_yis clearly above, the model over-predicts. If it is clearly below, it under-predicts.On a rare target, training can sample down the negatives. Scoring corrects for that:
$autoresearch_p_yis the corrected probability, and$autoresearch_p_y_rawkeeps the model's own score. If calibration is still poor, tell the user to rely on the order and the segments, not on the absolute number.The Brier score and calibration error are lower-is-better. Compare them across dates of the same model, not across models with different base rates.
Lift
Lift at 10% is the clearest sentence for a non-technical reader: "people in the top 10% are 3× more likely than average to do X". Lift at 20% helps when the user plans to act on a larger group.
Likelihood segments
The Predictions tab splits scored people into Likely, Possible and Unlikely.
Once a model has enough realized history, the cut points come from lift over the realized base rate, and the cards read like "2× average or higher".
Before that, a fixed pair of probability cut points is used.
A saved cohort keeps the cut point it was created with, so its name states the probability range. Recreate a cohort if the segments move a lot.
Coverage and freshness
Large populations score in rolling batches, so "scored today" and "everyone has a fresh score" are different claims.
coverageonposthog:autoresearch-retrievehaspopulation,with_score,never_scoredand the score age in days (average, median, 90th percentile, oldest).never_scoredabove zero, or a median score age above the cadence, means a rolling population.When the user plans to target by score, check coverage first. A cohort built from the property only includes people who were scored.
A short report
When the user asks "is my model any good?", answer in this order:
The question in plain words, and the label with its basis ("Fair, confirmed by real outcomes").
Lift at 10% as one sentence.
The realized trend: stable, improving or drifting, with the number of dates it rests on.
Anything that limits trust: few positives, poor calibration, low coverage, a champion too new to check.
One next step: wait for more dates, act on the Likely segment, or steer the next training run.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- PostHog
- Publisher
- PostHog (Official)
- Source
- PostHog/skills · skills/omnibus/working-with-autoresearch · commit a5d30e7
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by PostHog or PostHog.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download working-with-autoresearch.zip