Basic Prompting
Leveraging prompting with Foundation Models or Large Language Models (LLMs) is a powerful way to enhance your applications by enabling natural language processing for both input and output. Using Generative AI on SAP Business Technology Platform (SAP BTP), you can build applications that interact intelligently with your users through custom prompts. By calling Foundation Models with custom prompts, you can control the AI's responses to align with specific tasks and objectives. Here's what to use for basic prompting on SAP BTP to unlock this capability in your applications.
Architecture
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. CAP is connected to the Generative AI Hub via SAP AI Core and its AI API, enabling seamless communication with Foundation Models and Large Language Models (LLMs). Furthermore, various SDKs, frameworks, and plugins, such as SAP Cloud SDK (for AI), LangChain, and CAP LLM Plugin, 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. The Orchestration Service 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.
Services & Components
For a comprehensive list of services, components and descriptions, please explore the Introduction on Services & Components.
Examples
Take a look at the following examples that build upon or implement elements of the Reference Architecture:
- Sample CAP application using ai-sdk-js shows how to use Generative AI Hub for connecting to Foundation Models, Orchestration Service or LangChain.
- SAP BTP genAI starter kit wants to give users of the SAP Business Technology Platform (BTP) a quick way to learn how to use generative AI with BTP services.
- GenAI Mail Insights - Develop a CAP-based application using GenAI and RAG on SAP BTP