Skip to content

[WIP Feature] Introduce Knowledge Evolver Module #170

Open
fanqiNO1 wants to merge 4 commits into
modelscope:mainfrom
fanqiNO1:self-evolving
Open

[WIP Feature] Introduce Knowledge Evolver Module #170
fanqiNO1 wants to merge 4 commits into
modelscope:mainfrom
fanqiNO1:self-evolving

Conversation

@fanqiNO1

@fanqiNO1 fanqiNO1 commented Jul 15, 2026

Copy link
Copy Markdown

🚀 Runtime Knowledge Evolution

  • Knowledge Evolution Framework: Introduced a signal-driven KnowledgeEvolver that organizes the runtime knowledge graph after each search — connecting and merging similar clusters, refreshing edges as embeddings drift, detecting communities, and periodically refining low-quality clusters — so the knowledge base improves with use.
  • Meta-Cluster Routing: Community detection builds meta clusters as a directory layer over the knowledge graph; similarity retrieval now routes through them, reducing per-query computation while keeping meta clusters out of recall.
  • Storage Enhancements: Extended KnowledgeStorage with joint cluster+embedding reads, richer merge semantics (queries, search results, merge counting), and reverse-edge cleanup on deletion.
  • Non-Blocking Integration: Evolution runs fire-and-forget after each search behind a kill switch, with reentrancy locking and LLM concurrency control, so search latency is unaffected.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a runtime knowledge cluster evolution system via the new KnowledgeEvolver class, which manages connecting, merging, and refreshing knowledge clusters. Key changes include integrating this evolver into the search workflow, updating the storage layer to support cascading edge deletions and deeper cluster merging, and adding leidenalg to requirements. The review feedback highlights critical issues with missing await keywords on several asynchronous database and logging calls, potential runtime TypeErrors during datetime parsing, a missing igraph dependency, and the risk of background tasks being garbage collected prematurely.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/sirchmunk/scheduler/evolver.py Outdated
Comment thread src/sirchmunk/scheduler/evolver.py Outdated
Comment thread src/sirchmunk/scheduler/evolver.py
Comment thread src/sirchmunk/scheduler/evolver.py
Comment thread src/sirchmunk/scheduler/evolver.py Outdated
Comment thread src/sirchmunk/scheduler/evolver.py Outdated
Comment thread src/sirchmunk/scheduler/evolver.py Outdated
Comment thread requirements/core.txt
Comment thread src/sirchmunk/scheduler/evolver.py Outdated
Comment thread src/sirchmunk/search.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant