-
Notifications
You must be signed in to change notification settings - Fork 163
GENKGB-452 #456
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
base: main
Are you sure you want to change the base?
GENKGB-452 #456
Conversation
stellasia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments, but look very good
| prop_name = prop.get("name", "unknown") | ||
| node_label = node_type.get("label", "unknown") | ||
|
|
||
| if isinstance(required_value, str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we could stringify the required_value to also cover int values for instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I'll stringify it to handle int values.
| if label and prop: | ||
| constraint_props.setdefault(label, set()).add(prop) | ||
|
|
||
| # Skop node_types without constraints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo
| # Skop node_types without constraints | |
| # Skip node_types without constraints |
Description
Add support for extracting
requiredproperty field fromSchemaFromTextExtractor.This feature enables the LLM to identify which properties are mandatory (must exist on every node) versus optional (may be absent).
Changes:
SchemaExtractionTemplateprompt with Rule 9 (REQUIRED PROPERTIES) to guide the LLM in identifying required vs optional properties_filter_properties_required_field()method to sanitizerequiredvalues from LLM responses (handles boolean, string conversions, and invalid types)_enforce_required_for_constraint_properties()method to auto-set required: true for properties with UNIQUENESS constraints.Type of Change
Complexity
Complexity: Low
How Has This Been Tested?
Checklist
The following requirements should have been met (depending on the changes in the branch):