> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priorlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> TabPFN-3 and later versions support up to 1,000,000 rows, subject to feature count and checkpoint/API limits.
> For large datasets, use per-estimator subsampling, e.g. inference_config={"SUBSAMPLE_SAMPLES": 100_000}, in TabPFNClassifier or TabPFNRegressor from tabpfn or tabpfn_client.
> Pass raw pandas DataFrames to fit and predict. Categorical strings/categories, raw text, and missing feature values are handled automatically; no manual integer/one-hot encoding, imputation, scaling, or outlier removal is needed.

# Text Features

> Use text columns alongside numerical and categorical features for classification and regression with TabPFN-3.5.

TabPFN-3.5 can use free-text columns together with the rest of your table to predict a target. For example, support ticket notes can contribute to churn predictions, reviewer notes to insurance claim predictions, and product descriptions to demand estimates.

## Local package and API

| Access | Model | Text support |
| - | - | - |
| Local `tabpfn` package | TabPFN-3.5 | Supports text columns directly alongside numerical and categorical features. |
| Hosted API | TabPFN-3.5-Plus and TabPFN-3.5-Thinking | Adds enhanced text processing for stronger results on text-rich datasets. |

Use a package release with TabPFN-3.5 support. See the [quickstart](https://docs.priorlabs.ai/quickstart.md) for installation, authentication, and model selection.

## Choose a text-handling preset

With `tabpfn-client`, set `text_handling` when creating the classifier or regressor:

| Preset | Behavior |
| - | - |
| `"advanced"` (default) | Uses the API's default text processing. Start here. |
| `"simple"` | Uses an alternative text-processing preset. Compare its accuracy on your validation set. |

Both presets support text columns. `simple` does not disable text processing, and its accuracy depends on your dataset. The setting applies when preprocessing is enabled.

```python theme={null}
from tabpfn_client import TabPFNClassifier

model = TabPFNClassifier(text_handling="simple")
model.fit(X_train, y_train)
predictions = model.predict(X_test)
```

The same parameter works with `TabPFNRegressor` and with Thinking mode. In structured REST fit requests, set the top-level `text_handling` field to `"advanced"` or `"simple"`.

## Plus text limits

The hosted TabPFN-3.5-Plus API supports at most **50 million tokens in total** for text preprocessing and **2,500 characters per text value**. These limits apply in addition to the [model's row and column limits](https://docs.priorlabs.ai/models#tabpfn-3-5-family).

## Pass a mixed table

Keep text in its original columns. You do not need to manually vectorize it before passing it to TabPFN-3.5.

For a churn classification task, a customer dataset might contain:

| Column | Example value | Role |
| - | - | - |
| `support_notes` | `Customer reported repeated service outages.` | Text feature |
| `plan` | `business` | Categorical feature |
| `tenure_months` | `18` | Numerical feature |
| `churned` | `1` | Target to predict |

Load your data and split it into training and test sets:

```python theme={null}
import pandas as pd
from sklearn.model_selection import train_test_split

data = pd.read_csv(
    "customers.csv",
    dtype={"support_notes": "string", "plan": "category"},
)
X = data[["support_notes", "plan", "tenure_months"]]
y = data["churned"]

X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42, stratify=y
)
```

Set text columns to the pandas `string` dtype so they can be detected as text, including on pandas 2. Declaring `plan` as `category` keeps it categorical regardless of how many distinct values it contains.

Select TabPFN-3.5 locally or TabPFN-3.5-Plus through the API:

```python Local package theme={null}
from tabpfn import TabPFNClassifier
from tabpfn.constants import ModelVersion

model = TabPFNClassifier.create_default_for_version(ModelVersion.V3_5)
model.fit(X_train, y_train)
predictions = model.predict(X_test)
```

```python Hosted API theme={null}
from tabpfn_client import TabPFNClassifier

model = TabPFNClassifier.create_default_for_version("v3.5")
model.fit(X_train, y_train)
predictions = model.predict(X_test)
```

For a numerical target, use `TabPFNRegressor` from the same package. The feature table can still contain text, categorical labels, and numerical values.

## Preparing text columns

* Keep text features alongside the other relevant columns, so the model can use both the text and the structured data.
* Use the same feature columns when fitting and predicting.
* Include only text available at prediction time. For example, notes written after a customer churns should not be inputs to a prediction of that churn.
* Start with raw text. Evaluate manual vectorization or domain-specific text features against that baseline on held-out data, and fit learned preprocessing only on the training split.

See [Preprocessing](https://docs.priorlabs.ai/improving-performance/preprocessing.md#text-features) for text-input guidance and [Benchmarking](https://docs.priorlabs.ai/benchmarking.md#9-further-preprocessing-and-data-cleaning) for comparing models with different preprocessing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.