Build Your First SAP Gen AI Model with SAP AI Launchpad in Just 10 Minutes!
In this blog, we’ll explore how to get started with SAP’s GenAI framework. It involves setting up of SAP AI Core and SAP AI Launchpad, and we will test the foundation model based on ChatGPT.
Let’s dive into setting up SAP AI Core and AI Launchpad
Step 1: Provision SAP AI Core in your SAP BTP Global Account.
We’ve a free tier account(not the trial). A free tier account is needed to use SAP AI Core.
Logon to SAP BTP Account and navigate to subaccount. My subaccount name is Zequance AI Trial.
Get a free tier account, if you’re new to SAP BTP please watch this video.
Click on Entitlements on the left pane.
Under manage assignments click on edit to add a service plan.
Then click on Add service plans.
Search “sap ai” and choose SAP AI Core. Then, choose Free Tier and Extended plan.
Click on Add 2 service plan.
Note: A free-tier account is required. SAP AI Core will not be available under plans if you’re using a 90-day trial account. Additionally, remember to save your changes after adding services.
Now under entitlements you will be able to see SAP AI Core as shown below.
Step 2: Select Boosters from the navigation pane on the left, then choose the booster for SAP AI Core.
Click on Start.
Once Checking is done, click on Next.
If you have a subaccount already, choose select subaccount.
Click on Next.
Click on Finish.
Step 3: The next step is to create keys. In the SAP BTP Cockpit, go to the Subaccounts section, select Services from the left-hand menu, and then click on Instances and Subscriptions.
To create the keys needed to access your instance, click the three dots and select Create Service Key.
Enter a service key name, for example “Booster” and click on Create.
Step 4: Next, run the booster for SAP AI Launchpad. Select Boosters from the navigation pane, then choose the booster for SAP AI Launchpad from the list.
Click start.
Once checking is completed , click on Next.
Choose select subaccount and click on Next.
Click on Next.
Click on Finish.
Step 5: Click on Instances and Subscriptions from Subaccounts.
Next, click on Go to Application. It will open the SAP AI Launchpad.
Step 6: Next configure AI API Connnection.
From the AI Launchpad screen click on Add.
We need to copy and paste the keys that we have created earlier in the step 3 to AI API Connection in Launchpad as given below. Then click on Create.
Step 7: Checking for foundation-models scenario.
Expand ML Operations in left pane and click scenarios.
There you will find foundation-models.
Step 8: Creating a configuration.
Navigate to ML Operations and then select Configurations.
- Provide a name for the configuration.
- Select the foundation-models scenario.
- Choose the version.
- Select the Executable ID.
In Input Parameters, give name and version of the model you want to use. We’re using GPT models. Then, click Next.
Next, click Create.
Step 9: Create a deployment. To make LLM available for use we’ve to create a virtual LLM deployment.
Once the configuration is complete, click on Create Deployment.
Choose Standard duration, and click on Review.
Click on Create.
After creating the deployment, wait until its status is updated to Running.
Step 10: Testing the models using Prompt Management functionality.
Navigate to Generative AI Hub>Prompt Management.
Now we cant Test the models in different approaches.
Text Summarization:
This example tasks the LLM to summarise a given text. We’re provided it with a long text and got a summary in 30 words as requested.
Question Answering:
In this test. we’ve asked the difference between SAP AI Core and the AI Launchpad. The answers we’ve got a perfecto!
Sentiment Analysis:
And finally we wanted to check if the LLM can identify sentiment of a text.
The LLM was asked to assess the sentiment for the below text, and it was successful in identifying the “positive” sentiment mentioned in the text.
Congrats! you’ve now successfully built an SAP Foundation Model and tested it using the AI tools SAP AI Core and SAP AI Launchpad.