A technical database schema specifies the graph’s nodes, properties, relationships, types, and administrative metadata. It supports database management but may obscure the domain model with helper elements, unused properties, and redundant labels. section 14.6.1
A schema provider turns the technical representation into an LLM-friendly conceptual representation:
- Extract the current schema with Neo4j’s apoc.meta.schema function. section 14.6.1 section 15.1.3
- Filter technical nodes, relationships, internal properties, and other excluded elements through a skip list. section 15.1.3
- Enrich remaining elements with business descriptions, property context, terminology, and constraints. section 15.1.3
Graph representation
A narrative schema can describe Vehicle properties such as color, make, model, style, and plate_number, plus an OWNED_BY relationship to Person. A compact form can express property types and relationship properties such as since: DATE. section 14.6.1
Listing 14.2 Response format for apoc.meta.schema
[
{
"label": "[LabelName]",
"properties": {
"[PropertyName1]": {
"type": "[PropertyType1]",
"mandatory": [true|false],
"unique": [true|false]
},
"[PropertyName2]": {
"type": "[PropertyType2]",
"mandatory": [true|false],
"unique": [true|false]
},
...
},
"relationships": [
{
"type": "[RelationshipType]",
"target": "[TargetLabelName]",
"properties": {
"[RelationshipPropertyName]": {
"type": "[RelationshipPropertyType]",
"mandatory": [true|false],
"unique": [true|false]
}
}
},
...
]
},
...
]
Inspect the structured response returned by apoc.meta.schema, including labels, property types, mandatory and unique flags, and relationship targets. section 14.6.1
