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

GenAI Grounding Evaluations with SAP AI Core

This guide describes how to use SAP AI Core Custom Evaluation to benchmark Large Language Models (LLMs) in a Retrieval-Augmented Generation (RAG) scenario, with a specific focus on groundedness evaluation.

Overview

🎓 beginner 45 min. SAP Ai CoreBeginnerArtificial IntelligenceMachine Learning

You will learn

  • βœ”How to configure a grounding evaluation workflow in SAP AI Core.
  • βœ”How to upload and manage RAG-based test datasets that include retrieved context.
  • βœ”How to define grounding-specific evaluation metrics for assessing LLM responses.
  • βœ”How to execute grounding evaluations and analyze the grounding results.
Smita Naik S Smita Naik April 1, 2026
Created by April 1, 2026
Contributors

Prerequisites

Prerequisites

  1. BTP Account
    Set up your SAP Business Technology Platform (BTP) account.
    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:
    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 tiers. For more details, refer to SAP AI Core Service Plans
  7. Orchestration Deployment Ensure at least one orchestration deployment is ready to be consumed during this process. Refer to this tutorial understand the basic consumption of GenAI models using orchestration.
  8. Basic Knowledge Familiarity with the orchestration workflow is recommended
  9. Install Dependencies Install the required Python packages using the requirements.txt file provided. Download requirements.txt

πŸ’‘ Right-click the link above and choose “Save link as…” to download it directly.

Below are the Steps to Run a GenAI Evaluation in SAP AI Core

Steps

In RAG-based enterprise applications, model responses must be grounded in trusted data sources such as enterprise documents, knowledge bases, or curated repositories. SAP AI Core’s evaluation capabilities allow you to systematically measure grounding quality, retrieval relevance, and alignment of generated responses with source content.

Step 1 Pre-Read
β€”

This tutorial uses a structured evaluation dataset named emanual.csv Placed inside the folder DATASET_RAG

You can access the DATASET_RAG.zip from the GitHub repository.

NOTE: If you download the ZIP file, extract it and navigate to the DATASET_RAG folder. Place the entire folder in your designated location for further use.

Dataset

It leverages the publicly available emanual.csv, which contains commonly asked emanual questions. Each entry includes:

- topic (user query)
- answer
- context

How it works

  • A query and its retrieved context are sent to the model.

  • The model generates a grounded response.

  • The grounding metrics evaluate if the output faithfully uses the provided context.

Step 2 Notebook Reference
+
Step 3 Environment Variables Setup
+
Step 4 Preparing Dataset Files and Reference Files
+
Step 5 Registering an Object Store Secret in AI Core
+
Step 6 Create a Generic Secret
+
Step 7 Create a Grounding Pipeline
+
Step 8 Upload Evaluation Files to Object Store and Register Artifact in AI Core
+
Step 9 Create an Evaluation Configuration
+
Step 10 Evaluation Execution Creation
+
Step 11 Evaluation Results Analysis
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 11
1. Pre-Read 2. Notebook Reference 3. Environment Variables Setup 4. Preparing Dataset Files and Reference Files 5. Registering an Object Store Secret in AI Core 6. Create a Generic Secret 7. Create a Grounding Pipeline 8. Upload Evaluation Files to Object Store and Register Artifact in AI Core 9. Create an Evaluation Configuration 10. Evaluation Execution Creation 11. Evaluation Results Analysis

Learn more →