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
When generating a KG using the KnowledgeGraphIndex, on occasions the labels extracted from the documents include backticks. Backticks are supported by Neptune, and the code already provisions these within the query. When the label itself includes the backticks, the query fails along with the KG creation.
Hey @kevinphillips81! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together!
To address the issue of invalid labels with backticks being generated by the upsert_triplet method in the llama-index-graph-stores-neptune package, you should ensure that the rel parameter is properly sanitized before being used in the query. The current implementation replaces spaces with underscores and converts the relationship type to uppercase, which is correct. However, if backticks or other invalid characters are present, you should further sanitize the rel string to remove or replace these characters.
Here's a snippet of the upsert_triplet method for reference:
If the issue persists, you may need to implement additional logic to sanitize the rel string, ensuring it conforms to the valid label syntax for your specific use case [1].
Bug Description
When generating a KG using the KnowledgeGraphIndex, on occasions the labels extracted from the documents include backticks. Backticks are supported by Neptune, and the code already provisions these within the query. When the label itself includes the backticks, the query fails along with the KG creation.
Using version 0.3.0 of
llama-index-graph-stores-neptune
Version
0.12.6
Steps to Reproduce
Relevant Logs/Tracbacks
No response
The text was updated successfully, but these errors were encountered: