Autofit by Prior Labs: The agentic data scientist
TL;DR
- TabPFN-4 is the strongest starting point I know for tabular prediction, with no hyperparameter tuning required. Autofit by Prior Labs (GitHub, Apache 2.0) is an open-source Claude Code plugin that explores what is left on top of it: domain features, secondary lookup tables, TabPFN settings, and ensembling.
- Every idea runs inside a strict harness: the validation split and metric are locked in code before the first experiment runs, transformations fit on training folds only, every code diff is inspectable, and you can steer or approve experiments live.
- Install it in three steps in Claude Code and try it on your own table, or enter this month’s “Impress the Grandmaster” Advent challenge.
I have worked in data science for a long time, and I spent a big part of those years competing on Kaggle, where I was fortunate enough to reach #1 multiple times. What kept pulling me back was always the same question: what is the best solution we can find for this problem? Autofit is my attempt at trying to consolidate a lot of what I know about tabular data science into a tool that others can use, steer, learn with and produce the best modeling solution for their data and problem at hand.
Tabular prediction has been at the center of my work from day one. Most of the predictions a business actually runs on live in tables: churn, demand, credit risk, delivery times, conversion, pricing. Kaggle itself grew from tabular competitions. For years the recipe there stayed the same; gradient-boosted trees did most of the work, and the winning solutions stacked and blended hundreds of models, configurations and feature sets to squeeze out the last bit of score. It was a lot of fun on a leaderboard, albeit often painful to put into production.
Over the last two years, tabular foundation models (TFMs) have sparked new life into tabular predictive modeling and have made us question some of these old best practices. Since TabPFN was first presented in Nature, each generation has scaled to larger datasets and stronger accuracy, and TabPFN-4 now handles up to 10 million rows.
In our TabPFN-4 post, we showed that a single forward pass with TabPFN-4 would have taken first place in 7 out of 13 of these tabular Kaggle competitions. It outperforms many of the large stacked multi-model solutions from the past, further highlighting how far the field has moved recently. I see this reflected in the choices of Kaggle competitors more and more, as well as during my talks with practitioners. TabPFN has become the first model people reach for: you hand it a table and get predictions from one forward pass, with no hyperparameter search, no learning rate and no early stopping to tune, and it is usually a very strong model out of the box.
That leaves the one itch I just can't shake: is the baseline the best model we can get? TabPFN makes classic hyperparameter tuning largely unnecessary, yet on real problems there is often more that can be done: a feature that captures domain structure, a second table with historical records, a target transformation, or a TabPFN setting that fits this data, such as the sample weights and label reliability that came with TabPFN-4.
Hunting for those ideas is the part of data science I have always loved most, in tabular competitions just as much as in computer vision or NLP. You come up with a hypothesis, sit down to code it, kick off experiments overnight, and check your validation score in the morning. That creative loop was always the most exciting to me, even if a lot of the plumbing around it used to be slow and tedious. Every idea had to be wired up cleanly by hand, and your validation setup had to be airtight, or the comparison meant nothing.
Coding agents made writing that experiment code much quicker. Being able to ask an agent to implement a feature idea and run TabPFN, or brainstorm domain interactions together, feels like real pair data science. Still, simply pasting a CSV into Claude and asking for a better model falls apart fast. The mistakes are often subtle. The validation split changes halfway through a session, or a statistic is computed on the full table before it is split, and the scores can no longer be compared or trusted, or a transform passes cross-validation and then breaks on a category it has not seen. Many coding agents also still come with generic machine learning habits spending its experiments on scaling, imputation and one-hot encoding, all of which TabPFN handles itself. Guardrails are required to make sure that every idea is scored on the same folds, that nothing leaks from the validation rows, and that the agent did what it says it did.
For years, the #1 question people asked me at conferences or in messages was: “How do you win on Kaggle?” My answer was never one secret trick. It was always about getting the fundamentals around the model right: finding the proper validation setup to not fool yourself, choosing a metric that matches the real goal, spotting leakage early, knowing where your model excels versus where it needs help, and testing one clean change at a time.
Autofit is my attempt to condense as much of that intuition as I could into a tool. It wraps a strict validation harness around TabPFN-4 and guides an agent through disciplined experiments, a bit of a grandmaster in a box.
At the same time, I deliberately did not want to build an autonomous black box. While Autofit can run completely hands-off when you want it to, I wanted it to feel like two data scientists working on a problem together: transparent, educational, and interactive, where your domain knowledge steers the search and every decision stays with you. Today, we are open-sourcing it.
How Autofit Works
Autofit is a Claude Code plugin. You open Claude Code next to your data and ask it to run Autofit. It starts a background agent, a second Claude session under your own login, that writes experiments and scores each one with TabPFN-4 through our API. Your chat stays free, and from it you watch, steer and approve every experiment.
Because TabPFN-4 gives you a strong model in a single forward pass without a tuning loop, the session spends its budget where human and agent judgment actually add value: framing the task, engineering features, joining tables, and testing targeted TabPFN configurations.
Every run follows these steps:
- Frame the problem together. Claude asks what you will do with the predictions and picks the metric from that (or you bring your own metric file, for example a competition's metric). It designs the validation from how your rows relate: independent, grouped by customer, or ordered in time. It checks for columns that leak the answer, ID columns and repeated rows, and asks before it drops anything.
- Baseline. Plain TabPFN-4 with a single forward pass on your raw table, scored on the validation setup and metric of choice, establishing the reference score every later experiment is measured against.
- Iterative experiments. The agent tests one idea at a time: features from domain knowledge, dates, group statistics, lookups into other tables you provide, column handling, TabPFN settings, target transformations. It often builds on its best experiment so far, so good ideas stack. The agent can either run autonomously, or interactively with you, where you can steer it in any direction you want.
- Ensemble. After each run, Autofit updates a greedy forward-selected ensemble from the experiments whose out-of-fold predictions blend best together. You can either use the best single model, or for peak performance pick the best ensemble in the end.
- Result: Autofit retrains the winning setup on the full data, updates a live browser page while running, and saves a standalone HTML report showing charts, ensemble weights, and every experiment’s code diff.
At the end, it returns you a .pkl file you can take outside of the session and integrate into any setup you currently have.
An Agent You Can Keep in Check
This is the part I care about most. In my experience, prompting an agent to “be careful with validation” is never enough, so Autofit enforces the rules in code within the harness:
- Locked folds and locked metric. Cross-validation folds and the metric are locked when the session starts. An experiment that tries to change them is rejected, so every score is comparable.
- Zero cross-fold leakage in transforms. Every feature step, including multi-table joins and aggregations, lives inside a pipeline fitted strictly on each fold’s training rows, with train/test column alignment enforced automatically.
- Readable, scoped code. The agent can only modify the code at specific steps such as for feature transformations or model parameters. Each experiment is a small piece of code you can read.
- Pausing when the data looks suspicious. If the agent discovers a data issue that artificially inflates the baseline (duplicate records across folds, an ID column identifying them, or target leakage), it flags the finding and pauses the session immediately so you can decide how to proceed.
- Fact-checked reports. The report's text is checked against the recorded numbers before you see it.
One moment from my own testing captures why this matters. On Kaggle’s Don’t Get Kicked! competition (predicting whether a used car bought at auction turns out to be a bad buy), Autofit flagged a set of market-price columns as likely recorded after the purchase date and paused to ask whether to drop them. In a real production deployment at auction time, keeping them would invalidate the entire model. Having an agent spot that risk and pause to ask the human, rather than silently guessing, is exactly what has to happen before anyone trusts a score.
Two things to keep in mind. All scores are cross-validation scores on your training data, and the ensemble is chosen on those same rows. If you have a labeled test set that the session never saw, Autofit scores the final model and plain TabPFN on it with one command, which is the cleanest check. Autofit also reports the numbers as they are and leaves the judgment of a difference to you.
Your Knowledge Steers It
Autofit knows TabPFN, and you know your data and domain. Before Autofit starts, you can give it as much context and background about the problem as needed. While it runs, the sidebar in the Claude Code plugin shows every experiment with its score and what it changed. You can tell it what the data does not say ("tenure is in months"), suggest an experiment to try, have it build on a specific earlier one, or approve each experiment before it runs. It answers each note with what it will do with it, or why not. Budget, pause, continue and stop act on the run directly, and sessions are saved, so you can pick one up later.
I also wanted people to come away from a run understanding why things worked. At the start of a session, Autofit asks how much detail you want: every concept explained in plain words, a short rationale per experiment, or concise numbers and diffs only. Whatever you pick, every experiment comes with a description of what it changed and the code itself.
Results on Kaggle
Naturally, I tested Autofit on Kaggle. I ran it across 16 finished tabular competitions with a budget of 40 experiments each, submitted each final ensemble as a late submission, and placed its score on the competition's final private leaderboard. On the 13 single-table competitions, we also have a plain TabPFN-4 submission to compare against directly.
Autofit beat plain TabPFN-4 on 10 of the 13 single-table competitions. Where TabPFN-4 was already 1st or 2nd, Autofit kept that place on all nine, with a slightly lower score on three of them (Mercedes-Benz, Santander Customer Satisfaction, Give Me Some Credit): TabPFN-4 is a tough baseline, and on clean tables where the raw features already carry the signal, forty experiments will not always top it. Where it left room, Autofit climbed, from #202 to 1st on Prudential and from #46 to 1st on BNP Paribas. The gains come from what a single table does not hold: domain features, custom metrics and post-processing such as Prudential’s QWK grade cut points.
The three competitions on the right come with extra tables next to the training table. Plain TabPFN-4 takes one table, so there is nothing plain to compare against; Autofit joins the extra tables itself and reaches 1st on Recruit Restaurant.
For context on these runs: the agents ran on Claude Opus 5.5 at high effort and given a brief note summarizing basic facts from the competition description and forum, similar to the context a practitioner brings to a dataset. Agent usage averaged roughly $2.90 of Claude tokens per 40-experiment run (median $2.64, range $1.89 to $4.28), plus TabPFN API calls, with most sessions finishing in 25 to 85 minutes from first prompt to submission file.
Try It Today
Autofit is open source under Apache 2.0 at github.com/PriorLabs/autofit. You need Claude Code, macOs, Linux or WSL2 in Windows, uv 0.11+, and a Prior Labs API account:
- Create an account at platform.priorlabs.ai.
- In Claude Code, run:
Then run/plugin marketplace add PriorLabs/autofit /plugin install autofit@priorlabs /reload-plugins/af loginto sign in. - Open Claude Code next to your data and ask: “Run Autofit on churn.csv and predict churn.”
Your table goes to the TabPFN API for fitting and scoring; the agent itself is Claude Code running locally under your own login.
To celebrate the launch, this month’s Advent challenge, “Impress the Grandmaster”, invites you to build something creative on top of Autofit and put it to work in a real workflow. I’ll be judging the submissions myself, and the winner takes home a 500 EUR gift card.
I am genuinely pumped to finally put Autofit out into the world, and this 0.1 release feels like just the beginning. There is so much more I want to explore next, including richer interactive data exploration and model interpretability, broader metric and workflow support, and more flexibility in how you bring your own LLM setup.
Autofit is brand new, and I would love your feedback on all of it: where it shines on your tables, where it gets stuck, and what you wish it did next. Open an issue on GitHub or get with us in touch through any other channel such as Discord.
