sap-ai-core

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

SAP AI Core & AI Launchpad Skill

SAP AI Core & AI Launchpad 技能指南

Related Skills

相关技能

  • sap-btp-cloud-platform: Use for platform context, BTP account setup, and service integration
  • sap-cap-capire: Use for building AI-powered applications with CAP or integrating AI services
  • sap-cloud-sdk-ai: Use for SDK integration, AI service calls, and Java/JavaScript implementations
  • sap-btp-best-practices: Use for production deployment patterns and AI governance guidelines
  • sap-btp-cloud-platform:用于平台上下文、BTP账户设置和服务集成场景
  • sap-cap-capire:用于使用CAP构建AI驱动的应用或集成AI服务
  • sap-cloud-sdk-ai:用于SDK集成、AI服务调用以及Java/JavaScript实现
  • sap-btp-best-practices:用于生产部署模式和AI治理指南场景

Table of Contents

目录

Overview

概述

SAP AI Core is a service on SAP Business Technology Platform (BTP) that manages AI asset execution in a standardized, scalable, hyperscaler-agnostic manner. SAP AI Launchpad provides the management UI for AI runtimes including the Generative AI Hub.
SAP AI Core是SAP Business Technology Platform (BTP)上的一项服务,以标准化、可扩展、与超大规模云厂商无关的方式管理AI资产的执行。SAP AI Launchpad为AI运行时(包括Generative AI Hub)提供管理界面。

Core Capabilities

核心能力

CapabilityDescription
Generative AI HubAccess to LLMs from multiple providers with unified API
OrchestrationModular pipeline for templating, filtering, grounding, masking
ML TrainingArgo Workflows-based batch pipelines for model training
Inference ServingDeploy models as HTTPS endpoints for predictions
Grounding/RAGVector database integration for contextual AI
能力描述
Generative AI Hub通过统一API访问来自多个提供商的大语言模型(LLM)
编排工作流包含模板化、过滤、基础检索、掩码功能的模块化流水线
ML训练基于Argo Workflows的批量流水线,用于模型训练
推理服务将模型部署为HTTPS端点以提供预测服务
基础检索/RAG集成向量数据库以实现上下文感知AI

Three Components

三大组件

  1. SAP AI Core: Execution engine for AI workflows and model serving
  2. SAP AI Launchpad: Management UI for AI runtimes and GenAI Hub
  3. AI API: Standardized lifecycle management across runtimes
  1. SAP AI Core:AI工作流和模型服务的执行引擎
  2. SAP AI Launchpad:AI运行时和GenAI Hub的管理界面
  3. AI API:跨运行时的标准化生命周期管理接口

Quick Start

快速开始

Prerequisites

前提条件

  • SAP BTP enterprise account
  • SAP AI Core service instance (Extended plan for GenAI)
  • Service key with credentials
  • SAP BTP企业账户
  • SAP AI Core服务实例(生成式AI功能需使用扩展版计划)
  • 包含凭证的服务密钥

1. Get Authentication Token

1. 获取认证令牌

bash
undefined
bash
undefined

Set environment variables from service key

Set environment variables from service key

export AI_API_URL="<your-ai-api-url>" export AUTH_URL="<your-auth-url>" export CLIENT_ID="<your-client-id>" export CLIENT_SECRET="<your-client-secret>"
export AI_API_URL="<your-ai-api-url>" export AUTH_URL="<your-auth-url>" export CLIENT_ID="<your-client-id>" export CLIENT_SECRET="<your-client-secret>"

Get OAuth token

Get OAuth token

AUTH_TOKEN=$(curl -s -X POST "$AUTH_URL/oauth/token"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET"
| jq -r '.access_token')
undefined
AUTH_TOKEN=$(curl -s -X POST "$AUTH_URL/oauth/token"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET"
| jq -r '.access_token')
undefined

2. Create Orchestration Deployment

2. 创建编排部署

bash
undefined
bash
undefined

Check for existing orchestration deployment

Check for existing orchestration deployment

curl -X GET "$AI_API_URL/v2/lm/deployments"
-H "Authorization: Bearer $AUTH_TOKEN"
-H "AI-Resource-Group: default"
-H "Content-Type: application/json"
curl -X GET "$AI_API_URL/v2/lm/deployments"
-H "Authorization: Bearer $AUTH_TOKEN"
-H "AI-Resource-Group: default"
-H "Content-Type: application/json"

Create orchestration deployment if needed

Create orchestration deployment if needed

curl -X POST "$AI_API_URL/v2/lm/deployments"
-H "Authorization: Bearer $AUTH_TOKEN"
-H "AI-Resource-Group: default"
-H "Content-Type: application/json"
-d '{ "configurationId": "<orchestration-config-id>" }'
undefined
curl -X POST "$AI_API_URL/v2/lm/deployments"
-H "Authorization: Bearer $AUTH_TOKEN"
-H "AI-Resource-Group: default"
-H "Content-Type: application/json"
-d '{ "configurationId": "<orchestration-config-id>" }'
undefined

3. Use Harmonized API for Model Inference

3. 使用统一API进行模型推理

bash
ORCHESTRATION_URL="<deployment-url>"

curl -X POST "$ORCHESTRATION_URL/v2/completion" \
  -H "Authorization: Bearer $AUTH_TOKEN" \
  -H "AI-Resource-Group: default" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "module_configurations": {
        "llm_module_config": {
          "model_name": "gpt-4o",
          "model_version": "latest",
          "model_params": {
            "max_tokens": 1000,
            "temperature": 0.7
          }
        },
        "templating_module_config": {
          "template": [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "{{?user_query}}"}
          ]
        }
      }
    },
    "input_params": {
      "user_query": "What is SAP AI Core?"
    }
  }'
bash
ORCHESTRATION_URL="<deployment-url>"

curl -X POST "$ORCHESTRATION_URL/v2/completion" \
  -H "Authorization: Bearer $AUTH_TOKEN" \
  -H "AI-Resource-Group: default" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "module_configurations": {
        "llm_module_config": {
          "model_name": "gpt-4o",
          "model_version": "latest",
          "model_params": {
            "max_tokens": 1000,
            "temperature": 0.7
          }
        },
        "templating_module_config": {
          "template": [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "{{?user_query}}"}
          ]
        }
      }
    },
    "input_params": {
      "user_query": "What is SAP AI Core?"
    }
  }'

Service Plans

服务计划

PlanCostGenAI HubSupportResource Groups
FreeFreeNoCommunity onlyDefault only
StandardPer resource + baselineNoFull SLAMultiple
ExtendedPer resource + tokensYesFull SLAMultiple
Key Restrictions:
  • Free and Standard mutually exclusive in same subaccount
  • Free → Standard upgrade possible; downgrade not supported
  • Max 50 resource groups per tenant
计划成本GenAI Hub支持服务资源组
免费版免费仅社区支持仅默认资源组
标准版按资源使用量+基础费用完整SLA支持多个资源组
扩展版按资源使用量+令牌费用完整SLA支持多个资源组
关键限制
  • 同一子账户中免费版和标准版互斥
  • 支持从免费版升级到标准版;不支持降级
  • 每个租户最多50个资源组

Model Providers

模型提供商

SAP AI Core provides access to models from six providers:
  • Azure OpenAI: GPT-4o, GPT-4 Turbo, GPT-3.5
  • SAP Open Source: Llama, Falcon, Mistral variants
  • Google Vertex AI: Gemini Pro, PaLM 2
  • AWS Bedrock: Claude, Amazon Titan
  • Mistral AI: Mistral Large, Medium, Small
  • IBM: Granite models
For detailed provider configurations and model lists, see
references/model-providers.md
.
SAP AI Core支持来自6个提供商的模型:
  • Azure OpenAI:GPT-4o、GPT-4 Turbo、GPT-3.5
  • SAP开源模型:Llama、Falcon、Mistral系列变体
  • Google Vertex AI:Gemini Pro、PaLM 2
  • AWS Bedrock:Claude、Amazon Titan
  • Mistral AI:Mistral Large、Medium、Small
  • IBM:Granite系列模型
有关提供商配置和模型列表的详细信息,请参阅
references/model-providers.md

Orchestration

编排工作流

The orchestration service provides unified access to multiple models through a modular pipeline with 8 execution stages:
  1. Grounding → 2. Templating (mandatory) → 3. Input Translation → 4. Data Masking → 5. Input Filtering → 6. Model Configuration (mandatory) → 7. Output Filtering → 8. Output Translation
For complete orchestration module configurations, examples, and advanced patterns, see
references/orchestration-modules.md
.
编排服务通过包含8个执行阶段的模块化流水线,提供对多个模型的统一访问:
  1. 基础检索 → 2. 模板化(必填) → 3. 输入翻译 → 4. 数据掩码 → 5. 输入过滤 → 6. 模型配置(必填) → 7. 输出过滤 → 8. 输出翻译
有关编排模块配置、示例和高级模式的完整信息,请参阅
references/orchestration-modules.md

Content Filtering

内容过滤

Azure Content Safety: Filters content across 4 categories (Hate, Violence, Sexual, SelfHarm) with severity levels 0-6. Azure OpenAI blocks severity 4+ automatically. Additional features include PromptShield and Protected Material detection.
Llama Guard 3: Covers 14 categories including violent crimes, privacy violations, and code interpreter abuse.
Azure Content Safety:针对4类内容(仇恨言论、暴力、色情、自我伤害)进行过滤,严重程度分为0-6级。Azure OpenAI会自动拦截严重程度4级及以上的内容。额外功能包括PromptShield和受保护材料检测。
Llama Guard 3:覆盖14类内容,包括暴力犯罪、隐私侵犯和代码解释器滥用。

Data Masking

数据掩码

Two PII protection methods:
  • Anonymization:
    MASKED_ENTITY
    (non-reversible)
  • Pseudonymization:
    MASKED_ENTITY_ID
    (reversible)
Supported entities (25 total): Personal data, IDs, financial information, SAP-specific IDs, and sensitive attributes. For complete entity list and implementation details, see
references/orchestration-modules.md
.
两种PII保护方法
  • 匿名化
    MASKED_ENTITY
    (不可逆)
  • 假名化
    MASKED_ENTITY_ID
    (可逆)
支持的实体(共25种):个人数据、身份标识、财务信息、SAP特定ID和敏感属性。有关实体列表和实现细节的完整信息,请参阅
references/orchestration-modules.md

Grounding (RAG)

基础检索(RAG)

Integrate external data from SharePoint, S3, SFTP, SAP Build Work Zone, and DMS. Supports PDF, HTML, DOCX, images, and more. Limit: 2,000 documents per pipeline with daily refresh. For detailed setup, see
references/grounding-rag.md
.
集成来自SharePoint、S3、SFTP、SAP Build Work Zone和DMS的外部数据。支持PDF、HTML、DOCX、图片等格式。限制:每个流水线最多2000个文档,每日刷新。有关详细设置,请参阅
references/grounding-rag.md

Tool Calling

工具调用

Enable LLMs to execute functions through a 5-step workflow: define tools → receive tool_calls → execute functions → return results → LLM incorporates responses. Templates available in
templates/tool-definition.json
.
通过5步工作流让大语言模型执行函数:定义工具 → 接收tool_calls → 执行函数 → 返回结果 → LLM整合响应。模板可在
templates/tool-definition.json
中获取。

Structured Output

结构化输出

Force model responses to match JSON schemas using strict validation. Useful for structured data extraction and API responses.
通过严格验证强制模型输出匹配JSON Schema。适用于结构化数据提取和API响应场景。

Embeddings

嵌入向量

Generate semantic embeddings for RAG and similarity search via
/v2/embeddings
endpoint. Supports document, query, and text input types.
通过
/v2/embeddings
端点生成语义嵌入向量,用于RAG和相似度搜索。支持文档、查询和文本输入类型。

ML Training

ML训练

Uses Argo Workflows for training pipelines. Key requirements: create
default
object store secret, define workflow template, create configuration with parameters, and execute training. For complete workflow patterns, see
references/ml-operations.md
.
使用Argo Workflows构建训练流水线。关键要求:创建
default
对象存储密钥、定义工作流模板、创建带参数的配置、执行训练。有关工作流模式的完整信息,请参阅
references/ml-operations.md

Deployments

部署

Deploy models via two-step process: create configuration (with model binding), then create deployment with TTL. Statuses: Pending → Running → Stopping → Stopped/Dead. Templates in
templates/deployment-config.json
.
通过两步流程部署模型:创建配置(绑定模型),然后创建带TTL的部署。状态包括:Pending(待处理)→ Running(运行中)→ Stopping(停止中)→ Stopped/Dead(已停止/失败)。模板可在
templates/deployment-config.json
中获取。

SAP AI Launchpad

SAP AI Launchpad

Web-based UI with 4 key applications:
  • Workspaces: Manage connections and resource groups
  • ML Operations: Train, deploy, monitor models
  • Generative AI Hub: Prompt experimentation and orchestration
  • Functions Explorer: Explore available AI functions
Required roles include
genai_manager
,
genai_experimenter
,
prompt_manager
,
orchestration_executor
, and
mloperations_editor
. For complete guide, see
references/ai-launchpad-guide.md
.
基于Web的界面,包含4个核心应用:
  • 工作区:管理连接和资源组
  • ML操作:训练、部署、监控模型
  • Generative AI Hub:提示词实验和编排工作流
  • 函数浏览器:探索可用的AI函数
所需角色包括
genai_manager
genai_experimenter
prompt_manager
orchestration_executor
mloperations_editor
。有关完整指南,请参阅
references/ai-launchpad-guide.md

API Reference

API参考

Core Endpoints

核心端点

Key endpoints:
/v2/lm/scenarios
,
/v2/lm/configurations
,
/v2/lm/deployments
,
/v2/lm/executions
,
/lm/meta
. For complete API reference with examples, see
references/api-reference.md
.
关键端点:
/v2/lm/scenarios
/v2/lm/configurations
/v2/lm/deployments
/v2/lm/executions
/lm/meta
。有关API参考和示例的完整信息,请参阅
references/api-reference.md

Common Patterns

常见模式

Simple Chat: Basic model invocation with templating module RAG with Grounding: Combine vector search with LLM for context-aware responses Secure Enterprise Chat: Filtering + masking + grounding for PII protection Templates available in
templates/orchestration-workflow.json
. "masking_providers": [{

Troubleshooting

Common Issues:
  • 401 Unauthorized: Refresh OAuth token
  • 403 Forbidden: Check IAM roles, request quota increase
  • 404 Not Found: Verify AI-Resource-Group header
  • Deployment DEAD: Check deployment logs
  • Training failed: Create
    default
    object store secret
Request quota increases via support ticket (Component:
CA-ML-AIC
).
简单对话:使用模板化模块调用基础模型 带基础检索的RAG:结合向量搜索和大语言模型实现上下文感知响应 安全企业对话:通过过滤+掩码+基础检索保护PII数据 模板可在
templates/orchestration-workflow.json
中获取。 "masking_providers": [{

故障排查

常见问题
  • 401 Unauthorized:刷新OAuth令牌
  • 403 Forbidden:检查IAM角色,申请配额提升
  • 404 Not Found:验证AI-Resource-Group请求头
  • 部署状态为DEAD:检查部署日志
  • 训练失败:创建
    default
    对象存储密钥
通过支持工单申请配额提升(组件:
CA-ML-AIC
)。

Bundled Resources

配套资源

Reference Documentation

参考文档

  1. references/orchestration-modules.md
    - All orchestration modules in detail
  2. references/generative-ai-hub.md
    - Complete GenAI hub documentation
  3. references/model-providers.md
    - Model providers and configurations
  4. references/api-reference.md
    - Complete API endpoint reference
  5. references/grounding-rag.md
    - Grounding and RAG implementation
  6. references/ml-operations.md
    - ML operations and training
  7. references/advanced-features.md
    - Chat, applications, security, auditing
  8. references/ai-launchpad-guide.md
    - Complete SAP AI Launchpad UI guide
  1. references/orchestration-modules.md
    - 所有编排模块的详细说明
  2. references/generative-ai-hub.md
    - Generative AI Hub完整文档
  3. references/model-providers.md
    - 模型提供商及配置
  4. references/api-reference.md
    - 完整API端点参考
  5. references/grounding-rag.md
    - 基础检索与RAG实现
  6. references/ml-operations.md
    - ML操作与训练
  7. references/advanced-features.md
    - 对话功能、应用集成、安全、审计
  8. references/ai-launchpad-guide.md
    - SAP AI Launchpad完整界面指南

Templates

模板

  1. templates/deployment-config.json
    - Deployment configuration template
  2. templates/orchestration-workflow.json
    - Orchestration workflow template
  3. templates/tool-definition.json
    - Tool calling definition template
  1. templates/deployment-config.json
    - 部署配置模板
  2. templates/orchestration-workflow.json
    - 编排工作流模板
  3. templates/tool-definition.json
    - 工具调用定义模板

Official Sources

官方资源