{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/daniloaguiarbr/sqlite-graphrag/schemas/relationships-input.schema.json",
"title": "RememberRelationshipsInput",
"description": "JSON array accepted by `sqlite-graphrag remember --relationships-file`. Each relationship must define source/from, target/to, relation label, and strength. Stored graph outputs expose `strength` as `weight`.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"type": "string",
"description": "Source entity name."
},
"from": {
"type": "string",
"description": "Alias for `source`."
},
"target": {
"type": "string",
"description": "Target entity name."
},
"to": {
"type": "string",
"description": "Alias for `target`."
},
"relation": {
"type": "string",
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
"description": "Relation label. 12 canonical values (applies-to, uses, depends-on, causes, fixes, contradicts, supports, follows, related, mentions, replaces, tracked-in) are well-known; any kebab-case or snake_case string is accepted since v1.0.49. Input is normalized to snake_case before storage."
},
"strength": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0,
"description": "Relationship strength in the inclusive range [0.0, 1.0]. Mapped to the `weight` field in graph outputs."
},
"description": {
"type": ["string", "null"],
"description": "Optional human-readable description of the relationship."
}
},
"allOf": [
{
"oneOf": [
{ "required": ["source"], "not": { "required": ["from"] } },
{ "required": ["from"], "not": { "required": ["source"] } }
]
},
{
"oneOf": [
{ "required": ["target"], "not": { "required": ["to"] } },
{ "required": ["to"], "not": { "required": ["target"] } }
]
}
],
"required": ["relation", "strength"],
"examples": [
{
"source": "SQLite",
"target": "GraphRAG",
"relation": "supports",
"strength": 0.8,
"description": "SQLite supports local GraphRAG retrieval"
}
]
}
}