Part of #344
Question
Does LightRAGBackend consume the ontology's structural constraints, or does it stay post-hoc-only — and is the resulting asymmetry acceptable?
The plan says LightRAG needs no change: the domain/range check runs against whatever is already in Memgraph, whichever backend wrote it. That holds cleanly only if enforcement is post-hoc everywhere. Once GLiNER2 gets extraction-time constraints, the backend choice starts changing enforcement semantics, not just extraction quality.
Context: Ontology.entity_types_guidance() already steers LightRAG's prompt for entity types, and Ontology's own docstring records that relation_types has no LightRAG consumer at all — LightRAG has no relation-type steering hook, and writes generic :DIRECTED edges with no typed label (which is why unstructured2graph/evals reports LightRAG's relation scores as n/a rather than zero).
Open:
- Can domain/range be expressed to LightRAG at all — as prompt guidance analogous to
entity_types_guidance(), given there is no native hook?
- If yes, is prompt-level steering meaningfully "enforcement", or just a suggestion that needs the post-hoc check anyway?
- If no, is a two-tier model acceptable — GLiNER2 constrained at extraction, LightRAG validated after — or does that make the two backends non-comparable in a way that undermines them being pluggable alternatives at all?
- Does LightRAG's lack of typed relation labels make this moot until that is fixed separately?
Blocked by #348: there is only an asymmetry to resolve if extraction-time constraints are adopted. Most likely ticket on this map to turn out to be fog — if #348 lands on post-hoc-only, close this as out of scope rather than resolving it.
Part of #344
Question
Does
LightRAGBackendconsume the ontology's structural constraints, or does it stay post-hoc-only — and is the resulting asymmetry acceptable?The plan says LightRAG needs no change: the domain/range check runs against whatever is already in Memgraph, whichever backend wrote it. That holds cleanly only if enforcement is post-hoc everywhere. Once GLiNER2 gets extraction-time constraints, the backend choice starts changing enforcement semantics, not just extraction quality.
Context:
Ontology.entity_types_guidance()already steers LightRAG's prompt for entity types, andOntology's own docstring records thatrelation_typeshas no LightRAG consumer at all — LightRAG has no relation-type steering hook, and writes generic:DIRECTEDedges with no typed label (which is whyunstructured2graph/evalsreports LightRAG's relation scores asn/arather than zero).Open:
entity_types_guidance(), given there is no native hook?Blocked by #348: there is only an asymmetry to resolve if extraction-time constraints are adopted. Most likely ticket on this map to turn out to be fog — if #348 lands on post-hoc-only, close this as out of scope rather than resolving it.