> ## 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.

# Prediction queries

> Prediction queries for TabPFN-Rel.

> [!NOTE]
>
> Looking for usage documentation? Check out [Relational predictions](https://docs.priorlabs.ai/capabilities/relational.md).

## `PredictiveQuery`

[ View source ](https://github.com/PriorLabs/relarena/blob/4b74c718ba6ff9c67cf63b4beac6dadaffdd09d8/packages/relarena-core/src/relarena_core/userdb/query.py#L315)

Entities and anchor time to score with a fitted predictor.

```python theme={null}
PredictiveQuery(
    *,
    entities: EntitySelector,
    at_timestamp: str | pd.Timestamp,
)
```

> [accordion] Type aliases
>
> ```python theme={null}
> EntitySelector = Union[str, Sequence[int]]
> ```

**Fields**

| Name | Type | Default | Description |
| - | - | - | - |
| `entities` | `EntitySelector` | Required | `"all"` or a sequence of original entity ids. |
| `at_timestamp` | `str \| pd.Timestamp` | Required | Anchor time, or `"test_timestamp"` for the context's test cutoff. |

***

## `PredictiveQuerySpec`

[ View source ](https://github.com/PriorLabs/relarena/blob/4b74c718ba6ff9c67cf63b4beac6dadaffdd09d8/packages/relarena-core/src/relarena_core/userdb/query.py#L439)

A training task and database specification.

```python theme={null}
PredictiveQuerySpec(
    database: DatabaseSpec,
    task: PredictiveTaskSpec,
)
```

**Fields**

| Name | Type | Default | Description |
| - | - | - | - |
| `database` | `DatabaseSpec` | Required | — |
| `task` | `PredictiveTaskSpec` | Required | — |

***

## `PredictiveQuerySpec.from_yaml`

[ View source ](https://github.com/PriorLabs/relarena/blob/4b74c718ba6ff9c67cf63b4beac6dadaffdd09d8/packages/relarena-core/src/relarena_core/userdb/query.py#L446)

Load a spec from a task YAML file.

```python theme={null}
PredictiveQuerySpec.from_yaml(
    path: str | Path,
    *,
    data_dir: str | Path | None = None,
) -> PredictiveQuerySpec
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `path` | `str \| Path` | Required | Task YAML with the label `query`, task fields, split cutoffs and a [`database`](https://docs.priorlabs.ai/api-reference/python/relarena-core/query#predictivequeryspec--database) path, relative to this file unless absolute. |
| `data_dir` | `str \| Path \| None` | `None` | Base directory for the tables' data files. `None` uses the database YAML's directory. |

**Returns**

| Type | Description |
| - | - |
| `PredictiveQuerySpec` | — |


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