-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
直接导入数据,问答无法读取 #430
Comments
镜像中的KAG没有更新。看这个Issue 429。可以尝试自己更新Container里的KAG |
我用的是开发者模式哦 |
|
提交代码和数据,来调试下 |
就比如我只在图里导入 A-拜访->B,这样一个关系,然后问 A拜访过B吗,我看日志get_spo(s=s1:人物[A],p=p1:拜访,o=o1:人物[B],p.edge_type=拜访)的返回结果是空的。如果我将“A拜访过B”这样一个描述文本用kag build进图谱,再提同样一个问题,get_spo就有返回了,难道必须要有chunk吗 |
试试把SPO绑定到一个虚拟文本,注意Node的类型用LLM获取一下。 def buildKB(file_path):
from kag.common.conf import KAG_CONFIG
project_id = KAG_CONFIG.all_config["project"]["id"]
writer = KGWriter(project_id=project_id)
chunk_id = '6b3c0b184bde4292725e1b260bb54f802276dad5e18962a646d7e9facaa733a9'
nodes: List[Node] = [
Node('周杰伦', '周杰伦', 'TestOnly.Others', {}),
Node('周星驰', '周星驰', 'TestOnly.Others', {}),
Node(chunk_id, '虚拟文本', 'TestOnly.Chunk', {
'name': '虚拟文本',
'content': '周杰伦拜访周星驰'
}),
]
edges: List[Edge] = [
Edge('', nodes[0], nodes[1], '拜访', {}),
Edge('', nodes[0], nodes[2], 'source', {}),
Edge('', nodes[1], nodes[2], 'source', {}),
]
sub_graph = SubGraph(nodes, edges)
writer.invoke(sub_graph) |
我做了很多次测试 |
试试把数据导成domain_kg的形式 |
现在有业务场景,只想用kag智能问答功能,将外部结构化数据用KGWriter导入neo4j,随后进行问答测试,发现走图谱检索都是返回空,chunk检索也为空(没有chunk数据,这是正常),最后回答都是文档没有提供有关信息。想请问这是什么原因,必须要走build过程才能问答吗??
The text was updated successfully, but these errors were encountered: