Skip to main content
ByEliott Kalfon
Restaurant listings combine structured fields, such as votes and location, with free text, such as customer reviews. In this cookbook, we predict Zomato ratings with TabPFN 3.5 and TabPFN 3, each with and without thinking mode, and default and tuned XGBoost. We use all 41,665 rated listings, with the same source columns and data splits for every model. TabPFN accepts the text directly. For XGBoost, we turn text into TF-IDF features and tune hyperparameters for five minutes on a separate validation set.

Setup

TabPFN runs through the API. In Colab, add TABPFN_TOKEN to your secrets using the key icon. Locally, set the TABPFN_TOKEN environment variable or use the client’s existing authentication.

Load and split the listings

The curated MulTaBench dataset contains 41,665 rated listings from the original Zomato dataset. Ratings are numeric and URLs have already been removed. Split the dataset into 80% training, 10% validation, and 10% testing. XGBoost uses validation RMSE to select hyperparameters and tree count. Once tuning finishes, both XGBoost and TabPFN fit on all 37,498 training plus validation rows. This is a random listing-level split: restaurants can recur across splits, and reviews_list contains individual review scores. The task is to estimate existing listings’ aggregate ratings; it does not measure performance on unseen restaurants or future ratings.

Sample listings and text

Inspect a few training listings, then read one complete set of their source text fields.

Fit both TabPFN versions, with and without Thinking

Pass the prepared columns, including the text fields, directly to the client. For TabPFN, keep the first 1,000 characters of each review; all other fields remain unchanged. XGBoost uses the full reviews. Every configuration uses all training plus validation rows and eight ensemble members. The API handles text processing. Thinking spends additional compute during fitting to optimize prediction quality. Use high effort and RMSE as the objective for both versions; the test set remains untouched during fitting. The standard configurations use no hyperparameter tuning.

Give XGBoost text features

Combine the full review, menu, and liked-dish fields into one text field. TF-IDF represents words and two-word phrases, so XGBoost can learn from shared language across listings. The tokenizer keeps numbers such as review scores. The other string fields use one-hot encoding; numeric fields use median imputation. Fit the vocabulary, category encoder, and imputer on training rows only during tuning. After selecting XGBoost’s settings, refit this preprocessing on training plus validation rows. Test rows never fit any preprocessing step.
Here are the first three training text fields beside six TF-IDF columns with the largest combined weights in these rows. Column names show the word or phrase; a zero means it is absent. The full model input also contains the other TF-IDF columns, one-hot categories, and numeric fields.

Tune XGBoost on validation RMSE

Optuna searches for five minutes, with early stopping to select the number of trees. A callback checks the deadline after each boosting iteration; setup and an in-progress iteration can add a little time. Feature extraction, final refitting, and test prediction are outside the tuning budget.

Fit default and tuned XGBoost

Refit the feature extraction on training plus validation rows and use the same resulting columns for both baselines. The default baseline keeps XGBoost’s predictive hyperparameters at their defaults, with no tuning or early stopping. The tuned baseline uses the validation-selected settings and tree count.

Compare on the untouched test set

Higher R² and lower RMSE or MAE indicate better predictions. RMSE and MAE are measured in rating points. All four TabPFN configurations and both XGBoost baselines use the same 37,498 fitting rows and 4,167 test rows. XGBoost learns from TF-IDF text features, while TabPFN processes raw text through the API. This is one fixed split from MulTaBench, with different preprocessing and evaluation from its five-fold leaderboard. Treat the scores as a worked example, not a significance claim.
Compare on the untouched test set TabPFN 3.5 reduces test RMSE from 0.0628 to 0.0571 rating points compared with TabPFN 3 in standard mode. Thinking improves RMSE for both versions: to 0.0595 for TabPFN 3 and 0.0566 for TabPFN 3.5. Tuned XGBoost reaches 0.1626. These scores describe this listing-level task, where restaurants can recur and reviews contain individual rating scores.