99class StepReasoningVariant :
1010 id : int
1111 name : str
12+ actions : List [str ] = field (default_factory = list )
1213
1314 def asdict (self ) -> Dict [str , Any ]:
14- return {"id" : self .id , "name" : self .name }
15+ return {"id" : self .id , "name" : self .name , "actions" : self . actions }
1516
1617
1718@dataclass
1819class IncorrectStepReasoningVariant :
1920 id : int
2021 name : str
21- regenerate_conversations_after_incorrect_step : Optional [bool ] = True
22- 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
2326
2427 def asdict (self ) -> Dict [str , Any ]:
2528 actions = []
26- if self .regenerate_conversations_after_incorrect_step :
29+ if self .regenerate_steps :
2730 actions .append ("regenerateSteps" )
28- if self .rate_alternative_responses :
31+ if self .generate_and_rate_alternative_steps :
2932 actions .append ("generateAndRateAlternativeSteps" )
33+ if self .rewrite_steps :
34+ actions .append ("rewriteSteps" )
35+ if self .justification :
36+ actions .append ("justification" )
3037 return {"id" : self .id , "name" : self .name , "actions" : actions }
3138
3239 @classmethod
@@ -36,10 +43,11 @@ def from_dict(
3643 return cls (
3744 id = dictionary ["id" ],
3845 name = dictionary ["name" ],
39- regenerate_conversations_after_incorrect_step = "regenerateSteps"
40- in dictionary .get ("actions" , []),
41- rate_alternative_responses = "generateAndRateAlternativeSteps"
46+ regenerate_steps = "regenerateSteps" in dictionary .get ("actions" , []),
47+ generate_and_rate_alternative_steps = "generateAndRateAlternativeSteps"
4248 in dictionary .get ("actions" , []),
49+ rewrite_steps = "rewriteSteps" in dictionary .get ("actions" , []),
50+ justification = "justification" in dictionary .get ("actions" , []),
4351 )
4452
4553
@@ -162,20 +170,30 @@ def __post_init__(self):
162170 "This feature is experimental and subject to change." ,
163171 )
164172
165- def reset_regenerate_conversations_after_incorrect_step (self ):
173+ def reset_regenerate_steps (self ):
166174 """
167175 For live models, the default acation will invoke the model to generate alternatives if a step is marked as incorrect
168176 This method will reset the action to not regenerate the conversation
169177 """
170- self .definition .variants .incorrect_step .regenerate_conversations_after_incorrect_step = False
178+ self .definition .variants .incorrect_step .regenerate_steps = False
171179
172- def reset_rate_alternative_responses (self ):
180+ def reset_generate_and_rate_alternative_steps (self ):
173181 """
174182 For live models, will require labelers to rate the alternatives generated by the model
175183 """
176- self .definition .variants .incorrect_step .rate_alternative_responses = (
177- False
178- )
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
179197
180198 def asdict (self ) -> Dict [str , Any ]:
181199 return {
0 commit comments