Skip to main content
The KnowledgeAcquirer class uses an agent to interact with defined knowledge sources, acquire new information, and update the knowledge graph.

__init__(self, graph: KnowledgeGraph, ontology: KnowledgeOntology, knowledge_sources_config_file: str)

Initializes a new instance of the KnowledgeAcquirer class.
Parameters:
  • graph (KnowledgeGraph): The knowledge graph to be updated.
  • ontology (KnowledgeOntology): The ontology that defines the structure of the knowledge graph.
  • knowledge_sources_config_file (str): The path to the YAML file that configures the knowledge sources.
  • disable_exa (bool): If True, the knowledge base will not use Exa search for knowledge acquisition. Defaults to False.

acquire(self, query: str)

Executes a query to acquire new knowledge from the configured sources.
Parameters:
  • query (str): The query to guide the knowledge acquisition process.
Returns:
  • The content of the agent’s response as a string.