Skip to content

A repository containing examples of AI paradigm implementations following best practices when building AI solutions with SAP services and products.

License

Notifications You must be signed in to change notification settings

SAP-samples/sap-btp-ai-best-practices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

SAP BTP AI Best Practices

For comprehensive documentation related to this code: SAP BTP AI Best Practices

Description

This repository provides a comprehensive collection of best practices and sample implementations for AI-powered applications on SAP Business Technology Platform (BTP). It serves as a practical guide for developers looking to implement enterprise-grade AI solutions using SAP's AI services and integration with generative AI models.

The examples provided demonstrate how to:

  • Securely access generative AI models
  • Implement content filtering for AI-generated outputs
  • Apply data masking for PII protection
  • Create effective prompt templates
  • Build retrieval-augmented generation (RAG) systems

Each best practice includes code samples in multiple programming languages (TypeScript, Python, Java, CAP) to support various technology stacks and development approaches.

Requirements

  • SAP Business Technology Platform account
  • Access to SAP AI Core service

Download and Installation

  1. Clone the repository:

    git clone https://github.tools.sap/btp-ai-best-practices/sap-btp-ai-best-practices.git
    cd sap-btp-ai-best-practices
  2. Follow the setup instructions in the README of each specific best practice directory.

    For example, to run the TypeScript example for accessing generative AI models:

    cd best-practices/access-to-generative-ai-models/typescript
    npm install
    cp .env.example .env
    # Edit the .env file with your service key
    npm start

Repository Structure

sap-btp-ai-best-practices/
├── best-practices/               # Best practices implementations
│   ├── access-to-generative-ai-models/
│   ├── content-filtering/
│   ├── data-masking/
│   ├── prompt-templating/
│   ├── vector-rag-embedding/
│   └── vector-rag-query/
└── use-cases/                    # End-to-end use case implementations

For a detailed overview of available best practices, see the best practices directory.

Known Issues

No known issues.

How to obtain support

Create an issue in this repository if you find a bug or have questions about the content.

For additional support, ask a question in SAP Community.

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

License

Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

About

A repository containing examples of AI paradigm implementations following best practices when building AI solutions with SAP services and products.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •