SAP-RPT — How the Relational Pretrained Transformer Works (Architecture)
As of 2026-10-10
What is SAP-RPT?
SAP-RPT predicts by in-context learning: the known rows you send are its training set for that call. Its ConTextTab lineage adds semantics — language-model embeddings of column names and values, modality-specific encodings, pretraining on real tables — to a table-native design; context selection is the main accuracy lever.
SAP-RPT (Relational Pretrained Transformer) belongs to a young class of models, tabular foundation models, that do for tables what large language models did for text: one pretrained network that adapts to a new task at inference time instead of being trained for it. This page explains the mechanics — what happens inside a prediction call and why the design choices matter for accuracy. Versions, access, API limits and pricing are covered in C165.
The core mechanism: in-context learning on a table
A classical model is trained once per task: you fit XGBoost on historical invoices, then score new invoices. SAP-RPT inverts this. Its weights are fixed after pretraining; the "training data" for your task travels inside each request. You send context rows, whose target value is known, and query rows, whose target cell holds a placeholder. The model reads the whole table at once and, for every query row, infers the target from the relationships it observes between columns and between the query row and the context rows. No gradient update happens. This is in-context learning (ICL), the same principle that lets an LLM follow a few examples in a prompt — applied to rows and columns instead of words.
Two consequences follow. First, the prediction is a function of the context you choose: change the context rows and the answer can change, exactly as a few-shot prompt changes an LLM's answer. Second, there is no model artefact to retrain when the data drifts — you refresh the context instead.
Why it matters
- Because the context is the training set, data preparation shifts from feature engineering to context curation — the skill that decides RPT accuracy in a project.
- Understanding joint multi-target prediction and context sensitivity prevents 'the model is unstable' escalations when results change with the rows sent.
- The semantic, real-data design explains why RPT targets ERP tables full of codes and short texts, and where TabPFN, TabICL or gradient boosting may still win.
Key points
- In-context learning: weights are frozen; each request carries context rows (known target) and query rows ([PREDICT]); no gradient update happens.
- ConTextTab lineage (arXiv 2506.10707, NeurIPS 2025 spotlight): table-native ICL plus semantics — modality-specific embeddings and language-model embeddings of column names and cell values.
- Pretrained on real-world tables (T4, derived from TabLib, per the OSS model card), unlike synthetic-prior models such as TabPFN.
- Up to ten targets are predicted jointly, so results can differ from separate single-target calls.
- Accuracy is steered by context: size, deep context mode (large model, >8,000 rows) and selection strategy (random vs heuristic) in tabular orchestration.
- The commercial API hides the OSS knobs (context size, bagging) behind a managed service, but the same accuracy/latency/cost trade-off applies — deep context mode is the commercial analogue of a larger context plus bagging.
- Context is the model's only per-call 'training data': version it, screen it for target leakage and class coverage, and re-run known-answer context ablation whenever the business population shifts.
Terms used on this page
- In-context learning (ICL)
- Adapting to a task at inference time from examples placed in the model input, without updating weights.
- Context rows / query rows
- Rows with a known target that act as the per-call training set, and rows whose target is replaced by [PREDICT].
- ConTextTab
- SAP research model (arXiv 2506.10707) combining table-native ICL with semantic embeddings and real-world training data; the design basis referenced for SAP-RPT.
- Modality-specific embedding
- Separate encoding of numeric, date and text cells so each data type is represented in a suitable way.
- Bagging (in ICL)
- Running several predictions over different context samples and aggregating them; exposed as a setting in SAP-RPT-1-OSS.
- Heuristic context selection
- Tabular orchestration strategy that picks the context rows most similar to the query rows; the alternative is random sampling.
Sources
- arXiv — ConTextTab: A Semantics-Aware Tabular In-Context Learner (2506.10707, NeurIPS 2025 spotlight)
- Hugging Face — SAP/sap-rpt-1-oss model card (architecture, training data, context/bagging settings, license)
- SAP — SAP-RPT product page (FAQ: in-context learning, orchestration, observability)
- SAP Help — SAP-RPT-1.6 (joint multi-target prediction, context mode, recommended context sizes)
- SAP Help — SAP-RPT-1.5 model specifications
- SAP Community — SAP-RPT-1.6, Tabular Orchestration and RPT Playground API (context selection strategies)
- GitHub — SAP-samples/sap-rpt-1-oss (install, SAP_RPT_OSS_Classifier / Regressor, max_context_size, bagging)
- arXiv — TabICL: A Tabular Foundation Model for In-Context Learning on Large Data (2502.05564)
- Wikipedia — TabPFN (prior-data fitted networks, version history)
- SAP Architecture Center — Predictive & Tabular AI (golden path)
- Prior Labs — TabPFN 3.5 changelog (neighbouring architecture, in-context tabular family)
- SAP Community — Prior Labs' TabPFN-3.5-Plus Is Available Now in SAP AI Core
- SAP News Center - SAP Connect keynote: autonomous enterprise in action (7 Oct 2026)
Full card available to members. What the full card adds: the full decision framework · the SAP vs Snowflake / Databricks / Fabric comparison · the common pitfalls and their fix · the cheat sheet · the architecture schemas · the code blocks · the facts worth quoting.
Guides that answer with this page
These guides cite this page as one of the sources their answer rests on.