| [NEW] We have just released a new and improved SAP-RPT-1.5 model. Read more about it in our latest blog post. |
SAP-RPT-1.5 is now generally available, so let’s put it to some good work! This step-by-step walkthrough will take you from zero to your first successful inference so let’s get started!
Prerequisites
To get access to the model variants, you will first need to have a working AI Core instance under the extended plan (see SAP Note on region availability). We generally recommend the use of AI Launchpad alongside your AI Core instance and you can follow the here to get started with SAP generative AI hub.
Deploy SAP-RPT-1.5
Note: This guide only covers the UI flow on SAP AI Launchpad. You can also deploy the model via the existing AI APIs from AI Core. Refer to the help guide for more details.
Using AI Launchpad, you will find the 2 model variants of SAP-RPT-1.5 in the Model Library within generative AI hub.
Select your desired model variant and you should see a Deploy button on the model page. Click Deploy to start a model deployment (See ①). Once the deployment is created, you will see that the count increases by 1 (See ②).
Deploying the model will take a few minutes. You can monitor the progress via the Deployments tab.
First Predictions with SAP-RPT-1.5
Once the model has been deployed, you should see that a deployment URL is now available.
To make predictions, you will need to post requests to the provided deployment URL. The table below summarises the key details:
| URL | <deployment url>/predict |
| Method | POST |
| Headers | Refer to the help guide for the header requirements |
| Request Payload | See the next section |
Request Payload
Given an example where you would like to the price and the cost center of products. You can mark the fields that you want to predict with a configurable placeholder value, for instance, [PREDICT]. Here is how the request payload looks like when using the /predict endpoint for the given example.
{
"prediction_config": {
"target_columns": [
{
"name": "COSTCENTER",
"prediction_placeholder": "[PREDICT]",
"task_type": "classification"
},
{
"name": "PRICE",
"prediction_placeholder": "[PREDICT]",
"task_type": "regression"
}
],
"explanations": {
"top_column_scores": 3,
"top_relevant_context_rows": 2
}
},
"index_column": "ID",
"rows": [
{
"PRODUCT": "Couch",
"PRICE": "[PREDICT]",
"ORDERDATE": "28-11-2025",
"ID": "35",
"COSTCENTER": "[PREDICT]"
},
{
"PRODUCT": "Office Chair",
"PRICE": 150.8,
"ORDERDATE": "02-11-2025",
"ID": "44",
"COSTCENTER": "Office Furniture"
},
{
"PRODUCT": "Server Rack",
"PRICE": 210.0,
"ORDERDATE": "01-11-2025",
"ID": "108",
"COSTCENTER": "Data Infrastructure"
},
{
"PRODUCT": "Server Rack",
"PRICE": "[PREDICT]",
"ORDERDATE": "01-11-2025",
"ID": "104",
"COSTCENTER": "[PREDICT]"
},
...
],
"data_schema": {
"PRODUCT": {
"dtype": "string"
},
"PRICE": {
"dtype": "numeric"
},
"ORDERDATE": {
"dtype": "date"
},
"ID": {
"dtype": "string"
},
"COSTCENTER": {
"dtype": "string"
}
}
}| [NEW] SAP-RPT-1.5 comes with a new explainability feature which can now provide you with more insights into how the model arrived at its predictions. You can enable explainability by adding an explanations configuration to the prediction_config parameter in the request. |
You can refer to the help guide for all available parameters in the request payload. You can also provide the context rows in row-wise format (as seen in the example above) or in column-wise format.
We would recommend that you specify the data_schema of your context data wherever possible, so that the value in each column is parsed correctly. In the case where the schema is not provided, the model will attempt to infer the data types of the columns. Do note that the model can only accept YYYY-MM-DD and YYYYMMDD for the date type.
Response Payload
Upon sending this request to SAP-RPT-1.5, the model will return the predictions for the marked fields. Here is how the response payload looks like when using the /predict endpoint for the given example.
{
"id": "a45971e6-a0c7-447b-a641-b0a4dea54a91",
"status": {
"code": 0,
"message": "ok"
},
"predictions": [
{
"COSTCENTER": [
{
"prediction": "Office Furniture",
"confidence": 0.52
}
],
"PRICE": [
{
"prediction": 195.09017944335938,
"confidence_interval": [
191.4201023,
198.7602565
]
}
],
"ID": "35"
},
{
"COSTCENTER": [
{
"prediction": "Data Infrastructure",
"confidence": 1.0
}
],
"PRICE": [
{
"prediction": 209.38052368164062,
"confidence_interval": [
198.182501013,
220.57854635
]
}
],
"ID": "104"
}
],
"explanations": {
"top_column_scores": [
{
"PRODUCT": 0.08,
"ORDERDATE": 0.03
},
{
"PRODUCT": 0.07,
"ORDERDATE": 0.02
}
],
"top_relevant_context_rows": [
[
3,
4,
1
],
[
2,
1,
4
]
]
},
"metadata": {
"num_columns": 5,
"num_rows": 2,
"num_predictions": 4,
"num_query_rows": 2
}
}| [NEW] If you have enabled the explainability feature in the request payload, you will see that there is an additional explanations object in the response payload. Do note that the column scores and relevant context rows provided are based on model internals and do not imply causality. They may be inaccurate for small-data inputs and are not perfect. |
You can refer to the help guide for all available parameters in the response payload.
Using SAP-RPT-1.5 in your Use Cases
SAP-RPT-1.5 comes in two variants, SAP-RPT-1.5 and SAP-RPT-1.5-large (refer to our model card for more detailed specs). SAP recommends using the RPT-1.5 variant for medium-complexity problems, where low inference latency is crucial. Our internal testing shows that for many real-world use cases, SAP-RPT-1.5 yields predictions in less than a second. Depending on the number of columns as well as the intrinsic complexity of the use case, we found that a context of 500 – 2000 rows can be sufficient in many cases to yield best-in-class prediction quality.
For very complex use cases and with a large number of columns influencing predictions, larger context window sizes can be required to achieve highest quality predictions. For these cases, we recommend SAP-RPT-1.5-large, which accepts up to 64000 (65536) context rows and up to 256 columns. This model is built to achieve highest accuracy predictions for complex enterprise use cases. Runtime of this model is typically somewhat longer than for SAP-RPT-1.5 – our own internal tests show that many use cases complete within 2 – 8 seconds [1]. For a balanced trade-off between prediction quality, latency and costs, starting with 4000 – 8000 context rows were found by our engineers to work well for many use cases.
[1] Please note that these runtimes are merely an indication based on SAP’s own tests. Actual runtimes may vary depending on the exact use case and chosen modeling, so customers are advised to perform their own testing in a production-like setting.
Finding the Right Context
Users who are familiar with narrow AI models regularly ask what they should do if they have a tabular prediction problem where many 100,000s or millions of rows of labelled data are available.
As narrow AI models perform a training step, where they look at context data typically sequentially, they can easily consider millions of rows one-by-one – it just makes model training take longer. While on the other hand, foundation models like SAP-RPT-1.5 have a limited context window size. So, isn’t this a severe limitation of foundation models – particularly in enterprise settings where large volumes of data are common?
It turns out that it’s not, at least not in practice. Due to its efficient design and large-scale pre-training, we found that with only 1000 or 2000 rows, SAP-RPT-1.5 can outperform traditional narrow AI models that have been trained on millions of rows for the same use case. Here, we invite you to learn more about relational pre-trained transformers, their stunning performance and other benefits in our tech blog post on SAP-RPT.
So now the question becomes: how do you pick the right context rows (say, 2000 for the RPT-1.5 variant) for your use case? The answer is simple and somewhat surprising: most often, it doesn’t matter much in practice. If there are 200,000 rows of labelled training data and you simply pick 2000 rows at random, our experiments indicate that this is sufficient to achieve best-in-class performance for most enterprise use cases.
Understandably, there are edge cases where we would recommend slightly more diligent approaches to select the right context data. Such cases include classification use cases with a high number of target classes and use cases that show strong data drift. Some suggested approaches would be to apply stratified sampling to ensure all target classes are represented, and sampling with a bias for recency.
With that said, we are working on providing tooling to make context selection even simpler and integrated into your data landscape, so stay tuned! But for now, we recommend you start simple and see for yourself how in-context learning with a limited number of rows can boost performance of your tabular enterprise AI use cases.
Ready to Try SAP-RPT-1.5?
To jumpstart your journey, we have prepared a comprehensive with sample requests that you can use right away. Simply download the collection from our repository and customise it with your context data.
What’s Next
We are continuously working to improve your developer experience. for AI, allowing your developers to seamlessly integrate the model into their applications with just a few lines of code. Stay tuned for more updates!
We are excited to see what you will build with SAP-RPT-1.5. Get started today, and do not hesitate to share your feedback and use cases with us. Your insights can help shape the future of our AI offerings.
Happy building! 🚀