mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-06 08:16:00 +00:00
add score_recall manager
This commit is contained in:
parent
f7ce6e5e24
commit
95d0047e5c
2 changed files with 2 additions and 2 deletions
|
|
@ -144,7 +144,7 @@ class LlamaIndexEsMemoryStore(BaseMemoryStore):
|
|||
return TextNode(id_=memory_node.memory_id,
|
||||
text=memory_node.content,
|
||||
embedding=embedding,
|
||||
metadata=memory_node.model_dump(exclude={"content", "vector"}))
|
||||
metadata=memory_node.model_dump(exclude={"content", "vector", "score_recall", "score_rank", "score_rerank"}))
|
||||
|
||||
@staticmethod
|
||||
def _text_node_2_memory_node(text_node: NodeWithScore) -> MemoryNode:
|
||||
|
|
@ -158,4 +158,5 @@ class LlamaIndexEsMemoryStore(BaseMemoryStore):
|
|||
MemoryNode: The converted MemoryNode with text and metadata from the NodeWithScore.
|
||||
"""
|
||||
text_node.metadata["vector"] = text_node.embedding if text_node.embedding else []
|
||||
text_node.metadata["score_recall"] = text_node.score
|
||||
return MemoryNode(content=text_node.text, **text_node.metadata)
|
||||
|
|
|
|||
|
|
@ -702,7 +702,6 @@ class SyncElasticsearchStore(BasePydanticVectorStore):
|
|||
):
|
||||
total_rank = sum(top_k_scores)
|
||||
top_k_scores = [rank for rank in top_k_scores]
|
||||
print("top_k_scores:", top_k_scores)
|
||||
# top_k_scores = [(total_rank - rank) / total_rank for rank in top_k_scores]
|
||||
# top_k_scores = [total_rank - rank / total_rank for rank in top_k_scores]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue