SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Strategic Prediction with SAP RPT-1: A Comprehensive Guide

In this tutorial, you will learn how to use SAP RPT-1 — SAP's Relational Pretrained Transformer — to run regression and classification predictions on structured business data

Overview

🎓 beginner 45 min. SAP Ai CoreBeginnerArtificial IntelligenceMachine Learning
Smita Naik S Smita Naik July 2, 2026
Created by May 18, 2026
Contributors

Prerequisites

Prerequisites

  1. 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
  2. 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
  3. 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
  4. 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
  5. AI Core Setup Guide Step-by-step guide to set up and get started with SAP AI Core: AI Core Setup Tutorial
  6. An Extended SAP AI Core service plan is required. For more details, refer to SAP AI Core Service Plans
  7. AI Launchpad Setup Guide Step-by-step guide to set up AI Launchpad: AI Launchpad Tutorial
  8. Bruno API Client Download Bruno from usebruno.com/downloads
  9. 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
  10. 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.

Steps

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:

VariantAccessBest For
sap-rpt-1-smallSAP Gen AI HubPrototyping, high-volume, cost-sensitive workloads
sap-rpt-1-largeSAP Gen AI HubProduction deployments requiring highest accuracy

Key capabilities at a glance:

FeatureWhat It Means
No model trainingSend data, get predictions — no pipeline, no wait
Multi-target predictionUp to 10 target columns predicted in one API call
index_columnMaps each prediction back to its source row reliably
Missing data resilienceHandles nulls and incomplete rows — no imputation needed
Semantic column awarenessDescriptive column names improve prediction accuracy
Ephemeral data processingData 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/rpt package is experimental and subject to change. Do not use in production.

Refer to the SAP RPT-1 documentation for complete API reference information.

Step 1 The Dataset Used in This Tutorial

This tutorial uses a single local CSV file. Two prediction targets are demonstrated simultaneously in one API call.

You can access the DATASET from the GitHub repository.

NOTE: If you download the ZIP file, extract it and navigate to the DATA folder. Place the file in your designated location for further use.

Payment Transaction Dataset — column reference:

ColumnRole
Transaction IDIndex column — unique row identifier
Customer ID, Customer Type, Industry, RegionFeature columns
Currency, Invoice Amount, Due Days, Credit LimitFeature columns
Outstanding, Credit Usage, Relationship YearsFeature columns
Previous Delays, Avg Days Late, Payment MethodFeature columns
Economic Indicator, Quarter, Contact AttemptsFeature columns
Has Dispute, Dispute AmountFeature columns
Days LateRegression target — numeric prediction
Risk ScoreClassification target — category label + confidence

Rows where a target column contains [PREDICT] are the prediction rows. All other rows with known values act as context rows that teach the model the pattern.

Sample rows from the dataset:

Code
Transaction ID    Customer Type    Industry    Region           Currency    Invoice Amount    Days Late    Risk Score
TXN AZT67X0T      Small Business   Education   Middle East      USD         30214.02          [PREDICT]    [PREDICT]
TXN SY4HFYMZ      Individual       Healthcare  Middle East      USD         1045.84           14           Medium
TXN RWO7A9Z2      Small Business   Education   Europe           GBP         17920.85          10           Low
TXN C18O8PW7      Small Business   Education   Europe           GBP         12768.45          [PREDICT]    [PREDICT]

Note: Rows with known Days Late and Risk Score values are context rows — the model learns from these. Rows marked [PREDICT] are the prediction rows the model will fill in.

Step 2 Companion Notebooks
+
Step 3 Deploy SAP RPT-1
+
Step 4 Prepare the Parquet File
+
Step 5 Run Predictions Using SAP RPT-1
+
Step 6 Context Row Best Practices
+
Step 7 Troubleshooting
+
Step 8 Summary
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 8
1. The Dataset Used in This Tutorial 2. Companion Notebooks 3. Deploy SAP RPT-1 4. Prepare the Parquet File 5. Run Predictions Using SAP RPT-1 6. Context Row Best Practices 7. Troubleshooting 8. Summary

Learn more →