Skip to main content

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

image of solution diagram
Copy to clipboard

Solution Diagram Resources
You can download the Solution Diagram as a .drawio file for offline use. Alternatively, you may view and edit the Solution Diagram directly on draw.io.
Please note that any changes made online will need to be saved locally if you wish to keep them.

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: