Skip to content

Commit 68cd70d

Browse files
feat: add feedback option in config
1 parent f552a1b commit 68cd70d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

balrog/config/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ eval:
2323
save_images: False # Whether to save images from the environment
2424
icl_episodes: 1
2525
icl_dataset: records
26+
feedback_on_invalid_action : True # Whether to provide feedback on invalid actions
2627

2728
client:
2829
client_name: openai # LLM client to use (e.g., 'openai', 'gemini', 'claude')

balrog/evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def run_episode(self, task, agent, process_num=None, position=0, episode_idx=0):
323323
obs["text"]["long_term_context"] = (
324324
f"\n\nYour previous output action: '{response.completion}' is not a valid action. Defaulted to action: {action}\n"
325325
+ obs["text"]["long_term_context"]
326-
if action != response.completion
326+
if (action != response.completion) and (self.config.eval.feedback_on_invalid_action)
327327
else obs["text"]["long_term_context"]
328328
)
329329
action = response.completion

0 commit comments

Comments
 (0)