Skip to content

Conversation

@stellasia
Copy link
Contributor

@stellasia stellasia commented Oct 12, 2024

Description

Adds the ability to specify some entities or relationships as dict in the SimpleKGPipeline, adding a description and property list (both optional):

valid_entities = [
  "Location",  # this or the next items are equivalent
  {
    "label": "Event",
  },
  {
    "label": "Game",
    "description": "A match between two persons",
  },
  {
    "label": "Organization",
    "properties": [
      {"name": "name", "type": "STRING"},
      {"name": "createdIn", "type": "INT", "description": "Creation year"},
    ]
  },
  {
    "label": "Person",
    "description": "A human being",
    "properties": [
      {"name": "name", "type": "STRING"},
      {"name": "birthDate", "type": "DATE"},
    ]
  },
]

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Complexity: Low

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

@stellasia stellasia changed the title some tests Test about sync methods Oct 18, 2024
@stellasia stellasia changed the title Test about sync methods Test about SchemaEntity input Oct 18, 2024
@stellasia stellasia changed the title Test about SchemaEntity input PoC: SchemaEntity input Oct 25, 2024
…into feature/improved-schema-definition

# Conflicts:
#	src/neo4j_graphrag/utils.py
@stellasia stellasia changed the title PoC: SchemaEntity input Improved schema definition in the SimpleKGPipeline Nov 5, 2024
@stellasia stellasia marked this pull request as ready for review November 5, 2024 14:33
@stellasia stellasia requested a review from a team as a code owner November 5, 2024 14:33
@stellasia stellasia requested a review from willtai November 18, 2024 09:27
Copy link
Contributor

@willtai willtai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🛰️

@stellasia stellasia merged commit 8285d56 into neo4j:main Nov 20, 2024
7 checks passed
willtai pushed a commit to willtai/neo4j-genai-python that referenced this pull request Dec 9, 2024
* some tests

* Simplify

* Remove SchemaEntity/SchemaRelation as valid inputs in SimpleKGPipeline

(not "simple")

* Fix mypy

* Fix ruff

* Ruff again

* Ruff again

* Update tests, examples and CHANGELOG

* Fix mypy again N

* Update type, switch to model_validate method due to typing issues

* Ruff
@stellasia stellasia deleted the feature/improved-schema-definition branch December 11, 2024 14:36
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

Successfully merging this pull request may close these issues.

2 participants