跳到主要内容

知识图谱

Memorose 使用图谱关系把记忆单元、任务和高阶洞察连接起来。

图谱如何增长

自动连边

后台流程会根据相似度、整合和社区分析自动生成图谱结构。

手动连边

你也可以通过 API 显式写入边:

curl -s -X POST "http://127.0.0.1:3000/v1/users/user_123/graph/edges" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_id": "11111111-1111-1111-1111-111111111111",
"target_id": "22222222-2222-2222-2222-222222222222",
"relation": "RelatedTo",
"weight": 0.75
}'

当前支持的关系类型包括:

  • Next
  • RelatedTo
  • Contradicts
  • Supports
  • Abstracts
  • DerivedFrom
  • CausedBy
  • EvolvedTo
  • IsSubTaskOf
  • Blocks
  • Accomplishes

与检索的关系

检索接口支持 graph_depth,所以图谱不会变成一个孤立子系统,它会直接参与结果扩展。