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

Orchestration(V2) with Grounding Capabilities in SAP AI Core

This tutorial provides a step-by-step guide to setting up document grounding, creating pipelines, and utilizing vector APIs for facility management. In our use case, we use facility management emails uploaded to AWS S3 as grounding documents. This enables precise retrieval of relevant information, supporting efficient query resolution and service request handling. Follow this guide to streamline facility-related insights and response processes.

Overview

🎓 beginner 45 min. SAP Ai CoreBeginnerArtificial IntelligenceMachine Learning

You will learn

  • How to set up orchestration pipelines, enable document grounding, and perform vector retrieval using SAP AI Core’s grounding capabilities
Smita Naik S Smita Naik March 5, 2026
Created by February 13, 2026
Contributors

Prerequisites

Prerequisites

  1. BTP Account
    If you do not already have a commerical 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, as the Generative AI Hub is not available in the Free or Standard plans. 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

Steps

Pre-read

In this tutorial, we explore how to extend orchestration capabilities in SAP AI Core by incorporating grounding — the process of enriching GenAI outputs with domain-relevant context to ensure accurate and reliable responses. Grounding addresses key challenges such as hallucinations and lack of specificity by connecting the model to external knowledge sources during inference.

In this tutorial we are covering:

  • How to create the Data Injestion Pipeline(pipeline API and vectore API options). You can choose either of these options based on the requirements
  • How to use Amazon S3 or Microsoft SharePoint as document repository.
  • How to retrieve and verify the content dynamically from uploaded documents.
  • How to configure and use grounding in orchestration. We are focusing on the grounding module usage, but in the consumption request you will also find optional modules such as data masking and content filtering and templating, model configuration are the mandatory modules in orchestration.
  • how to use the solution using SAP AI Launchpad, Python SDK, JavaScript, and API(Bruno Client).

Use Case: In our scenario, we use facility management emails uploaded to Microsoft SharePoint or Amazon S3 as grounding documents. The orchestration pipeline retrieves relevant content from these documents and enables context-aware question answering using retrieval-augmented generation (RAG).

For additional context, refer to:
🔗 Grounding in SAP AI Core (Help Portal)

Video links:

Overview of the tutorial steps:

img
img

Step 1 Create service key for AI Core instance

This step enables the foundational setup of the AI Core instance by creating a service key, which is crucial for accessing and managing the AI Core services in the development environment.

• Required service plan extended. You can follow steps in https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/enabling-service-in-cloud-foundry?locale=en-US to create an AI Core instance and service key in development environment. Ensure to choose service plan extended.

Download and import Bruno collection

This step prepares the workspace by importing pre-configured requests for easy interaction with AI Core services using Bruno collections.

• Download Bruno_config.json

• Navigate to Bruno Collections and upload the .json file to import collections

img
img

img
img

img
img

Set env variables

Environment variables centralize configuration settings required for seamless integration between your service key and the imported collection.

• Select the getToken query in the imported collection, click on No Environment, and configure the environment as canary-test.

img
img

img
img

• Set the values inside environment canary-test

  • Populate values from the service key into the following variables:
    • ai_auth_url
    • ai_api_url
    • client_id
    • client_secret

img
img

• Add a resource group name at resource_group

• Save the configuration and set the active environment to canary-test.

img
img

Step 2 Generate token
+
Step 3 Create/Update resource group to use grounding module
+
Step 4 Create generic secret
+
Step 5 Data Ingestion from Document Repositories via Pipeline API
+
Step 6 Data Ingestion of Chunks via Vector API
+
Step 7 Get Data Repository ID
+
Step 8 Retrieval Search Without Orchestration - Optional Step
+
Step 9 Get or create orchestration deployment
+
Step 10 Configure Grounding Module in Orchestration Workflow
+
Step 11 Run Orchestration with Prompt to Get Context-aware Response
+
Step 12 Conclusion
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 12
1. Create service key for AI Core instance 2. Generate token 3. Create/Update resource group to use grounding module 4. Create generic secret 5. Data Ingestion from Document Repositories via Pipeline API 6. Data Ingestion of Chunks via Vector API 7. Get Data Repository ID 8. Retrieval Search Without Orchestration - Optional Step 9. Get or create orchestration deployment 10. Configure Grounding Module in Orchestration Workflow 11. Run Orchestration with Prompt to Get Context-aware Response 12. Conclusion

Learn more →