-
Notifications
You must be signed in to change notification settings - Fork 162
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
[Bug]: agentchat_graph_rag_neo4j/ Notebook: queryengine.query always returns empty #306
Comments
Unfortunately, now the query engine can only answer questions based on the context in the database but can't create cypher query from natural language with input like your example, which I don't think is part of graph rag's capability. I'm curious about your use case. Do you want to use query engine directly to help execute database operations with human language? |
@Eric-Shang I found that when I run .initiate_chat() in the notebook, it always returns an empty result. I drilled down a little deeper and found that .initiate_chat() calls query_engine.query(), which always returns 'Empty Response', so I think that may be why the agents always return an empty result. |
@Eric-Shang Just to be clear, every time I run the notebook using Azure OpenAI for my LLM, the .initiate_chat() method causes my agents to converse, but one agent always returns "Empty Response". I am not sure how to fix this. |
@tyler-suard-parker Sorry for late reply. Are you using our given notebook or the above one? As I mentioned, query engine won't be able to answer "Return all records" because the question has no context (it doesn't know what "records" refer to). If you ask specific questions about an entity or relationship, it should be able to answer. Could you share me with other questions that you got empty response and the expected answers? Btw, Sometimes I may miss email notification. You could ping me on Discord. I sent you a DM on Discord before (My discord name is JS). |
If you always gets empty response, it might be easier for us to talk about more details on Discord, and probably we can debug together, since I can't reproduce the error on my end |
Describe the bug
@Eric-Shang Sorry to bother you again, I know you must be very busy. I got the LLM and the embedding up and running, but the Neo4jGraphQueryEngine is returning empty every time.
I used neo4j.GraphDatabase to test my database connection, and it works, I can query the database. However, when I try to use the Neo4jGraphQueryEngine to query the same database with the same credentials, it always returns empty.
Output:
{'n': {'Status': 'ACTIVE', 'LogStatus': 'First Snapshot', 'UCMType': '1-DISTRIBUTOR','}}
{'n': {'Status': 'ACTIVE', 'LogStatus': 'First Snapshot', 'UCMType': '1-DISTRIBUTOR',}}
{'n': {'Status': 'ACTIVE', 'LogStatus': 'First Snapshot', 'UCMType': '8-DIRECT CUSTOMER',}}
{'n': {'Status': 'ACTIVE', 'Addr1': 'UNKNOWN-001144', 'LastUpdate': '2023-07-11 09:40:03.203'}}
{'n': {'Status': 'ACTIVE', 'Addr1': '747 ZECKENDORF BLVD', 'LastUpdate': '2023-07-11 09:40:03.}}
Output:
GraphStoreQueryResult(answer='Empty Response', results=[])
Steps to reproduce
Run this notebook:
https://github.com/ag2ai/ag2/blob/main/notebook/agentchat_graph_rag_neo4j.ipynb
After creating the query engine, run this code:
Model Used
gpt-4
Expected Behavior
It should have returned any 5 records.
Screenshots and logs
Additional Information
No response
The text was updated successfully, but these errors were encountered: