Skip to main content

Detecting unwanted bias in engagement policy conditions

6 Tasks

15 mins

Visible to: All users
Beginner
Pega Customer Decision Hub '24.1
English
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Scenario

U+ Bank is currently cross-selling on the web by showing various credit cards to its customers.

The bank wants to run an ethical bias simulation in Pega Customer Decision Hub™ and identify any unwanted bias in the engagement policy conditions. If any bias is detected, the bank would like to adjust the bias threshold to allow slight bias to comply with their business regulations and requirements.

Use the following credentials to log in to the exercise system:

Role User name Password
Next-Best-Action Designer NBADesigner rules

Your assignment consists of the following tasks:

Task 1: Create an ethical bias policy

Create an ethical bias policy to include the .Customer.Age and .Customer.Gender properties with the Data-Decision-Request-Customer-CDH class as the context.

Task 2: Create an ethical bias simulation run

Create an ethical bias simulation run to check unwanted bias in the engagement policy conditions.

Task 3: Examine the simulation results

Examine the simulation results to identify on which property bias was detected.

Task 4: Check engagement policy conditions

Check the engagement policy conditions to know which condition is causing the bias.

Task 5: Modify the ethical bias policy

Modify the ethical bias policy to increase the threshold of the Age property.

Task 6: Re-run the ethical bias simulation run

Re-run the ethical bias simulation to verify the changes made to the ethical bias policy.

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Challenge Walkthrough

Detailed Tasks

1 Create an ethical bias policy

  1. On the exercise system landing page, click Pega Infinity™ to log in to Customer Decision Hub.
  2. Log in to Customer Decision Hub as a Next-Best-Action Designer:
    1. In the User name field, enter NBADesigner.
    2. In the Password field, enter rules.
  3. In the header of Customer Decision Hub, click the Configuration icon, and then select Ethical Bias Policy to configure an ethical bias policy.
    Ethical Bias Policy
  4. In the Bias fields section, in the Context field, enter or select Data-Decision-Request-Customer-CDH.
    Ethical bias context class CDH
  5. Click Add bias field to include the properties that you want to test.
    Add bias field
  6. In the Add bias field window, in the Field field, enter or select .Customer.Age.
    Add Age bias field
  7. Click Next.
  8. Leave the Do the numbers represent categories? set to No.
  9. In the Add bias field window, click Add bias field.
  10. Click Add bias field.
  11. In the Add bias field window, in the Field field, enter or select .Customer.Gender.
    Add Gender as a bias field
  12. Click Add bias field.
  13. Click the Bias threshold tab.
    Bias threshold
  14. In the Grow section, click Customer.Age.
    Grow bias threshold
  15. In the Customer.Age window, select 0 Gini (No shift).
    Gini
  16. In the Grow section, click Customer.Gender.
    Grow gender threshold
  17. In the Customer.Gender window, select 1 Rate ratio (No shift)
    Rate ratio
  18. Click Save to save the ethical bias policy.

2 Create an ethical bias simulation run

  1. In the navigation pane of the Customer Decision Hub, click Testing > Simulations to access the simulation tests.
    Simulation testing
  2. In the upper-right corner, click Create > Ethical bias to configure the simulation run of the ethical bias policy.
    Create Ethical Bias
  3. In the Configure inputs section, next to Strategy, click Configure to select a strategy on which you want to run the simulation.
    Configure strategy
  4. In the Strategy dialog box, to the right of the NBA_Grow_Creditcards strategy, click Add.
    Strategy
  5. Click Apply to add the strategy.
  6. In the Configure inputs section, next to Audience, click Configure to select an audience on which you want to run the simulation.
    Configure audience
  7. In the Audience dialog box, to the right of the SampledCustomers_Inbound audience, click Add.
    Select audience
  8. Click Apply to add the audience.
  9. Click the Edit icon to update the Simulation name field.
    Edit the simulation name
  10. In the Simulation name field, enter EthicalBias_NBAGrow.
  11. Click Done.
    Rename simulation
    Note: The simulation results are output to the Insights data set.
    Output destination


    Note that the simulation has two bias reports automatically available as output.

    Bias report
  12. Click Submit and Run to run the simulation.

3 Examine the simulation results

  1. Once the simulation run is complete, click Review reports.
    Note that bias is identified.
    Bias identified
  2. Click Bias report to learn which property has the bias identified and for which action.
    Open bias report
  3. In the Bias report, click the Bias detected column, and then click Sort > Highest to lowest to sort the report by listing the actions with bias on the top.
    Sort bias report
    Note: The bias is detected on Age.
    Bias report with bias detected
  1. Close the report.

4 Check the engagement policy conditions

  1. In the navigation pane of Customer Decision Hub, click Next-Best-Action > Designer to open Next-Best-Action Designer.
    NBA designer
  2. Click Engagement policy.
    Engagement policy
  3. In the Business structure section, click Grow > Credit cards.
    Business structure
  4. In the Customer actions section, verify that Age is defined as an eligibility condition.
    Eligibility conditions
    Note: As Age is used as an eligibility condition, which cannot be ignored, the bias threshold for the property needs to be adjusted to allow little bias.
  1. Close Next-Best-Action Designer.

5 Modify the ethical bias policy

  1. In the upper right, click the Configuration icon, and then select Ethical Bias Policy.
  2. In the Grow section, click Customer.Age.
  3. In the Customer.Age window, select 0.1 Gini.
    Gini value
  4. Click Save to save the ethical bias policy.

6 Re-run the ethical bias simulation run

  1. In the navigation pane of Customer Decision Hub, click Simulation Testing to access the simulation tests.
  2. Click S-##### to open the ethical bias run.
  3. Click Actions > Restart simulation to re-run the ethical bias simulation.
    Restart simulation
  4. Click Submit to confirm the simulation run.
  5. Once the run is complete, click Review reports.
    Note that there is no bias detected now.
    No bias detected
  6. Open the Bias report.
  7. Verify that the Bias detected field is false for all the actions.
    Bias report results

This Challenge is to practice what you learned in the following Modules:


Available in the following missions:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice