memoryscope.core.worker.frontend.semantic_rank_workerο
- class memoryscope.core.worker.frontend.semantic_rank_worker.SemanticRankWorker(embedding_model: str = '', generation_model: str = '', rank_model: str = '', **kwargs)[source]ο
Bases:
MemoryBaseWorker
The SemanticRankWorker class processes queries by retrieving memory nodes, removing duplicates, ranking them based on semantic relevance using a model, assigning scores, sorting the nodes, and storing the ranked nodes back, while logging relevant information.