Pega provides two primary GenAI capabilities:This is the article I’ve been waiting to write, as Pega 25 is now GA, and GenAI Connect unlocks a completely new way to infuse GenAI into case management. Let’s start understanding this GenAI connect rule by following a simple scenario.
Scenario
As a Solution Architect, you want Pega to generate a personal fitness plan based on a user’s health details:
- Age
- Gender
- Height
- Weight
- Symptoms
We will use Pega 25 GenAI Connect to send this information to an LLM and receive personalised exercise recommendations.
⚠ This example is only to demonstrate GenAI Connect technically.
Case & Data Model
Create a case type: Health Assessment and needed data attributes like Age, Gender, Height, weight, and Symptoms and exercise plan data reference to store Plan Type, Duration, sets, target area, etc.
This case will collect inputs and pass them to the AI engine.
Introducing AI Designer (Pega 25)
Go to App Studio to find out about AI Designer. Pega provides two primary GenAI capabilities:
For this scenario, we use GenAI Connect.
GenAI Connect – Configuration
Create a GenAI Connect rule and fill out basic details, especially the cases where you want to integrate GenAI. For now, you do not want to worry about System & User Prompt; by default, Pega uses Autopilot to generate these prompts. I have updated those prompts as per our requirement. Let’s understand these prompts in detail.
System Prompt
This defines the role and behavior of the model.
“Act as a professional fitness coach. Your goal is to generate safe and beginner-friendly exercise plans…”
Here I have updated those instructionsinstructions as per my requirement, but they can be further tuned using Autopilot
User Prompt
This describes how the user/data is provided and how the model should respond.
By this prompt, you are informing the GenAI rule about how a user would ask. Technically, we are making the Gen AI rule to be prepared for such prompts to generate responses in order to help us map the required content back to the Pega Data model. Here on the right side, I have used an embedded Page to map the generated exercise plans.
Here, I need to pass the user information via masked data, and as parameters, I have used {} to map required data from the case data model.
Here, sometimes, we might ned to mask the data, for example, a user’s weight and some confidential health parameters while masking.
Model
Pega provides a good number of out-of-the-box options to choose the best LLM engine. I have used GPT 40 mini based on a performance comparison, which I will explain later in this article.
Temperature
Temperature specifies how best you want the model to generate content as per need, anything between 0 to1 as per results (after a few iterations after running this agent)
Unit Test & Choose the Best Model
Run the configured GenAI rule to check on the response and choose temperature or model settings as per the run results.
Here, we can use the Compare option to run these prompts against another LLM model and pick a good-performing one. Once tested and satisfied with the response style and response data. Let’s now integrate the above GenAI connect rule to the case the case flow.
Case Designer – Automation Step (GenAI Connect)
Add an automation step called GenAI Connect and choose an existing GenAI rule to map the above created rule and show the response as view in the flow
Demo
Let’s run a simple case as an individual and test whether the system is able to generate a few fitness exercise plans based on the case data. Here, as shown below, we can see that based on the given health information, the system can provide a few plans within consideration of instructions and provided health data with respect to age, gender, height, weight, and so on.
After this step, the GenAI connect rule gets integrated, and the results are shown as a review for the user to choose and continue.
Summary
We have seen how Pega 25 GenAI Connect seamlessly embeds Generative AI into case workflows, enabling dynamic data-driven outcomes without custom integrations.

