Generative AI on SAP BTP
The reference shape for a generative AI application on BTP: a CAP@sap/cdsThe CAP Node.js runtime, which compiles the CDS model, serves the services declared in it, answers generic requests before any handler runs, and loads every cds-plugin.sap official, cap backend, SAP HANA CloudSAP HANA CloudThe managed database under most of this: CAP's default target, the store Datasphere and Analytics Cloud sit on, and a service with plans and components.sap official, btp holding data and embeddings for similarity search through its vector engine, and the Generative AI Hub in SAP AI Core as the single access point to foundation models. It shows retrieval-augmented generation on that stack and names the CAP plugins and SDKs that connect the pieces, for both Cloud Foundry and Kyma.
Where it sits
Who is behind it
In the atlas: maintains 1, wrote 26author
Before you read it
ApplicabilityCore changedLLM integration changed in @cap-js/ai 1.0.0, 2026-04-28.
This is a derived prompt to re-check the work, not a claim that the work is wrong. Exact stale statements are recorded separately after editorial review.
Architecture
parts read from 4 readme files,Parts, as the source names them
- Useran actorinteracts with the application through the user interface and submits promptsRA0005 1-basics/readme.md in SAP/architecture-center
In this architecture, the Cloud Application Programming (CAP) model serves as the central point for managing application logic and sending prompts, either through well-designed, integrated prompt templates within the application itself or via a user interface like SAPUI5 for end-user interaction.
RA0005 3-retrieval-augmented-generation/readme.md in SAP/architecture-centerThe user submits a question or prompt, which is transformed into a dense vector (embedding) by an embedding model.
- @sap/cdscentral hub for application and domain logicSAP BTPRA0005 readme.md in SAP/architecture-center
In the provided Reference Architecture, CAP serves as the central hub for application and domain logic, interacting with SAP solutions (Cloud or On-Premise), 3rd party applications, and managing data sources such as SAP HANA Cloud.
RA0005 1-basics/readme.md in SAP/architecture-centerIn this architecture, the Cloud Application Programming (CAP) model serves as the central point for managing application logic and sending prompts, either through well-designed, integrated prompt templates within the application itself or via a user interface like SAPUI5 for end-user interaction.
RA0005 2-semantic-search/readme.md in SAP/architecture-centerCAP natively supports embeddings as part of its data schema, allowing for seamless integration of vector representations.
- SAP HANA Cloudstores data and embeddings for similarity search through its Vector EngineSAP BTPRA0005 readme.md in SAP/architecture-center
At its core, this reference architecture features a [CAP](#sap-cloud-application-programming-model)-based backend to manage application logic, SAP HANA Cloud for storing data, including embeddings to facilitate similarity search with the power of its [Vector Engine](#vector-engine), and the [Generative AI Hub](#generative-ai-hub) as the central access point to Foundation Models and Large Language Models (LLMs).
RA0005 2-semantic-search/readme.md in SAP/architecture-centerThese vectors are then stored and indexed within SAP HANA Cloud's [Vector Engine](../readme.md#vector-engine), enabling fast similarity searches through methods like cosine similarity.
- SAP AI CoreGenerative AI Hub: central access point to foundation models, with orchestration and groundingSAP BTPRA0005 readme.md in SAP/architecture-center
At its core, this reference architecture features a [CAP](#sap-cloud-application-programming-model)-based backend to manage application logic, SAP HANA Cloud for storing data, including embeddings to facilitate similarity search with the power of its [Vector Engine](#vector-engine), and the [Generative AI Hub](#generative-ai-hub) as the central access point to Foundation Models and Large Language Models (LLMs).
RA0005 readme.md in SAP/architecture-centerThe [Generative AI Hub](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/generative-ai-hub-in-sap-ai-core) incorporates Generative AI into your AI activities in [SAP AI Core](https://discovery-center.cloud.sap/serviceCatalog/sap-ai-core?region=all) and [SAP AI Launchpad](https://discovery-center.cloud.sap/serviceCatalog/sap-ai-launchpad?region=all).
RA0005 readme.md in SAP/architecture-centerAn important feature of the Generative AI Hub is [Orchestration](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/orchestration), which combines content generation via an [Harmonized API](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/harmonized-api) with essential functions often required in business AI scenarios.
RA0005 3-retrieval-augmented-generation/readme.md in SAP/architecture-center[SAP’s Orchestration Workflow](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/orchestration-workflow) contains a [Grounding module](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/grounding) which provides specialized data retrieval through vector databases.
- SAP AI Launchpadmanages AI use cases across AI runtimesSAP BTPRA0005 readme.md in SAP/architecture-center
The [Generative AI Hub](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/generative-ai-hub-in-sap-ai-core) incorporates Generative AI into your AI activities in [SAP AI Core](https://discovery-center.cloud.sap/serviceCatalog/sap-ai-core?region=all) and [SAP AI Launchpad](https://discovery-center.cloud.sap/serviceCatalog/sap-ai-launchpad?region=all).
RA0005 readme.md in SAP/architecture-centerCustomers and partners can use SAP AI Launchpad to manage AI use cases (scenarios) across multiple instances of AI runtimes (such as SAP AI Core).
- cap-llm-pluginplugin within the application logic for Generative AI solutionsSAP BTPRA0005 readme.md in SAP/architecture-center
Within the application logic, various plugins (e.g., [CAP LLM Plugin](https://www.npmjs.com/package/cap-llm-plugin)) and SDKs like SAP Cloud SDK for AI ([JavaScript/TypeScript](https://github.com/SAP/ai-sdk-js) or [Java](https://github.com/SAP/ai-sdk-java)) can be utilized to support the development of Generative AI solutions - also together with [LangChain](https://www.langchain.com/).
RA0005 3-retrieval-augmented-generation/readme.md in SAP/architecture-centerCustom CAP based application can benefit from the CAP LLM Plugin for efficient and faster development.
RA0005 3-retrieval-augmented-generation/readme.md in SAP/architecture-centerThe CAP LLM Plugin also supports anonymization.
- @sap-ai-sdk/foundation-modelsSDK within the application logic for the Generative AI Hub and the Vector EngineSAP BTPRA0005 readme.md in SAP/architecture-center
Within the application logic, various plugins (e.g., [CAP LLM Plugin](https://www.npmjs.com/package/cap-llm-plugin)) and SDKs like SAP Cloud SDK for AI ([JavaScript/TypeScript](https://github.com/SAP/ai-sdk-js) or [Java](https://github.com/SAP/ai-sdk-java)) can be utilized to support the development of Generative AI solutions - also together with [LangChain](https://www.langchain.com/).
RA0005 2-semantic-search/readme.md in SAP/architecture-centerAdditionally, various SDKs and plugins, such as the [SAP Cloud SDK (for AI)](https://github.com/SAP/ai-sdk-js), [CAP LLM Plugin](https://github.com/SAP-samples/cap-llm-plugin-samples) and [LangChain](https://www.langchain.com/), enhance the embedding process and streamline integration with both, the Generative AI Hub and the Vector Engine.
- @sap-ai-sdk/orchestrationSDK client for the orchestration configurationSAP BTPRA0005 readme.md in SAP/architecture-center
However, details for each module can be configured, and optional modules can be omitted by including an orchestration configuration in JSON format with the request body or even easier leveraging the [SAP Cloud SDK for AI](https://sap.github.io/ai-sdk/).
RA0005 1-basics/readme.md in SAP/architecture-centerThe [Orchestration Service](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/orchestration) provides a harmonized API for content generation (e.g., LLM completions) and includes key functionalities such as prompt templating and content filtering, making it even easier and more efficient to work with these models.
- SAP BTP, Cloud Foundry RuntimeruntimeSAP BTPon On the Cloud Foundry runtimeRA0005 readme.md in SAP/architecture-center
This architecture accommodates both Cloud Foundry and Kyma runtimes, ensuring adaptability in leveraging GenAI within SAP BTP applications.
RA0005 readme.md in SAP/architecture-center[SAP BTP, Cloud Foundry Runtime](https://discovery-center.cloud.sap/serviceCatalog/cloud-foundry-runtime?region=all) lets you develop polyglot cloud-native applications and run them on the SAP BTP Cloud Foundry environment.
- SAP BTP, Kyma runtimeruntimeSAP BTPon On the Kyma runtimeRA0005 readme.md in SAP/architecture-center
This architecture accommodates both Cloud Foundry and Kyma runtimes, ensuring adaptability in leveraging GenAI within SAP BTP applications.
RA0005 readme.md in SAP/architecture-center[SAP BTP, Kyma runtime](https://discovery-center.cloud.sap/serviceCatalog/kyma-runtime/?region=all) is a fully managed Kubernetes runtime based on the open-source project "Kyma".
- @sap/approuterconsuming application that accesses the HTML5 static contentSAP BTPRA0005 readme.md in SAP/architecture-center
In runtime, the service enables the consuming application, typically the application router, to access HTML5 application static content in a secure and efficient manner.
- SAP HTML5 Application Repository service for SAP BTPcentral storage of HTML5 applicationsSAP BTPRA0005 readme.md in SAP/architecture-center
[SAP HTML5 Application Repository Service for SAP BTP](https://discovery-center.cloud.sap/serviceCatalog/html5-application-repository-service?region=all) enables central storage of HTML5 applications on SAP BTP.
RA0005 readme.md in SAP/architecture-centerIn runtime, the service enables the consuming application, typically the application router, to access HTML5 application static content in a secure and efficient manner.
- SAP Destination servicebackend destination detailsSAP BTPRA0005 readme.md in SAP/architecture-center
[SAP Destination service](https://discovery-center.cloud.sap/serviceCatalog/destination?service_plan=lite®ion=all&commercialModel=cloud) lets you retrieve the backend destination details you need to configure applications in the Cloud Foundry environment.
- SAP Authorization and Trust Management serviceuser authorizations and trust to identity providersSAP BTPRA0005 readme.md in SAP/architecture-center
[SAP Authorization and Trust Management Service](https://discovery-center.cloud.sap/serviceCatalog/authorization-and-trust-management-service?region=all) lets you manage user authorizations and trust to identity providers.
- Cloud Identity Servicesidentity providerRA0005 readme.md in SAP/architecture-center
Identity providers are the user base for applications. We recommend that you use the SAP Identity Authentication Service (IAS), an SAP on-premise system, or a custom corporate identity provider.
- SAP Business Application Studiodevelopment environmentSAP BTPRA0005 readme.md in SAP/architecture-center
[SAP Business Application Studio](https://discovery-center.cloud.sap/serviceCatalog/business-application-studio?region=all) (the next generation of SAP Web IDE) is a powerful and modern development environment, tailored for efficient development of business applications for the Intelligent Enterprise.
- SAP Continuous Integration and DeliveryCI/CD pipelinesSAP BTPRA0005 readme.md in SAP/architecture-center
[SAP Continuous Integration and Delivery service](https://discovery-center.cloud.sap/serviceCatalog/continuous-integration--delivery?region=all) lets you configure and run predefined continuous integration and delivery (CI/CD) pipelines that automatically build, test, and deploy your code changes to speed up your development and delivery cycles.
Roles the source leaves open
- Plugins and SDKs within the application logica capability, LLM integrationRA0005 readme.md in SAP/architecture-center
Within the application logic, various plugins (e.g., [CAP LLM Plugin](https://www.npmjs.com/package/cap-llm-plugin)) and SDKs like SAP Cloud SDK for AI ([JavaScript/TypeScript](https://github.com/SAP/ai-sdk-js) or [Java](https://github.com/SAP/ai-sdk-java)) can be utilized to support the development of Generative AI solutions - also together with [LangChain](https://www.langchain.com/).
RA0005 1-basics/readme.md in SAP/architecture-centerFurthermore, various SDKs, frameworks, and plugins, such as [SAP Cloud SDK (for AI)](https://github.com/SAP/ai-sdk-js), [LangChain](https://www.langchain.com/), and [CAP LLM Plugin](https://github.com/SAP-samples/cap-llm-plugin-samples), can be leveraged within CAP to not only streamline interactions with the Generative AI Hub but also simplify implementation and enhance robustness by using features like [Output Parsing](https://js.langchain.com/docs/concepts/#output-parsers).
The source draws it as cap-llm-plugin, @sap-ai-sdk/foundation-models, @sap-ai-sdk/orchestration.
- @cap-js/ai
- @sap-ai-sdk/ai-api
- @sap-ai-sdk/core
- @sap-ai-sdk/foundation-models
- @sap-ai-sdk/orchestration
- @sap-ai-sdk/prompt-registry
- @ui5/webcomponents
- ABAP AI SDK
- cap-java/cds-ai
- SAP AI Core
- @geertjanklaps/cds-toon-ai-protocol-adapter
- @jerome-benoit/sap-ai-provider
- @saptarishi/cds-plugin-llm
- @shahid.la/cds-db-nlquery-mcp
- abap_btocs_ollama
- abap-agent-runtime
- abap-sdk-nwas
- abap-sdk-nwas-x
- cap-llm-plugin
- llm_client
- Microsoft AI SDK for SAP
- ui5-cap-ai-features
- zllm
- Custom-built RAG on SAP BTPa use case, Answer a question from records in a CAP serviceRA0005 3-retrieval-augmented-generation/readme.md in SAP/architecture-center
To leverage these underlying RAG principles, users can choose to either make use of SAP's standardized, use case-specific RAG services, or implement custom-built approaches on SAP BTP.
RA0005 3-retrieval-augmented-generation/readme.md in SAP/architecture-centerCustom CAP based application can benefit from the CAP LLM Plugin for efficient and faster development.
The source draws it as cap-llm-plugin.
Ways the source names
- On the Cloud Foundry runtimeRA0005 readme.md in SAP/architecture-center
This architecture accommodates both Cloud Foundry and Kyma runtimes, ensuring adaptability in leveraging GenAI within SAP BTP applications.
RA0005 readme.md in SAP/architecture-center[SAP BTP, Cloud Foundry Runtime](https://discovery-center.cloud.sap/serviceCatalog/cloud-foundry-runtime?region=all) lets you develop polyglot cloud-native applications and run them on the SAP BTP Cloud Foundry environment.
- On the Kyma runtimeRA0005 readme.md in SAP/architecture-center
This architecture accommodates both Cloud Foundry and Kyma runtimes, ensuring adaptability in leveraging GenAI within SAP BTP applications.
RA0005 readme.md in SAP/architecture-center[SAP BTP, Kyma runtime](https://discovery-center.cloud.sap/serviceCatalog/kyma-runtime/?region=all) is a fully managed Kubernetes runtime based on the open-source project "Kyma".
Properties
About this work
For llm-integration
For retrieval-augmented-generation
Details
Graph
Source
History
- explains → applies_to on capability:llm-integration (cap, btp); capability:retrieval-augmented-generation (cap, btp)Door scope proposed from the title and summary, so a door page lists the piece only where it holds (docs/concepts/content-on-doors.md).
- parts → 17 parts, 3 edges, 1 areaFilled from SAP's own readmes at the maintainer's request; the AI-native door reads these designs. Every part names what the graph holds; what it lacks is listed as candidates in the curation note.
- roles, paths → the plugins and SDKs within the application logic typed by LLM integration with the three the source names, the hub fixed, custom-built RAG typed by the CAP use case with the plugin the source names; two ways, one per runtime the readme accommodatesThe readme names the place for plugins and SDKs by example and leaves it open, and the RAG page names SAP's standardized services or a custom-built approach as the choice (docs/concepts/design-roles-and-interfaces.md §3). The three scenario pages are overlapping flows over the same parts, so they are not ways; the two runtimes are.
- capability → capability:retrieval-augmented-generationThe capability moved to a neutral id when it opened to HANA, BTP and ABAP; the concern and this entry's edge to it are unchanged.
- Entered the atlasDiscovered via SAP Architecture Center.
For your agent
- Ref
content:ac-generative-ai-on-sap-btp- JSON
- /content/ac-generative-ai-on-sap-btp.json
- MCP
- Connecting an agent