You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having this problem with files, it doesn't happen every time, and reprocessing the file after I've cleaned the database will fix it, but it will come up again at some point, and I want to know what is causing this.The following is the log information.
2025-01-08 15:31:36,937 - update KNN graph
2025-01-08 15:31:36,980 - Exception in post_processing tasks: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke procedure db.index.vector.queryNodes: Caused by: java.lang.IllegalArgumentException: Index query vector has 768 dimensions, but indexed vectors have 384.}
Traceback (most recent call last):
File "D:\workspace\pythonSpace\Neo4j-GraphRAG\backend\score.py", line 309, in post_processing
await asyncio.to_thread(update_graph, graph)
File "D:\anaconda\envs\GraphRAG\lib\asyncio\threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
File "D:\anaconda\envs\GraphRAG\lib\asyncio\futures.py", line 285, in await
yield self # This tells Task to wait for completion.
File "D:\anaconda\envs\GraphRAG\lib\asyncio\tasks.py", line 304, in __wakeup
future.result()
File "D:\anaconda\envs\GraphRAG\lib\asyncio\futures.py", line 201, in result
raise self._exception.with_traceback(self._exception_tb)
File "D:\anaconda\envs\GraphRAG\lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\workspace\pythonSpace\Neo4j-GraphRAG\backend\src\main.py", line 574, in update_graph
graph_DB_dataAccess.update_KNN_graph()
File "D:\workspace\pythonSpace\Neo4j-GraphRAG\backend\src\graphDB_dataAccess.py", line 151, in update_KNN_graph
self.graph.query("""MATCH (c:Chunk)
File "D:\anaconda\envs\GraphRAG\lib\site-packages\langchain_community\graphs\neo4j_graph.py", line 430, in query
data = session.run(Query(text=query, timeout=self.timeout), params)
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\work\session.py", line 314, in run
self._auto_result._run(
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\work\result.py", line 221, in _run
self._attach()
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\work\result.py", line 409, in _attach
self._connection.fetch_message()
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\io_common.py", line 178, in inner
func(*args, **kwargs)
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\io_bolt.py", line 855, in fetch_message
res = self._process_message(tag, fields)
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\io_bolt5.py", line 370, in _process_message
response.on_failure(summary_metadata or {})
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\io_common.py", line 245, in on_failure
raise Neo4jError.hydrate(**metadata)
neo4j.exceptions.ClientError: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke procedure db.index.vector.queryNodes: Caused by: java.lang.IllegalArgumentException: Index query vector has 768 dimensions, but indexed vectors have 384.}
The text was updated successfully, but these errors were encountered:
This is an index dimension mismatch error we already have a check during the connect API in the future we are adding check-in extract API also so can you explain in which scenario it is coming
this error occurs when you change embedding model
Your database should have same dimensions embeddings. You can check through query. MATCH (n:Chunk) return DISTINCT(size(n.embedding))
This will return the dimension of embeddings created. If there are more than 1 value then it will give this error.
Solution : Clear the database.
If you are changing embedding model then clearing the db is solution as of now.
I'm having this problem with files, it doesn't happen every time, and reprocessing the file after I've cleaned the database will fix it, but it will come up again at some point, and I want to know what is causing this.The following is the log information.
2025-01-08 15:31:36,937 - update KNN graph
2025-01-08 15:31:36,980 - Exception in post_processing tasks: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke procedure
db.index.vector.queryNodes
: Caused by: java.lang.IllegalArgumentException: Index query vector has 768 dimensions, but indexed vectors have 384.}Traceback (most recent call last):
File "D:\workspace\pythonSpace\Neo4j-GraphRAG\backend\score.py", line 309, in post_processing
await asyncio.to_thread(update_graph, graph)
File "D:\anaconda\envs\GraphRAG\lib\asyncio\threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
File "D:\anaconda\envs\GraphRAG\lib\asyncio\futures.py", line 285, in await
yield self # This tells Task to wait for completion.
File "D:\anaconda\envs\GraphRAG\lib\asyncio\tasks.py", line 304, in __wakeup
future.result()
File "D:\anaconda\envs\GraphRAG\lib\asyncio\futures.py", line 201, in result
raise self._exception.with_traceback(self._exception_tb)
File "D:\anaconda\envs\GraphRAG\lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\workspace\pythonSpace\Neo4j-GraphRAG\backend\src\main.py", line 574, in update_graph
graph_DB_dataAccess.update_KNN_graph()
File "D:\workspace\pythonSpace\Neo4j-GraphRAG\backend\src\graphDB_dataAccess.py", line 151, in update_KNN_graph
self.graph.query("""MATCH (c:Chunk)
File "D:\anaconda\envs\GraphRAG\lib\site-packages\langchain_community\graphs\neo4j_graph.py", line 430, in query
data = session.run(Query(text=query, timeout=self.timeout), params)
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\work\session.py", line 314, in run
self._auto_result._run(
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\work\result.py", line 221, in _run
self._attach()
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\work\result.py", line 409, in _attach
self._connection.fetch_message()
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\io_common.py", line 178, in inner
func(*args, **kwargs)
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\io_bolt.py", line 855, in fetch_message
res = self._process_message(tag, fields)
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\io_bolt5.py", line 370, in _process_message
response.on_failure(summary_metadata or {})
File "D:\anaconda\envs\GraphRAG\lib\site-packages\neo4j_sync\io_common.py", line 245, in on_failure
raise Neo4jError.hydrate(**metadata)
neo4j.exceptions.ClientError: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke procedure
db.index.vector.queryNodes
: Caused by: java.lang.IllegalArgumentException: Index query vector has 768 dimensions, but indexed vectors have 384.}The text was updated successfully, but these errors were encountered: