# External SageMaker Model Propensity Not Displaying in Prediction Studio Propensity Tab

**URL:** <https://forums.pega.com/t/external-sagemaker-model-propensity-not-displaying-in-prediction-studio-propensity-tab/9684>\
**Category:** General\
**Tags:** prediction-studio, pega-academy\
**Created:** [July 7, 2025, 8:33am UTC](https://forums.pega.com/t/external-sagemaker-model-propensity-not-displaying-in-prediction-studio-propensity-tab/9684 "2025-07-07T08:33:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaik\_Kabeer](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Shaik\_Kabeer](https://forums.pega.com/u/Shaik_Kabeer)\
**Post date:** [July 7, 2025, 8:33am UTC](https://forums.pega.com/t/external-sagemaker-model-propensity-not-displaying-in-prediction-studio-propensity-tab/9684/1 "2025-07-07T08:33:51Z")

</div>

**Category: Pega AI/Machine Learning Services**

**Question:**

Hello Pega Community,

I’m facing an issue with an external AWS SageMaker model integration in Pega Prediction Studio where the model response contains the propensity value, but it’s not displaying in the Propensity tab.

**Current Situation:**

1. Successfully created an external model in Prediction Studio
2. Model calls SageMaker endpoint and receives responses correctly
3. Full response displays in the “Result” tab but Propensity tab shows “——” (empty)

**SageMaker Response Format:**

 ![it is the snapshot of the output .png](https://pega1.discourse-cdn.com/pega/original/2X/a/a118837630c3e772e69b7b17bf384bc54d55ec70.png)

jsonCopy

`{ "pyPropensity": 0.24374601781192465, "probability": 0.24374601781192465, "risk_level": "LOW", "recommendation": "Standard engagement", "predictions": [0.24374601781192465] }`

**What I’ve Observed:**

- The response is stored in `.pyModelRunResult` property
- The Propensity tab UI element has `data-ui-meta` with `clipboardPath':'.pyPropensity'`
- HTML inspection shows the tab expects `.pyPropensity` property to be populated
- No automatic field mapping occurs from external model response to `.pyPropensity`

**What I’ve Tried:**

1. **Metadata Template Configuration** - Added response mapping but no effect
2. **SageMaker Response Modification** - Tried different field names (pyPropensity, propensity, Propensity)
3. **Data Transform Creation** - Couldn’t find where to apply response data transforms for external models
4. **Model Configuration Search** - No visible post-processing or field mapping options

**Questions:**

1. **How should external model responses be mapped to the `.pyPropensity` property in Prediction Studio?**
2. **Is there a standard configuration for field mapping in external models that I’m missing?**
3. **What’s the recommended approach to extract propensity from external model JSON responses?**
4. **Are there any specific settings or configurations for external models that differ from built-in Pega models?**

Any guidance on the standard approach for this integration would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Sairohith](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sairohith/32/23362_2.png) [@Sairohith](https://forums.pega.com/u/Sairohith)\
**Post date:** [July 10, 2025, 12:09am UTC](https://forums.pega.com/t/external-sagemaker-model-propensity-not-displaying-in-prediction-studio-propensity-tab/9684/2 "2025-07-10T00:09:25Z")

</div>

@Shaikk17193357

The reason you don’t see the propensity value in the Propensity tab is because Pega expects the `.pyPropensity` field to be at the top level, but in your case, it’s inside `.pyModelRunResult` from the external SageMaker response. Even though the response is correct, Pega does not automatically move the value to where the UI expects it. To fix this, create a data transform (e.g., `ExtractExternalPropensity`) that copies the value from `.pyModelRunResult.pyPropensity` to `.pyPropensity`. Then, configure this data transform to run after the model execution, either through the model settings in Prediction Studio or using a wrapper activity or data flow. Once this is set up, Pega will display the value in the Propensity tab as expected.

---

<div class="post-metadata">

**Author:** ![Shaik\_Kabeer](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Shaik\_Kabeer](https://forums.pega.com/u/Shaik_Kabeer)\
**Post date:** [July 10, 2025, 12:59pm UTC](https://forums.pega.com/t/external-sagemaker-model-propensity-not-displaying-in-prediction-studio-propensity-tab/9684/3 "2025-07-10T12:59:18Z")

</div>

@Sairohith

**Thanks for the suggestion! I investigated this approach and found some key differences in how external models work.**

**What I discovered:** After debugging the `PS_ExecuteRuleForSingleRun` activity, I found that external SageMaker models don’t store responses in the nested property structure you mentioned. Instead:

- External model responses are stored as **raw strings** in `pyModelRunResult`
- The response format varies (JSON: `{"pyPropensity": 0.24}` or CSV: `"Yes,0.999,..."`)

**My solution:** I implemented a parser in the activity that:

- Detects response format (JSON/CSV)
- Extracts propensity values using regex/string parsing
- Sets the `.pyPropensity` property for UI display

**Result: Propensity values now display correctly in Prediction Studio**

**Challenge: The `PS_ExecuteRuleForSingleRun` activity is marked as [Final, Internal]** This means:

- Changes can’t be modified through normal development
- May be overwritten during Pega upgrades
- Requires monitoring after system updates

**Question for the community:** Has anyone found an alternative approach for external model propensity extraction that doesn’t require modifying Final artifacts? Or is there a way to override this activity safely?

Thanks for the guidance .

---

<div class="post-metadata">

**Author:** ![Shaik\_Kabeer](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Shaik\_Kabeer](https://forums.pega.com/u/Shaik_Kabeer)\
**Post date:** [August 5, 2025, 5:32am UTC](https://forums.pega.com/t/external-sagemaker-model-propensity-not-displaying-in-prediction-studio-propensity-tab/9684/4 "2025-08-05T05:32:56Z")

</div>

@Sairohith

Thank you for your time and effort in analyzing this issue.

The solution regarding this problem is that Pega has specific parsing techniques for different modeling approaches and supports only limited models. Each model expects different output properties. After the service request (SR), they updated the Pega documentation related to this topic in the “Supported Modeling Techniques with AWS SageMaker” section.

When we use any modeling technique not supported by Pega, it will dump the output in the result tab as `.pyModelRunResult` in this case. We should explicitly parse the properties we want from the result in our strategies.
