> ## 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](/quickstart) for installation, authentication, and model selection.

### Plus text limits

TabPFN-3.5-Plus text preprocessing supports at most **10 million tokens in total** and **2,500 characters per text value**. These limits apply in addition to the [model's row and column limits](/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:

<CodeGroup>
  ```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)
  ```
</CodeGroup>

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](/improving-performance/preprocessing#text-features) for text-input guidance and [Benchmarking](/benchmarking#9-further-preprocessing-and-data-cleaning) for comparing models with different preprocessing.
