langchain/experimental/autonomous_agents/baby_agi/baby_agi.py/BabyAGI/_get_top_tasks
class BabyAGI:    def _get_top_tasks(self, query: str, k: int) -> List[str]:
        """Get the top k tasks based on the query."""
        results = self.vectorstore.similarity_search(query, k=k)
        if not results:
            return []
        return [str(item.metadata["task"]) for item in results]