class_docstr: Teachability uses a vector database to give an agent the ability to remember user teachings,
  where the user is any caller (human or not) sending messages to the teachable agent.
  Teachability is designed to be composable with other agent capabilities.
  To make any conversable agent teachable, instantiate both the agent and the Teachability class,
  then pass the agent to teachability.add_to_agent(agent).
  Note that teachable agents in a group chat must be given unique path_to_db_dir values.
class_docstr_tok: ["Teachability","uses","a","vector","database","to","give","an","agent","the","ability","to","remember","user","teachings",",","where","the","user","is","any","caller","(","human","or","not",")","sending","messages","to","the","teachable","agent",".","Teachability","is","designed","to","be","composable","with","other","agent","capabilities",".","To","make","any","conversable","agent","teachable",",","instantiate","both","the","agent","and","the","Teachability","class",",","then","pass","the","agent","to","teachability.add_to_agent","(","agent",")",".","Note","that","teachable","agents","in","a","group","chat","must","be","given","unique","path_to_db_dir","values","."]
docstr: Returns semantically related memos from the DB.
docstr_tok: ["Returns","semantically","related","memos","from","the","DB","."]
code: def _retrieve_relevant_memos(self, input_text):
      """Returns semantically related memos from the DB."""
      memo_list = self.memo_store.get_related_memos(
          input_text,
          n_results=self.max_num_retrievals,
          threshold=self.recall_threshold,
      )
  
      if self.verbosity >= 1:
          # Was anything retrieved?
          if len(memo_list) == 0:
              # No. Look at the closest memo.
              print(
                  colored(
                      "\nTHE CLOSEST MEMO IS BEYOND THE THRESHOLD:",
                      "light_yellow",
                  )
              )
              self.memo_store.get_nearest_memo(input_text)
              print()  # Print a blank line. The memo details were printed by get_nearest_memo().
  
      # Create a list of just the memo output_text strings.
      memo_list = [memo[1] for memo in memo_list]
      return memo_list
  
imports: import os
  from autogen.agentchat.assistant_agent import ConversableAgent
  from autogen.agentchat.contrib.capabilities.agent_capability import AgentCapability
  from autogen.agentchat.contrib.text_analyzer_agent import TextAnalyzerAgent
  from typing import Dict, Optional, Union, List, Tuple, Any
  import chromadb
  from chromadb.config import Settings
  import pickle
label_desc: Use image node_id 7 for calling the Teachability obj's underlying member method code with example usage: obj._retrieve_relevant_memos(input_text) and returns: memo_list