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
Copy file name to clipboardExpand all lines: src/neo4j_graphrag/generation/prompts.py
+15-3Lines changed: 15 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -217,7 +217,11 @@ class SchemaExtractionTemplate(PromptTemplate):
217
217
4. Include property definitions only when the type can be confidently inferred, otherwise omit them.
218
218
5. When defining patterns, ensure that every node label and relationship label mentioned exists in your lists of node types and relationship types.
219
219
6. Do not create node types that aren't clearly mentioned in the text.
220
-
7. Keep your schema minimal and focused on clearly identifiable patterns in the text.
220
+
7. For each node type, identify a unique identifier property and add it as a UNIQUENESS constraint to the list of constraints.
221
+
8. Constraints must reference a node_type label that exists in the list of node types.
222
+
9. Each constraint must have a property_name having a name that indicates it is a unique identifier for the node type (e.g., person_id for Person, company_id for Company)
223
+
10. Keep your schema minimal and focused on clearly identifiable patterns in the text.
0 commit comments