You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assertresult.error_message=="The original response contains potential biases that are now addressed."
25
-
assertresult.fix_value=="The sun rises for everyone."
21
+
assertresult.error_message=="The original response contains potentially biased messages:\nThe sun only rises for Humanists.\n (Message scores: 0.6546186208724976)"
| Programmatic fix | The debiased text if bias is detected |
25
24
26
25
Args:
27
-
debias_strength (float): The strength of the bias to apply, ranging from 0 to 1.
28
-
on_fail (Callable): The policy to enact when a validator fails. If `str`, must be one of `reask`, `fix`, `filter`, `refrain`, `noop`, `exception` or `fix_reask`. Otherwise, must be a function that is called when the validator fails.
26
+
threshold (float): Higher is more likely to allow bias. Lower is more sensitive and more likely to flag biased messages.
27
+
on_fail (Callable): The policy to enact when a validator fails. If `str`, must be one of `filter`, `noop`, or `exception`. Otherwise, must be a function that is called when the validator fails.
0 commit comments