Base KnowledgeStore¶
Base Knowledge Store
BaseKnowledgeStore
¶
Bases: BaseModel
, ABC
Base Knowledge Store Class.
Source code in src/fed_rag/base/knowledge_store.py
load_node
abstractmethod
¶
load_nodes
abstractmethod
¶
retrieve
abstractmethod
¶
Retrieve top-k nodes from KnowledgeStore against a provided user query.
Returns:
Type | Description |
---|---|
list[tuple[float, KnowledgeNode]]
|
A list of tuples where the first element represents the similarity score |
list[tuple[float, KnowledgeNode]]
|
of the node to the query, and the second element is the node itself. |