Strategic Prediction with SAP RPT-1: A Comprehensive Guide
Prerequisites
- BTP Account
If you do not already have a commercial SAP Business Technology Platform (BTP) account, you can use BTP Advanced Trial.
Create a BTP Account - For SAP Developers or Employees
Internal SAP stakeholders should refer to the following documentation: How to create BTP Account For Internal SAP Employee, SAP AI Core Internal Documentation - For External Developers, Customers, or Partners
Follow this tutorial to set up your environment and entitlements: External Developer Setup Tutorial, SAP AI Core External Documentation - Create BTP Instance and Service Key for SAP AI Core
Follow the steps to create an instance and generate a service key for SAP AI Core. Ensure to use service plan extended:
Create Service Key and Instance - AI Core Setup Guide
Step-by-step guide to set up and get started with SAP AI Core:
AI Core Setup Tutorial - An Extended SAP AI Core service plan is required. For more details, refer to
SAP AI Core Service Plans - AI Launchpad Setup Guide
Step-by-step guide to set up AI Launchpad:
AI Launchpad Tutorial - Bruno API Client
Download Bruno from usebruno.com/downloads - SAP RPT-1 Sample Collection
Clone the official SAP RPT-1 Bruno collection from https://github.com/SAP-samples/aicore-genai-samples/tree/main/genai-sample-apps - Get Service Key
To obtain your service key:- Navigate to your BTP subaccount overview page.
- Navigate to your BTP service instance page and Click on the SAP AI Core instance to view the service key details.
- click the service key name to view it, then click Download to save it as creds.json to your local machine.
You Will Learn
- What SAP RPT-1 is, how it works, and when to use it
- How to deploy SAP RPT-1 using SAP AI Launchpad, Python SDK, and Bruno
- How to prepare your dataset and run regression and classification predictions simultaneously in a single API call
- How to run predictions programmatically using the Python SDK (
sap-ai-sdk-gen) - How to authenticate, build the request payload, and call the RPT-1 predict endpoint using Bruno REST API
Pre-Read
This tutorial provides a complete, practical guide to using SAP RPT-1 — SAP’s first enterprise relational foundation model — for structured business data prediction.
SAP RPT-1 is a Relational Pretrained Transformer model that delivers accurate predictive insights from structured business data using in-context learning, allowing users to provide data records to generate instant, reliable predictions without any model training.
The concept is straightforward: rather than training a new AI model for every business question, you send your existing data rows directly to the model. Rows with known values teach the model the pattern. Rows where you want a prediction are marked with [PREDICT]. The model fills them in — no pipeline, no training job, no waiting.
Unlike large language models that process text sequences, RPT-1 is designed to detect connections and dependencies across rows and columns using a table-native 2D attention scheme, with optimised processing for the unique semantics and data types found in business data.
RPT-1 supports two prediction task types — and both can be run on the same dataset in a single API call:
- Classification — predicts a category label and returns a confidence score (0–1) alongside each prediction. Examples: demand category, payment risk tier, sales group assignment.
- Regression — predicts a continuous numeric value. Examples: days late, forecast units, invoice amount.
SAP RPT-1 is available in three variants:
| Variant | Access | Best For |
|---|---|---|
sap-rpt-1-small | SAP Gen AI Hub | Prototyping, high-volume, cost-sensitive workloads |
sap-rpt-1-large | SAP Gen AI Hub | Production deployments requiring highest accuracy |
Key capabilities at a glance:
| Feature | What It Means |
|---|---|
| No model training | Send data, get predictions — no pipeline, no wait |
| Multi-target prediction | Up to 10 target columns predicted in one API call |
index_column | Maps each prediction back to its source row reliably |
| Missing data resilience | Handles nulls and incomplete rows — no imputation needed |
| Semantic column awareness | Descriptive column names improve prediction accuracy |
| Ephemeral data processing | Data is never stored or used to modify model weights |
When to use RPT-1:
- You have structured tabular data and need predictions without a training cycle
- Your data changes frequently and retraining a traditional model is costly
- You need multiple columns predicted simultaneously
- Audit trail and confidence scores matter for your use case
Limitations to be aware of:
- Exclusively for tabular data — does not process text, images, or audio
- Maximum 128 prediction rows per API call
- Classification supports up to 256 classes (
sap-rpt-1-small) or 1023 classes (sap-rpt-1-large) - Does not produce natural language explanations — pair with an LLM via Orchestration if narrative output is needed
By the end of this tutorial, you will have run your first regression and classification predictions using all four access methods: SAP AI Launchpad, Python SDK, Javascript SDK and Bruno (REST API).
⚠️ Beta notice: The
@sap-ai-sdk/rptpackage is experimental and subject to change. Do not use in production.
Refer to the SAP RPT-1 documentation for complete API reference information.