Skip to content
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

Neo4j查询无结果:No high level context found. Switching to local mode. An error occurred: cannot access local variable 'll_entities_context' where it is not associated with a value #501

Open
hixulei opened this issue Dec 21, 2024 · 1 comment

Comments

@hixulei
Copy link

hixulei commented Dec 21, 2024

复现:

  1. 将lightrag跑的数据导入到neo4j 社区版的数据库中,确定数据库中有对应的节点字段。
  2. 使用python连接neo4j使用图数据库查询(而非本地json文件)系统给出的结果如下

No high level context found. Switching to local mode. An error occurred: cannot access local variable 'll_entities_context' where it is not associated with a value

相关日志:

############################# -Real Data- ###################### Query: 刘敬沙是谁? ###################### The Outputshould be human text, not unicode characters. Keep the same language asQuery`.
Output:

DEBUG:lightrag:System prompt: None
DEBUG:lightrag:Full context:
INFO:httpx:HTTP Request: POST https://api.deepseek.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:lightrag:kw_prompt result:

{
  "high_level_keywords": ["PERSON"],
  "low_level_keywords": ["刘敬沙"]
}

INFO:httpx:HTTP Request: POST https://api.siliconflow.cn/v1/embeddings "HTTP/1.1 200 OK"
WARNING:lightrag:No high level context found. Switching to local mode.
An error occurred: cannot access local variable 'll_entities_context' where it is not associated with a value`

现在遇到的问题是,本地跑的json数据进行查询,一定是有结果的,但是调用neo4j数据库就不会返回结果。

@hixulei hixulei changed the title No high level context found. Switching to local mode. An error occurred: cannot access local variable 'll_entities_context' where it is not associated with a value Neo4j查询无结果:No high level context found. Switching to local mode. An error occurred: cannot access local variable 'll_entities_context' where it is not associated with a value Dec 21, 2024
@hixulei
Copy link
Author

hixulei commented Dec 21, 2024

追加:这个问题好像和查询的Cypher 语句不匹配有关,我要查询的其实是每个节点下的id值,但是如果使用你这种方式查的话,貌似查的是节点名,节点名字必然查不到东西。

除了上述报错外,最可能出现的是下面的样子:

`
---Goal---

Generate a response of the target length and format that responds to the user's question, summarizing all information in the input data tables appropriate for the response length and format, and incorporating any relevant general knowledge.
If you don't know the answer, just say so. Do not make anything up.
Do not include information where the supporting evidence for it is not provided.

---Target response length and format---

Multiple Paragraphs

---Data tables---

-----Entities-----

id,entity,type,description,rank

-----Relationships-----

id,source,target,description,keywords,weight,rank

-----Sources-----

id,content

Add sections and commentary to the response as appropriate for the length and format. Style the response in markdown.

DEBUG:lightrag:Full context:
INFO:httpx:HTTP Request: POST https://api.deepseek.com/v1/chat/completions "HTTP/1.1 200 OK"
根据提供的数据表,没有关于电话号码xxxxx的信息。因此,我无法回答这个问题。

`

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

No branches or pull requests

1 participant