Artificial Intelligence and Machine Learning Blogs
Explore AI and ML blogs. Discover use cases, advancements, and the transformative potential of AI for businesses. Stay informed of trends and applications.
cancel
Showing results for 
Search instead for 
Did you mean: 
MarioDeFelipe
Contributor

In today's fast-paced digital landscape, businesses are increasingly turning to artificial intelligence (AI) to gain a competitive edge. SAP has recognized this trend and has developed a suite of powerful SDKs (Software Development Kits) to help organizations seamlessly integrate AI capabilities into their applications and workflows. In this blog post, we will explore the different SAP AI SDKs, their functionalities, and the value they bring to customers and if I miss any of them, let me know!

 

SAP AI Core SDK

 

The [SAP AI Core SDK](https://pypi.org/project/ai-core-sdk/) is a Python-based SDK that allows developers to access and interact with the SAP AI Core service using Python methods and data structures. This SDK provides a comprehensive set of tools to manage AI scenarios and workflows within SAP AI Core.

 

AI Core Key Features
Scenario ManagementCreate, update, and manage AI scenarios and executables.
Workflow ExecutionExecute pipelines as batch jobs for tasks such as preprocessing, training models, or performing batch inference.
Model DeploymentDeploy trained machine learning models as web services to serve high-performance inference requests.
Infrastructure IntegrationRegister Docker registries, synchronize AI content from Git repositories, and register object stores for training data and models.
Metrics TrackingLog and track metrics within workflow executions for monitoring and analysis.

 

The SAP AI Core SDK simplifies the development process by providing a unified interface to interact with SAP AI Core. This enables developers to focus on building and deploying AI solutions without worrying about the underlying infrastructure complexities.

Captura de pantalla 2024-03-18 a las 16.11.57.png

 Key GitHub repositories that leverage the SAP AI SDKs:

[SAP-samples/ai-core-samples](https://github.com/SAP-samples/ai-core-samples)

 

This repository contains sample code and examples of the SAP AI Core SDK that can be used to interact with SAP AI Core. It demonstrates how to create clients, manage resource groups, track metrics during training, and deploy inference services.

[SAP-samples/azure-openai-aicore-cap-api](https://github.com/SAP-samples/azure-openai-aicore-cap-api)

This repository shows how to deploy an inference service on SAP AI Core that acts as a proxy for Azure OpenAI Services. It leverages the SAP AI Core SDK to create and manage the necessary resources.

[SAP-samples/aicore-multioutput-regression-restaurant-inspections](https://github.com/SAP-samples/aicore-multioutput-regression-restaurant-inspections)

This repository demonstrates a machine learning service that leverages the capabilities of SAP BTP (SAP AI Core and SAP AI Launchpad) for criticality assessments, likely using the SAP AI Core SDK.

[SAP-samples/teched2023-AI269](https://github.com/SAP-samples/teched2023-AI269)

This repository contains materials for a TechEd session on prompt engineering with the SAP Generative AI Hub, suggesting the use of the SAP Generative AI Hub SDK.

[SAP-samples/teched2023-AI266](https://github.com/SAP-samples/teched2023-AI266)

This repository provides a hands-on lab for working with SAP AI Core and SAP AI Launchpad, likely leveraging the SAP AI Core SDK and AI API Client SDK.

These repositories cover various use cases, such as interacting with SAP AI Core, deploying inference services, leveraging generative AI models, and integrating with other services like Azure OpenAI. They serve as valuable resources for developers looking to leverage the capabilities of SAP's AI SDKs in their projects.

AI API Client SDK

The [AI API Client SDK](https://pypi.org/project/ai-api-client-sdk/) is a Python library that allows developers to interact with the AI API, a standardized interface for managing the AI scenario lifecycle across different runtimes, including SAP AI Core and other partner technologies.

 

AI API Client Key Features
Scenario Lifecycle ManagementCreate, update, and manage AI scenarios, executables, and configurations.
Execution ManagementTrigger and monitor AI workflow executions
Model ManagementDeploy, update, and undeploy machine learning models for serving inference requests.
Runtime Agnostic

Interact with AI scenarios across multiple runtimes, including SAP AI Core and partner technologies.

The AI API Client SDK provides a consistent and unified way to manage AI assets, regardless of the underlying runtime environment. This abstraction layer simplifies the development process and promotes portability, allowing organizations to leverage AI capabilities across different platforms and technologies.

 

SAP Generative AI Hub SDK

 

The [SAP Generative AI Hub SDK](https://pypi.org/project/generative-ai-hub-sdk/) is a Python library that enables developers to interact with the SAP Generative AI Hub, a platform that provides access to a broad range of large language models (LLMs) from various providers, such as GPT-4 by Azure OpenAI or open-source models like Falcon-40b.

 

Generative AI Hub Key Features
LLM Access Submit prompts to multiple LLMs and compare the generated outcomes to identify the best-suited model for a given task.
Prompt Engineering Leverage tooling for prompt engineering, experimentation, and other capabilities to accelerate the development of applications infused with generative AI.
Prompt History Gain greater control and transparency with built-in prompt history tracking.
Secure and Trusted Access LLMs in a secure and trusted environment, ensuring compliance and data privacy.

 

The SAP Generative AI Hub SDK empowers developers to harness the power of generative AI, enabling them to create innovative applications that leverage the capabilities of state-of-the-art language models while maintaining control, transparency, and compliance.

Captura de pantalla 2024-03-18 a las 16.13.38.png

 

[SAP-samples/btp-generative-ai-hub-use-cases](https://github.com/SAP-samples/btp-generative-ai-hub-use-cases)

This repository contains samples on how to build industry solutions leveraging generative AI capabilities on top of SAP BTP, integrated with SAP S/4HANA Cloud. It likely utilizes the SAP Generative AI Hub SDK.

 

AI Core LLM

The [AI Core LLM](https://pypi.org/project/sap-ai-core-llm/) is a Python library that provides a unified interface for interacting with large language models (LLMs) deployed on SAP AI Core. This SDK abstracts away the complexities of working with different LLM providers and models, allowing developers to focus on building applications that leverage the power of language models.

 

AI Core LLM Key Features
LLM Integration Seamlessly integrate LLMs from various providers, such as OpenAI, Anthropic, and others, into your applications.
Unified Interface Interact with different LLMs using a consistent and standardized API, simplifying development and promoting code reusability.
Prompt Management Manage and version-control prompts, enabling efficient collaboration and reproducibility.
Monitoring and Logging Monitor and log LLM interactions for auditing, debugging, and performance analysis.

The AI Core LLM SDK streamlines the development process by providing a unified interface for working with LLMs, enabling developers to leverage the power of language models without being tied to specific providers or models.

MarioDeFelipe_0-1710770775666.png

Conclusion

SAP's suite of AI SDKs empowers organizations to unlock the full potential of artificial intelligence and seamlessly integrate AI capabilities into their applications and workflows. From managing AI scenarios and workflows to deploying machine learning models and leveraging the power of generative AI, these SDKs provide a comprehensive set of tools and utilities to accelerate AI adoption and drive innovation.

Citations

https://github.com/SAP-docs/sap-artificial-intelligence/tree/main

https://pages.community.sap.com/topics/ai-core-artificial-intelligence

https://community.sap.com/t5/technology-blogs-by-members/unleashing-the-power-of-sap-ai-launchpad-am...

https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/libraries-and-sdks

https://community.sap.com/t5/technology-blogs-by-sap/what-s-new-in-sap-ai-core-sap-ai-launchpad-in-q...

https://community.sap.com/t5/technology-blogs-by-members/understanding-generative-ai-core-concepts/b...

https://help.sap.com/docs/sap-ai-core

https://www.linkedin.com/pulse/sap-ai-core-sridevi-aduri-ibhxc

https://api.sap.com/package/SAPAICore/overview

https://discovery-center.cloud.sap/serviceCatalog/sap-ai-core

https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/about-ai-api

https://community.sap.com/t5/artificial-intelligence-and-machine-learning-blogs/sap-ai-core-sap-ai-l...

https://github.com/SAP-samples/ai-core-samples

https://learning.sap.com/learning-journey/learning-how-to-use-the-sap-ai-core-service-on-sap-busines...

https://developers.sap.com/tutorials/ai-core-helloworld.html

https://github.com/SAP-samples/btp-generative-ai-hub-use-cases

https://github.com/SAP-samples/aicore-multioutput-regression-restaurant-inspections/blob/main/missio...

https://github.com/SAP-samples/btp-generative-ai-hub-use-cases/activity

https://github.com/SAP-samples/azure-openai-aicore-cap-api

https://github.com/appintheair/api-ai-android-sdk

https://github.com/SAP-samples/btp-generative-ai-hub-use-cases/actions

https://github.com/SAP-samples/kyma-runtime-extension-samples

https://github.com/gregorwolf/bookshop-demo/blob/main/package.json

MarioDeFelipe_0-1710770775666.png

6 Comments
thomas_mller13
Participant

So SAP AI Core is actually not an AI core but an API in order to use AI functions? Can I e.g. design and train my own neural network with the help of SAP AI Core?

MarioDeFelipe
Contributor
0 Kudos

Hi @thomas_mller13 

No, your "own neural network." You can deploy and train third-party, open-source, and closed-source neural networks on AI Core.

You must use HANA Cloud machine learning services to build/train your own model. You can later deploy that model on AI Core next to the other models you want to have running on BTP.

Mario

 

thomas_mller13
Participant
0 Kudos

So, I have to have HANA cloud in order to use NN? In my on premise version I only have the PAL. And PAL does not provide NN. I.E. there is already a difference between HANA Cloud and HANA on premise?

 

Thomas

MarioDeFelipe
Contributor

Hi @thomas_mller13 

No, you don't have to have HANA Cloud to use Neural Networks; you leverage HANA Cloud it to build your own regression/classification algorithm. If your model is built using the SAP HANA Python ML client and libraries like PAL or APL, you can deploy it with SAP HANA Cloud is available in your HANA on prem, or HANA Cloud.

SAP AI Core allows you to train and inference ML models. SAP AI Launchpad is used in conjunction with SAP AI Core to manage the AI runtimes and allow users o access and manage their AI scenarios

If you have an open source model, lets say a LLama model, you use BTP Cloud Foundry environment to deploy a Flask-based Python application with your trained LLama model , or you can use the Kyma runtime on SAP BTP which provides a runtime Kubernetes-based environment to deploy the LLama as containerized microservices, all this on AI Core.

So, answering your question, if you have on-prem and you build your own model using PAL, bring it to BTP and consume it from there. Or call it from BTP to your on-prem HANA server if you want to run it from on-prem HANA.

HANA Cloud introduced PAL later than HANA on-prem. PAL was not initially available in SAP HANA Cloud when it first launched. In contrast, PAL has been available in SAP HANA 2 on-premise for a while. 

In SAP HANA Cloud, the script server needs to be enabled at the tenant level to use PAL functions, similar to the on-premise SAP HANA, where PAL is part of the SAP HANA Application Function Library that needs to be installed separately. 

thomas_mller13
Participant
0 Kudos

I understand partly. PAL can be used directly from ABAP. Why should I use all that complicated stuff? Maybe it is more useful for open source models designed in python?

Thx.

MarioDeFelipe
Contributor
0 Kudos

Hi @thomas_mller13 . Yes, apologies if all this is complicated. Just imagine I tell you AI Core is the successor of Leonardo ML Foundation and would totally confuse all this.

PAL is on HANA, so SQLScript is there, but you call PAL from ADMP, which is ABAP-based. You will find more information on how to create an ML model on Tensorflow or Pytorch; the development of these platforms is more advanced due to their higher usage. But even though I am not a data scientist, I find PAL really good with HANA structured data, whereas the other libraries are not good for HANA tables. Just there. Don't expect to build an LLM on HANA. Well, unless we get a surprise from Philipp 🙂