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 Schema Model #1074

Open
4 tasks
kartikpersistent opened this issue Feb 13, 2025 · 2 comments
Open
4 tasks

Graph Schema Model #1074

kartikpersistent opened this issue Feb 13, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@kartikpersistent
Copy link
Collaborator

kartikpersistent commented Feb 13, 2025

  • Meta Graph Visualization

  • show configured schema / database schema toggle

  • add to graph visualization UI modal as button above the legend

  • show source in title

  • Graph Schema Model

  • start implementing the better graph model representation

@jexp
Copy link
Contributor

jexp commented Feb 14, 2025

Some more detail:

Separata schema data as input props

We need to separate the graph schema visualization component from the API call, but instead have it display graph schemas from different sources.

The input type can be something like this

{ "nodes": 
[{"Person": {"label": "Person", "count": 123}, ...], 
"relationships": 
[{"Person WORKS_AT Company" : {"label/type":"WORKS_AT", "source":"Person", "target":"Company", "count": 12}, ...}]
}

So there are many sources

  1. API call before showing the component (perhaps even filter the results)
  2. Graph Schema of the currently displayed graph (go over all nodes and relationships and count them in a Map (nodes
    and relatiothips: source+reltype+target) (similar on how we do it for the legend)
  3. User configured Graph Schema
  4. Graph Schema from LLM
  5. Graph Schema from Model file from data importer

On "elementId" - as this is a string the content doesn't really matter. So we can also just use the label name as id, e.g. id for Person would be "Person" and id for rel-type: (Person)-[:WORKS_AT]->(:Company) would be "Person WORKS_AT Company".
This should also make it easier to search and validate if needed. By label or rel-type.

@jexp
Copy link
Contributor

jexp commented Feb 14, 2025

On the new graph schema definition. If you want to pick things from the "triples" PR feel free to do so.

The "switch" could be useful during development / testing.

For relationships we want to have a kind of source, type, target representation.

So we need

  • 1. the input mechanism, e.g. the 3 drop-downs
  • 2. the multi-select list to render them as graph patterns
  • 3. render them in a schema view
  • 4. passing them via API
  • 5. pass to LLMGraphTransformer
  • 6. update the get schema from database for the new format
  • 7. update the template schemas for the new format
  • 8. update the LLM call for get schema from text to get it in the new shape

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants