Analytics Legends logoAI & Analytics Legends Sign inSign up
Academy module

RAG over SAP Documents with the Generative AI Hub and Document Grounding

RAG over SAP Documents with the Generative AI Hub and Document Grounding — Analytics Legends section illustration for the SAP Analytics knowledge base (concepts, studies, Academy)

As of 2026-11-08

Walks one managed retrieval-augmented-generation pipeline end to end, for a shared-service-centre assistant that must cite its sources: creating a document-grounding pipeline over a supported repository (SharePoint, S3, SFTP, SAP Build Work Zone, SAP Document Management, ServiceNow, Google Drive, or help.sap.com via Elastic Search), calling it from orchestration through either Cloud SDK (PipelineAPIClient, GroundingModule/DocumentGroundingFilter/GroundingFilterSearch in Python; the equivalent searchConfiguration in JavaScript), tuning max_chunk_count and dataRepositories as a recall/precision/governance trade-off, masking grounding input with MaskingMethod.ANONYMIZATION and entity types such as ProfileEntity.SAP_IDS_INTERNAL, and running a groundedness evaluation that separates retrieval failures from generation failures. Closes by showing how this same pipeline becomes a tool an analytics agent built in Joule Studio (module “Building an Analytics Agent with Joule Studio”) can call through an MCP server over Datasphere and HANA (module “An MCP Server over Datasphere and HANA — Hands-On”).

What you will learn

  • Decide when a managed grounding pipeline is the right choice over hand-built HANA Cloud SQL retrieval, and build one for a real document corpus
  • Name the supported document-grounding data repositories and the one supported website source
  • Call the grounding module from orchestration in Python (PipelineAPIClient, GroundingModule, DocumentGroundingFilter, GroundingFilterSearch) or JavaScript (@sap-ai-sdk/document-grounding), and insert its response via the {{?grounding_response}} template variable
  • Tune max_chunk_count and dataRepositories deliberately, trading recall against precision and governance scope
  • Configure mask_grounding_input with MaskingMethod.ANONYMIZATION and relevant entity types (including ProfileEntity.SAP_IDS_INTERNAL) for internal SAP documentation
  • Build a groundedness evaluation that separates a retrieval failure from a generation failure

Module overview

Who this is for. “SAP Generative AI Hub — Hands-on: Orchestration, Grounding, Masking, Filtering” toured the whole generative AI hub — orchestration, grounding, masking, filtering. “HANA Cloud Vector Engine & Knowledge Graph Engine for RAG” showed you how to build retrieval yourself in HANA Cloud SQL. This module does neither: it takes the managed grounding path and walks it end to end, once, for one real scenario — a shared-service centre assistant that answers from internal SAP process documentation and cites its sources. If “HANA Cloud Vector Engine & Knowledge Graph Engine for RAG” is "build retrieval," this is "configure the pipeline SAP already built for you," and knowing when each is the right choice is itself part of the module.

Source: SAP-docs — Using the grounding module.

Prerequisites

  • SAP Generative AI Hub Hands-on: Orchestration, Grounding, Masking, Filtering
  • AI & LLM Fundamentals for SAP Consultants (RAG, hallucination, evaluation)
  • Comfort with Python or JavaScript and reading SDK reference documentation
  • Recommended alongside build-your-own retrieval in HANA Cloud for comparison, and “Building an Analytics Agent with Joule Studio” and “An MCP Server over Datasphere and HANA — Hands-On” if this pipeline will also serve an agent

Outcomes

  • Stand up a working grounding pipeline over a real document repository and retrieve from it through orchestration.
  • Justify a max_chunk_count and dataRepositories configuration against a written recall/precision/governance trade-off.
  • Configure masking on grounding input with named entity types matched to the actual document corpus.
  • Run a groundedness evaluation that diagnoses whether a bad answer came from retrieval or from generation.

Full module with the Consultant plan — €19.90/month. The full module adds: the decision framework · the end-to-end scenario walkthrough · the KPI scorecard · the anti-patterns · the code blocks · the knowledge check · the diagrams.

Open in the app →

Open missions

102 live roles and contracts in SAP AI & Joule right now — see the SAP AI & Joule missions · freelance SAP contracts.