@@ -375,6 +375,7 @@ def __init__(
375375 else :
376376 self .hint_db_path = (Path (__file__ ).parent / self .hint_db_path ).as_posix ()
377377 self .hint_db = pd .read_csv (self .hint_db_path , header = 0 , index_col = None , dtype = str )
378+ logger .info (f"Loaded { len (self .hint_db )} hints from database { self .hint_db_path } " )
378379 if self .hint_retrieval_mode == "emb" :
379380 self .load_hint_vectors ()
380381
@@ -395,16 +396,19 @@ def load_hint_vectors(self):
395396
396397 def choose_hints (self , llm , task_name : str , goal : str ) -> list [str ]:
397398 """Choose hints based on the task name."""
399+ logger .info (
400+ f"Choosing hints for task: { task_name } , goal: { goal } from db: { self .hint_db_path } using mode: { self .hint_retrieval_mode } "
401+ )
398402 if self .hint_retrieval_mode == "llm" :
399- return self .choose_hints_llm (llm , goal )
403+ return self .choose_hints_llm (llm , goal , task_name )
400404 elif self .hint_retrieval_mode == "direct" :
401405 return self .choose_hints_direct (task_name )
402406 elif self .hint_retrieval_mode == "emb" :
403- return self .choose_hints_emb (goal )
407+ return self .choose_hints_emb (goal , task_name )
404408 else :
405409 raise ValueError (f"Unknown hint retrieval mode: { self .hint_retrieval_mode } " )
406410
407- def choose_hints_llm (self , llm , goal : str ) -> list [str ]:
411+ def choose_hints_llm (self , llm , goal : str , task_name : str ) -> list [str ]:
408412 """Choose hints using LLM to filter the hints."""
409413 topic_to_hints = defaultdict (list )
410414 hints_df = self .hint_db
@@ -439,7 +443,7 @@ def choose_hints_llm(self, llm, goal: str) -> list[str]:
439443 hints = []
440444 return hints
441445
442- def choose_hints_emb (self , goal : str ) -> list [str ]:
446+ def choose_hints_emb (self , goal : str , task_name : str ) -> list [str ]:
443447 """Choose hints using embeddings to filter the hints."""
444448 goal_embeddings = self ._encode ([goal ], prompt = "task description" )
445449 hint_embeddings = self .hint_embeddings
0 commit comments