Closed codyseally closed 4 months ago
Hey @codyseally, great to see you back! Hope you're doing well. 🚀
The error message "Scan vertices or edges need to specify a limit number, or limit number can not push down" you're encountering when trying to ingest PDF documents and build a knowledge graph using NebulaGraph with LlamaIndex version 0.10.15 is not directly related to the provided Python code from the llama-index-core/llama_index/core/indices/knowledge_graph/base.py
file. This error message is more likely related to the underlying graph database operations, specifically to NebulaGraph, rather than the LlamaIndex library itself.
NebulaGraph requires specifying a limit when scanning vertices or edges to prevent overwhelming the system with too much data at once. This is a common requirement for graph databases to ensure performance and resource utilization are kept within reasonable bounds. The error suggests that a query operation is being performed without specifying this limit, or the system is unable to apply the limit as expected.
However, the provided Python code does not include direct interactions with NebulaGraph's API or query language (nGQL). The code is primarily focused on the construction and manipulation of a knowledge graph index within the LlamaIndex framework, including the extraction of triplets from text and the management of these triplets within an in-memory graph store (SimpleGraphStore
).
To resolve the error, you would need to review the parts of your system that interact directly with NebulaGraph. Specifically, look for any queries that scan vertices or edges and ensure they include a LIMIT
clause with a reasonable number. If you're using a library or framework that abstracts away the direct nGQL queries, check its documentation or source code to understand how it expects limits to be specified and ensure your usage complies with these expectations.
In summary, the solution involves reviewing and adjusting the NebulaGraph query operations to include limits as required, which is not directly addressed by the provided Python code snippet.
Regarding the changes made to the LlamaIndex codebase between version 0.10.15 and the latest version 0.10.19, I'm unable to provide specific details as I don't have access to the repository's change logs or version history. It's recommended to check the repository's release notes or commit history for this information.
As for the role of NebulaGraph in the LlamaIndex framework, it serves as the backbone for a versatile query engine pack, enabling various modes of data retrieval and interaction with knowledge graphs and vector indexes. The NebulaGraphQueryEnginePack
class, as defined in the provided context, leverages NebulaGraph to support multiple query engine types, each catering to different retrieval needs. You can find more details about these modes in the NebulaGraphQueryEnginePack class documentation.
I hope this information helps. If you have further questions or need more clarification, feel free to ask.
Bug Description
When trying to ingest pdf documents and build o knowledge graph using NebulaGraph as my graph store, I get an error related to a limit number for scan vertices.
This returns :
The input is just a PDF document with a 3 page sample essay. If I try to perform a query using
I get the same error as above, followed by Query failed.
Version
llama-index==0.10.15
Steps to Reproduce
Try to run the provided code.
Relevant Logs/Tracbacks
No response