The KnowledgeBase class is the main entry point for interacting with the a1facts knowledge base.
KnowledgeBase
class is the primary interface for working with a1facts
. It encapsulates the ontology, the knowledge graph, and the knowledge acquirer, providing a unified access point to all the functionalities of the framework.
To get started, you need to create an instance of the KnowledgeBase
class, which requires configuration files for the ontology and knowledge sources.
__init__
KnowledgeBase
class.
True
, the knowledge base will use a Neo4j backend. Otherwise, it will use an in-memory graph.True
, the knowledge base will not use Exa search for knowledge acquisition.query
ingest_knowledge
acquire_knowledge_for_query
get_tools
query_tool
and acquire_tool
.query_tool
query_tool
allows an agent to retrieve precise information from the knowledge graph by translating a natural language query into a graph traversal.
Parameters
acquire_tool
acquire_tool
enables an agent to ingest new information into the knowledge graph from the configured knowledge sources. It takes a query, fetches relevant data, and updates the graph according to the ontology.
Parameters