Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph Rag - Possible to add extra attributes? #684

Open
andrelima666 opened this issue Mar 8, 2024 · 1 comment
Open

Graph Rag - Possible to add extra attributes? #684

andrelima666 opened this issue Mar 8, 2024 · 1 comment
Assignees
Milestone

Comments

@andrelima666
Copy link

Hello,

As I was trying to work this into a Graph LLM Rag. I was thinking on doing some queries based on data type (example: node is a 'person', 'skill', ...).
The idea was to have a person A, identified by node A1.
Person B, identified by Node B1.
Skills like soccer or swimming (S1 and S2).
So, 4 nodes at the graph at this point.

Idea is if person A1 and B2 share the skill, to return those vertex, with the skill connecting them.
But, when I try to run the next query, it is returning an empty list:
MATCH P=(N)-[*1..2]->(D)
WHERE N.type == 'person'
RETURN P

Wasn't this suppose to bring at least the person and the skills from it? I'm assuming the issue is because graph has no 'type' attribute in it.

Main point/question: Is it possible to add additional attributes? What I tried until now it's only setting attributes as [id, text, topic, topicrank]. How can a new attribute, like 'type' be added and persisted?

@andrelima666 andrelima666 changed the title Graph Rag - Possible for extra attributes? Graph Rag - Possible to add extra attributes? Mar 8, 2024
@davidmezzetti davidmezzetti self-assigned this Mar 11, 2024
@davidmezzetti davidmezzetti added this to the v7.1.0 milestone Mar 11, 2024
@davidmezzetti
Copy link
Member

Thank you for this write up.

I debated over whether to duplicate the attribute data between databases and graphs. With 7.0, I decided to only sync text data with the graph component.

But I agree that it would be nice to have access to all attributes to handle scenarios such as what is mentioned above. With that, I'll modify the logic to sync attributes.

I'll think about if attribute syncing should be always on, on but able to be disabled or off and able to be enabled.

@davidmezzetti davidmezzetti modified the milestones: v7.1.0, v7.2.0 Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants