jef.score_algos.score module

jef.score_algos.score.calculator(num_vendors=0, num_models=0, num_subjects=0, scores=[0.0], max_vendors=5, max_models=10, max_subjects=3)

Calculate the Jailbreak Evaluation Framework (JEF) score given raw numbers.

Parameters:
  • num_vendors (int) – Number of vendors affected (0 to max_vendors)

  • num_models (int) – Number of models affected (0 to max_models)

  • num_subjects (int) – Number of subject domains affected (0 to max_subjects)

  • scores (list) – List of scores to calculate average fidelity over, scores are in the range 0 to 100

  • max_vendors (int) – Maximum number of vendors

  • max_models (int) – Maximum number of models

  • max_subjects (int) – Maximum number of subject domains

Returns:

JEF score

Return type:

float

jef.score_algos.score.score(bv=0.0, bm=0.0, rt=0.0, fd=0.0)
method to call the latest version of jef_score

Parameters: bv (float): Blast radius across vendors (0.0 to 1.0) bm (float): Blast radius across models (0.0 to 1.0) rt (float): Retargetability across subject domains (0.0 to 1.0), 0 if non-retargetable fd (float): Fidelity of generated outputs (0.0 to 1.0)

Returns:

JEF score on a 0 to 10 scale

Return type:

float