This knowledge sharing article demonstrates how to call GenAI Connect rule from a case workflow and use it as an AI agent to quickly research needed information and summarize the findings in a structured format for user review.
Pega Infinity version used: 25.1.2
= = =
Runtime results
Let’s first look at the runtime results before getting into the configurations.
We have a FSC- case type (Find Sports Champion) that uses a GenAI model to quickly research the champion details in a given sports (entered by user).
Step 1 - Launch the Find Sports Champion case type.
Enter the Which sports? and From year fields.
Click Submit.
Step 2 – Calling a GenAI Connect rule and waiting for the response.
Step 3 – Display the GenAI response in a structured list
The following table shows a list of FIFA World Cup Soccer champions since year 2000 (prompted by user).
Note: GenAI Connect rule was smart enough to get the additional details such as venue, head coach, Most Valuable Player (MVP), and the team strengths and map to the table even though those information were not explicitly requested in the prompt. The following configurations will show how this happened in the GenAI Connect rule.
Prompted for another example - NFL champions since 2020.
Configurations
Step 1 – Create a GenAI Connect rule.
We’re using a structured list for Response.
Here is the Champion data object used to define the .ChampionList field referenced in the GenAI Connect rule > Response.
Note: One key observation is that the GenAI Connect rule was smart enough to retrieve additional information about each champion based on the Champion fields mapped in the Response section (even though those details were not included in the prompt).
The user prompt is configured in a Field Value rule.
There are two parameters: .WhichSports and .FromYear (entered by user)
Research and provide a list of all-time sports champions in {.WhichSports} since year {.FromYear}. Save this prompt.
Under the Advanced tab, we selected Gemini-Pro as our GenAI model.
There are additional GenAI models available if needed.
Step 2 – Create a view to capture the prompt details from user.
Step 3 – Reference the GenAI Connect rule in the case workflow.
Step 4 – Save the GenAI prompt text.
In this example, we’re prompting GenAI to save the prompt text in the .ChampionList() response field.
Step 5 – Configure a view to display the GenAI response.
Display the ChampionList in a Table layout.
Runtime view:
Additional notes
- This was my first-time implementing GenAI Connect rule in Pega Infinity, and the experience was seamless.
- Had to enable GenAI feature in my Pega Lab instance.
- Refer to this article if you want to learn about how Pega GenAI Agent can perform actual tangible tasks during a case workflow.
- Will provide additional information as I gain more experiences on Pega GenAI capabilities in coming months.
























