@@ -51,25 +51,13 @@ class GenericPromptFlags(dp.Flags):
5151 use_abstract_example : bool = False
5252 use_hints : bool = False
5353 use_task_hint : bool = False
54- task_hint_retrieval_mode : Literal ["direct" , "llm" , "emb" ] = "direct"
55- skip_hints_for_current_task : bool = False
56- hint_db_path : str = None
5754 enable_chat : bool = False
5855 max_prompt_tokens : int = None
5956 be_cautious : bool = True
6057 extra_instructions : str | None = None
6158 add_missparsed_messages : bool = True
6259 max_trunc_itr : int = 20
6360 flag_group : str = None
64- # hint flags
65- hint_type : Literal ["human" , "llm" , "docs" ] = "human"
66- hint_index_type : Literal ["sparse" , "dense" ] = "sparse"
67- hint_query_type : Literal ["direct" , "llm" , "emb" ] = "direct"
68- hint_index_path : str = None
69- hint_retriever_path : str = None
70- hint_num_results : int = 5
71- n_retrieval_queries : int = 3
72- hint_level : Literal ["episode" , "step" ] = "episode"
7361
7462
7563class MainPrompt (dp .Shrinkable ):
@@ -135,7 +123,7 @@ def _prompt(self) -> HumanMessage:
135123{ self .history .prompt } \
136124{ self .action_prompt .prompt } \
137125{ self .hints .prompt } \
138- { self .task_hint .prompt } \
126+ { self .task_hints .prompt } \
139127{ self .be_cautious .prompt } \
140128{ self .think .prompt } \
141129{ self .plan .prompt } \
@@ -156,7 +144,7 @@ def _prompt(self) -> HumanMessage:
156144{ self .plan .abstract_ex } \
157145{ self .memory .abstract_ex } \
158146{ self .criticise .abstract_ex } \
159- { self .task_hint .abstract_ex } \
147+ { self .task_hints .abstract_ex } \
160148{ self .action_prompt .abstract_ex } \
161149 """
162150 )
@@ -172,7 +160,7 @@ def _prompt(self) -> HumanMessage:
172160{ self .plan .concrete_ex } \
173161{ self .memory .concrete_ex } \
174162{ self .criticise .concrete_ex } \
175- { self .task_hint .concrete_ex } \
163+ { self .task_hints .concrete_ex } \
176164{ self .action_prompt .concrete_ex } \
177165 """
178166 )
@@ -303,7 +291,12 @@ def __init__(
303291 super ().__init__ (visible = visible )
304292 self .task_hints = task_hints
305293
306- _prompt = "" # Task hints are added dynamically in MainPrompt
294+ @property
295+ def _prompt (self ):
296+ task_hint_str = "# Hints:\n Here are some hints for the task you are working on:\n "
297+ for hint in self .task_hints :
298+ task_hint_str += f"{ hint } \n "
299+ return task_hint_str
307300
308301 _abstract_ex = """
309302<task_hint>
0 commit comments