Open ritzvik opened 2 months ago
It appears the issue you're encountering with embedding vectors not being stored in Neo4j nodes, despite setting include_embeddings=True
, could stem from a few potential areas. Let's explore some avenues to troubleshoot and resolve this problem:
Implementation Details: Ensure that the method responsible for storing data in Neo4j (likely within the Neo4jGraphStore
class or similar) correctly handles embedding vectors. The code should explicitly include logic to store embeddings as properties of nodes. If this logic is missing or incorrect, the embeddings won't be saved.
Embedding Format: Verify the format of the embeddings generated by your embedding model (thenlper/gte-large
). The storage mechanism might expect a specific format (e.g., a list of floats) that differs from what the model produces.
Model Compatibility: There could be compatibility issues between the LlamaIndex framework and the specific models you're using (TheBloke/Mistral-7B-Instruct-v0.2-GGUF
for LLM and thenlper/gte-large
for embeddings). Ensure that these models are fully compatible with the framework, especially regarding how embeddings are generated and handled.
Neo4j Configuration: Neo4j has certain limitations and configurations that might affect the storage of complex data types like vectors. Check Neo4j's documentation for any constraints on property types and sizes. You might need to adjust your Neo4j schema or configuration to accommodate embedding vectors.
Debugging Steps: Consider adding logging or debugging statements in the code that handles the embedding storage process. This can help identify where the process might be failing or if the embeddings are being processed as expected.
By systematically checking these areas, you should be able to pinpoint the cause of the issue and implement a solution. If the problem persists, reviewing the documentation of the LlamaIndex framework or reaching out to its community for support might offer additional insights.
To continue the conversation, mention @dosu.
They don't get stored in neo4j, they get stored in the index struct
its a janky design, but thats how it works. And it won't be changed anytime soon.
Working on a completely new index to overhaul this though. The current knowledge graph index design is not great
Bug Description
As I build the knowledge graph, I am expecting the nodes in Neo4j to contain the embedding vector as a property.
But there is only
id
as property with the node type "Entity". I'm following the example: https://docs.llamaindex.ai/en/stable/examples/index_structs/knowledge_graph/KnowledgeGraphDemo/Instead of the OpenAI model suggested in the example, I'm using "TheBloke/Mistral-7B-Instruct-v0.2-GGUF" from huggingface and "thenlper/gte-large" as the embedding model.
Here is few sample nodes from Neo4j retrieved using Cypher query. Embedding vector is nowhere to be seen.
Version
0.1.4
Steps to Reproduce
Here is the sample code I used
Relevant Logs/Tracbacks
No response