Open tituslhy opened 1 month ago
The issue you're experiencing with data not appearing in the Neo4j browser after using PropertyGraphIndex.from_documents()
could be due to several factors. Here are some steps to troubleshoot and verify the data ingestion:
Check Neo4j Connection: Ensure that the Neo4j instance is running and accessible at the specified URL (bolt://localhost:7687
). Verify that the credentials (username and password) are correct.
Verify Data Ingestion: Double-check that the PropertyGraphIndex.from_documents()
method is correctly configured to ingest data into the Neo4j database. Ensure that the property_graph
parameter is set to your Neo4jPropertyGraphStore
instance.
Inspect Logs: Although you mentioned there are no logs, try enabling more detailed logging to capture any potential issues during the ingestion process. This can help identify if there are any silent errors.
Schema and Constraints: Ensure that the necessary constraints and indexes are created in the Neo4j database. The Neo4jPropertyGraphStore
should handle this, but you can manually verify by checking the database schema.
Deprecation Warning: The warning message you received about a deprecated feature in Neo4j might not directly affect data ingestion, but it's worth checking if the version of Neo4j or the APOC library you're using is compatible with the LlamaIndex library.
Data Verification: After running the ingestion, try executing a simple query in the Neo4j browser to check for any nodes or relationships, such as MATCH (n) RETURN n LIMIT 10
.
If these steps do not resolve the issue, consider reviewing the configurations and ensuring that all components (Neo4j, LlamaIndex, and any dependencies) are correctly set up and compatible.
To continue talking to Dosu, mention @dosu.
Bug Description
I was following this link. After setting up my
PropertyGraphIndex.from_documents()
, I navigated to the Neo4j browser on localhost:7474 and typedmatch n=() return n
but saw nothing - the data didn't get ingested?Version
0.11.14
Steps to Reproduce
Here's my code
I navigated to localhost:7474 and changed my password to llamaindex like the cookbook
Type the following in the notebook
Finishing this cell yielded the message
eceived notification from DBMS server: {severity: WARNING} {code: Neo.ClientNotification.Statement.FeatureDeprecationWarning} {category: DEPRECATION} {title: This feature is deprecated and will be removed in future versions.} {description: The procedure has a deprecated field. ('config' used by 'apoc.meta.graphSample' is deprecated.)} {position: line: 1, column: 1, offset: 0} for query: "CALL apoc.meta.graphSample() YIELD nodes, relationships RETURN nodes, [rel in relationships | {name:apoc.any.property(rel, 'type'), count: apoc.any.property(rel, 'count')}] AS relationships"
Type in notebook
client = QdrantClient(host="localhost", port=6333) aclient = AsyncQdrantClient(host="localhost", port=6333)
delete collection if it exists
if client.collection_exists("PaulGraham"): client.delete_collection("PaulGraham")
vector_store = QdrantVectorStore( "Titus_Resume", client = client, aclient = aclient, fastembed_sparse_model="Qdrant/bm42-all-minilm-l6-v2-attentions", )
from llama_index.core import SimpleDirectoryReader
docs = SimpleDirectoryReader(input_files=["../../../data/paul_graham_essay.txt"]).load_data()
from llama_index.core import ( Settings, StorageContext, load_index_from_storage ) from llama_index.core.indices import PropertyGraphIndex from llama_index.core.indices.property_graph import ( SimpleLLMPathExtractor, ImplicitPathExtractor ) from llama_index.llms.ollama import Ollama from llama_index.embeddings.ollama import OllamaEmbedding
simple_path_extractor = SimpleLLMPathExtractor( max_paths_per_chunk=10, num_workers=4, ) implicit_path_extractor = ImplicitPathExtractor() Settings.llm = Ollama("llama3.2") Settings.embed_model = OllamaEmbedding("nomic-embed-text") index = PropertyGraphIndex.from_documents( docs, property_graph = graph_store, vector_store = vector_store, embed_kg_nodes = True, kg_extractors = [ simple_path_extractor, implicit_path_extractor ] )