@@ -19,15 +19,21 @@ def asdict(self) -> Dict[str, Any]:
1919class IncorrectStepReasoningVariant :
2020 id : int
2121 name : str
22- regenerate_conversations_after_incorrect_step : Optional [bool ] = True
23- rate_alternative_responses : Optional [bool ] = True
22+ regenerate_steps : Optional [bool ] = True
23+ generate_and_rate_alternative_steps : Optional [bool ] = True
24+ rewrite_steps : Optional [bool ] = True
25+ justification : Optional [bool ] = True
2426
2527 def asdict (self ) -> Dict [str , Any ]:
2628 actions = []
27- if self .regenerate_conversations_after_incorrect_step :
29+ if self .regenerate_steps :
2830 actions .append ("regenerateSteps" )
29- if self .rate_alternative_responses :
31+ if self .generate_and_rate_alternative_steps :
3032 actions .append ("generateAndRateAlternativeSteps" )
33+ if self .rewrite_steps :
34+ actions .append ("rewriteSteps" )
35+ if self .justification :
36+ actions .append ("justification" )
3137 return {"id" : self .id , "name" : self .name , "actions" : actions }
3238
3339 @classmethod
@@ -37,10 +43,11 @@ def from_dict(
3743 return cls (
3844 id = dictionary ["id" ],
3945 name = dictionary ["name" ],
40- regenerate_conversations_after_incorrect_step = "regenerateSteps"
41- in dictionary .get ("actions" , []),
42- rate_alternative_responses = "generateAndRateAlternativeSteps"
46+ regenerate_steps = "regenerateSteps" in dictionary .get ("actions" , []),
47+ generate_and_rate_alternative_steps = "generateAndRateAlternativeSteps"
4348 in dictionary .get ("actions" , []),
49+ rewrite_steps = "rewriteSteps" in dictionary .get ("actions" , []),
50+ justification = "justification" in dictionary .get ("actions" , []),
4451 )
4552
4653
@@ -163,20 +170,30 @@ def __post_init__(self):
163170 "This feature is experimental and subject to change." ,
164171 )
165172
166- def reset_regenerate_conversations_after_incorrect_step (self ):
173+ def reset_regenerate_steps (self ):
167174 """
168175 For live models, the default acation will invoke the model to generate alternatives if a step is marked as incorrect
169176 This method will reset the action to not regenerate the conversation
170177 """
171- self .definition .variants .incorrect_step .regenerate_conversations_after_incorrect_step = False
178+ self .definition .variants .incorrect_step .regenerate_steps = False
172179
173- def reset_rate_alternative_responses (self ):
180+ def reset_generate_and_rate_alternative_steps (self ):
174181 """
175182 For live models, will require labelers to rate the alternatives generated by the model
176183 """
177- self .definition .variants .incorrect_step .rate_alternative_responses = (
178- False
179- )
184+ self .definition .variants .incorrect_step .generate_and_rate_alternative_steps = False
185+
186+ def reset_rewrite_steps (self ):
187+ """
188+ For live models, will require labelers to rewrite the conversation
189+ """
190+ self .definition .variants .incorrect_step .rewrite_steps = False
191+
192+ def reset_justification (self ):
193+ """
194+ For live models, will require labelers to provide a justification for their evaluation
195+ """
196+ self .definition .variants .incorrect_step .justification = False
180197
181198 def asdict (self ) -> Dict [str , Any ]:
182199 return {
0 commit comments