sap-ai-core
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSAP 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
核心能力
| Capability | Description |
|---|---|
| Generative AI Hub | Access to LLMs from multiple providers with unified API |
| Orchestration | Modular pipeline for templating, filtering, grounding, masking |
| ML Training | Argo Workflows-based batch pipelines for model training |
| Inference Serving | Deploy models as HTTPS endpoints for predictions |
| Grounding/RAG | Vector database integration for contextual AI |
| 能力 | 描述 |
|---|---|
| Generative AI Hub | 通过统一API访问来自多个提供商的大语言模型(LLM) |
| 编排工作流 | 包含模板化、过滤、基础检索、掩码功能的模块化流水线 |
| ML训练 | 基于Argo Workflows的批量流水线,用于模型训练 |
| 推理服务 | 将模型部署为HTTPS端点以提供预测服务 |
| 基础检索/RAG | 集成向量数据库以实现上下文感知AI |
Three Components
三大组件
- SAP AI Core: Execution engine for AI workflows and model serving
- SAP AI Launchpad: Management UI for AI runtimes and GenAI Hub
- AI API: Standardized lifecycle management across runtimes
- SAP AI Core:AI工作流和模型服务的执行引擎
- SAP AI Launchpad:AI运行时和GenAI Hub的管理界面
- 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
undefinedbash
undefinedSet 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')
-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')
undefinedAUTH_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')
-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')
undefined2. Create Orchestration Deployment
2. 创建编排部署
bash
undefinedbash
undefinedCheck 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"
-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"
-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>" }'
-H "Authorization: Bearer $AUTH_TOKEN"
-H "AI-Resource-Group: default"
-H "Content-Type: application/json"
-d '{ "configurationId": "<orchestration-config-id>" }'
undefinedcurl -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>" }'
-H "Authorization: Bearer $AUTH_TOKEN"
-H "AI-Resource-Group: default"
-H "Content-Type: application/json"
-d '{ "configurationId": "<orchestration-config-id>" }'
undefined3. 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
服务计划
| Plan | Cost | GenAI Hub | Support | Resource Groups |
|---|---|---|---|---|
| Free | Free | No | Community only | Default only |
| Standard | Per resource + baseline | No | Full SLA | Multiple |
| Extended | Per resource + tokens | Yes | Full SLA | Multiple |
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.mdSAP 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.mdOrchestration
编排工作流
The orchestration service provides unified access to multiple models through a modular pipeline with 8 execution stages:
- 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个执行阶段的模块化流水线,提供对多个模型的统一访问:
- 基础检索 → 2. 模板化(必填) → 3. 输入翻译 → 4. 数据掩码 → 5. 输入过滤 → 6. 模型配置(必填) → 7. 输出过滤 → 8. 输出翻译
有关编排模块配置、示例和高级模式的完整信息,请参阅。
references/orchestration-modules.mdContent 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: (non-reversible)
MASKED_ENTITY - Pseudonymization: (reversible)
MASKED_ENTITY_ID
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.mdGrounding (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.mdTool 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.jsonStructured 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 endpoint. Supports document, query, and text input types.
/v2/embeddings通过端点生成语义嵌入向量,用于RAG和相似度搜索。支持文档、查询和文本输入类型。
/v2/embeddingsML Training
ML训练
Uses Argo Workflows for training pipelines. Key requirements: create object store secret, define workflow template, create configuration with parameters, and execute training. For complete workflow patterns, see .
defaultreferences/ml-operations.md使用Argo Workflows构建训练流水线。关键要求:创建对象存储密钥、定义工作流模板、创建带参数的配置、执行训练。有关工作流模式的完整信息,请参阅。
defaultreferences/ml-operations.mdDeployments
部署
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.jsonSAP 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 , , , , and . For complete guide, see .
genai_managergenai_experimenterprompt_managerorchestration_executormloperations_editorreferences/ai-launchpad-guide.md基于Web的界面,包含4个核心应用:
- 工作区:管理连接和资源组
- ML操作:训练、部署、监控模型
- Generative AI Hub:提示词实验和编排工作流
- 函数浏览器:探索可用的AI函数
所需角色包括、、、和。有关完整指南,请参阅。
genai_managergenai_experimenterprompt_managerorchestration_executormloperations_editorreferences/ai-launchpad-guide.mdAPI Reference
API参考
Core Endpoints
核心端点
Key endpoints: , , , , . For complete API reference with examples, see .
/v2/lm/scenarios/v2/lm/configurations/v2/lm/deployments/v2/lm/executions/lm/metareferences/api-reference.md关键端点:、、、、。有关API参考和示例的完整信息,请参阅。
/v2/lm/scenarios/v2/lm/configurations/v2/lm/deployments/v2/lm/executions/lm/metareferences/api-reference.mdCommon 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 .
"masking_providers": [{
templates/orchestration-workflow.jsonTroubleshooting
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 object store secret
default
Request quota increases via support ticket (Component: ).
CA-ML-AIC简单对话:使用模板化模块调用基础模型
带基础检索的RAG:结合向量搜索和大语言模型实现上下文感知响应
安全企业对话:通过过滤+掩码+基础检索保护PII数据
模板可在中获取。
"masking_providers": [{
templates/orchestration-workflow.json故障排查
常见问题:
- 401 Unauthorized:刷新OAuth令牌
- 403 Forbidden:检查IAM角色,申请配额提升
- 404 Not Found:验证AI-Resource-Group请求头
- 部署状态为DEAD:检查部署日志
- 训练失败:创建对象存储密钥
default
通过支持工单申请配额提升(组件:)。
CA-ML-AICBundled Resources
配套资源
Reference Documentation
参考文档
- - All orchestration modules in detail
references/orchestration-modules.md - - Complete GenAI hub documentation
references/generative-ai-hub.md - - Model providers and configurations
references/model-providers.md - - Complete API endpoint reference
references/api-reference.md - - Grounding and RAG implementation
references/grounding-rag.md - - ML operations and training
references/ml-operations.md - - Chat, applications, security, auditing
references/advanced-features.md - - Complete SAP AI Launchpad UI guide
references/ai-launchpad-guide.md
- - 所有编排模块的详细说明
references/orchestration-modules.md - - Generative AI Hub完整文档
references/generative-ai-hub.md - - 模型提供商及配置
references/model-providers.md - - 完整API端点参考
references/api-reference.md - - 基础检索与RAG实现
references/grounding-rag.md - - ML操作与训练
references/ml-operations.md - - 对话功能、应用集成、安全、审计
references/advanced-features.md - - SAP AI Launchpad完整界面指南
references/ai-launchpad-guide.md
Templates
模板
- - Deployment configuration template
templates/deployment-config.json - - Orchestration workflow template
templates/orchestration-workflow.json - - Tool calling definition template
templates/tool-definition.json
- - 部署配置模板
templates/deployment-config.json - - 编排工作流模板
templates/orchestration-workflow.json - - 工具调用定义模板
templates/tool-definition.json
Official Sources
官方资源
- SAP AI Core Guide: https://help.sap.com/docs/sap-ai-core
- SAP AI Launchpad Guide: https://help.sap.com/docs/sap-ai-launchpad
- SAP Note 3437766: Model token rates and limits
- SAP AI Core官方指南:https://help.sap.com/docs/sap-ai-core
- SAP AI Launchpad官方指南:https://help.sap.com/docs/sap-ai-launchpad
- SAP Note 3437766:模型令牌费率和限制