Skip to content

ICLEstimator

ICLEstimator runs zero-shot in-context learning (ICL) inference. Unlike GNNEstimator, ICLEstimator has no training loop, no experiment tracking, and no model artifact — there is nothing to fit() or register. You construct it once and call predict() or score() directly; both run the full pipeline (feature generation + ICL inference) in a single job.

Every ICL job needs a context table: a table of already-labeled examples used directly as in-context examples. There is no analogue of a training loop that “learns” from this data ahead of time — the context table is read at inference time, every time you call predict() or score().

ICLEstimator accepts either of the two dataset kinds already used across the SDK, and picks its pipeline based on which one you pass in:

Dataset kindPipelineSupported task types
RelationalDataset (multi-table, with a NodeTask)DFS (featuretools) generates cross-table features (e.g. a customer’s past orders), then ICL runs on the result. Depth is controlled by ICLConfig.dfs_max_depth.binary_classification, multiclass_classification, regression
TabularDataset (single flat table, TabularTask)Flat pipeline — no DFS, no cross-table joins. The table is fed to ICL as-is.binary_classification, multiclass_classification, regression, forecasting

Only TabularDataset supports forecasting — there is no relational forecasting path (RelationalDataset has no analogous _forecast() handling), and neither dataset kind supports multilabel_classification or link prediction with ICLEstimator.

NameTypeDescriptionOptional
connectorSnowflakeConnectorThe connector object used for sending requests to the engine.No
configICLConfigConfiguration object containing inference knobs. Defaults to ICLConfig().Yes

An instance of the ICLEstimator class.

from relationalai_predictive import ICLEstimator, ICLConfig
model = ICLEstimator(connector=connector, config=ICLConfig())
job = model.predict(relational_dataset)
from relationalai_predictive import ICLEstimator, ICLConfig, TabularTask, TabularDataset, TaskType
task = TabularTask(
name="sales_forecast",
task_type=TaskType.FORECASTING,
label_column="sales",
context_table="DATABASE.SCHEMA.SALES_CONTEXT",
test_table="DATABASE.SCHEMA.SALES_TEST",
time_column="date",
prediction_length=12,
max_context_length=64,
)
dataset = TabularDataset(connector=connector, name="sales", task=task)
model = ICLEstimator(connector=connector)
job = model.predict(dataset)