perf(GraphView): 优化力导向图布局参数以提升性能

调整 alphaDecay、velocityDecay 和 charge.strength 参数,加快布局收敛速度并减少节点震荡
This commit is contained in:
Wenjie Zhang 2025-09-03 03:09:39 +08:00
parent 81aaef8e44
commit 06e1d3cb09
2 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,9 @@
- [ ] 使用更好的知识图谱检索方法
- [ ] 使用其他的聊天记录管理方法,解决两个问题,一个是上下文长度过长,一个是上下文的类型变得更加丰富,比如多模态等等。(现在是基于 LangGraph 的 Memory 实现的v0.2.3 版本实现),暂定使用 [mem0](github.com/mem0ai/mem0) 来实现。但是目前了解下来,还不是我想要的那种方案。可能会基于这个实现一个 ThreadConvManager 这个类。
- [ ] 添加对于上传文件的支持这里的复杂的地方就在于如何和历史记录结合在一起v0.2.3 版本实现,放在记忆管理后面)
- [ ] 将现在的GraphContainer相关的代码分离到一个单独的组件中然后 actions 和 footer 都是作为 slot top/bottom 提供的
- [ ] 移除现有的 GraphContainer 然后应用到 AgentView 中。
- [ ] 知识图谱的上传和可视化,支持属性,标签的展示
🐛**BUGs**
- [x] LlightRAG 知识库中,点击边,没有显示,但是在全屏的时候却又能够显示出来。

View File

@ -328,9 +328,9 @@ const initGraph = () => {
type: 'd3-force',
preventOverlap: true,
//
alphaDecay: 0.08, //
alphaDecay: 0.1, //
alphaMin: 0.01, // alpha
velocityDecay: 0.8, //
velocityDecay: 0.7, //
iterations: 100, //
//
force: {
@ -342,7 +342,7 @@ const initGraph = () => {
},
// -
charge: {
strength: -300, //
strength: -400, //
distanceMax: 400 //
},
// -