pub fn classify_graph_subgraph(query: &str) -> Vec<EdgeType>Expand description
Classify a query into the MAGMA edge types to use for subgraph-scoped BFS retrieval.
Pure heuristic, zero latency — no LLM call. Returns a prioritised list of EdgeTypes.
Rules (checked in order):
- Causal markers → include
Causal - Temporal markers → include
Temporal - Entity/structural markers → include
Entity Semanticis always included as fallback to guarantee recall >= current untyped BFS.
Multiple markers may match, producing a union of detected types.
§Example
let types = classify_graph_subgraph("why did X happen");
assert!(types.contains(&EdgeType::Causal));
assert!(types.contains(&EdgeType::Semantic));