From 2c2a312e0aab28d76967072fc5fc127667c7725e Mon Sep 17 00:00:00 2001 From: kempersc Date: Fri, 9 Jan 2026 12:33:41 +0100 Subject: [PATCH] feat(rag): add database routing to 8 more factual query templates Add databases: ["oxigraph"] to skip vector search for deterministic queries: - count_institutions_by_type_location (count) - count_institutions_by_type (aggregation) - find_institutions_by_founding_date (temporal) - find_custodians_by_budget_threshold (financial) - compare_locations (comparative) - find_by_founding (temporal) - events_in_period (temporal events) - institutions_by_founding_decade (temporal aggregation) Total templates with oxigraph-only routing: 12 --- data/sparql_templates.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/sparql_templates.yaml b/data/sparql_templates.yaml index 6a5be4907e..34c0a34358 100644 --- a/data/sparql_templates.yaml +++ b/data/sparql_templates.yaml @@ -1433,6 +1433,7 @@ templates: description: "Find organizational change events in a time period" intent: ["temporal", "statistical"] response_modes: ["table", "chart"] + databases: ["oxigraph"] # Temporal event query - Oxigraph only, skip vector search ui_template: nl: "Gevonden: {{ result_count }} gebeurtenissen tussen {{ start_date }} en {{ end_date }}." en: "Found: {{ result_count }} events between {{ start_date }} and {{ end_date }}." @@ -1613,6 +1614,7 @@ templates: description: "Count or list institutions by founding decade" intent: ["temporal", "statistical"] response_modes: ["table", "chart"] + databases: ["oxigraph"] # Temporal aggregation - Oxigraph only, skip vector search ui_template: nl: "Verdeling van {{ institution_type_nl }} per decennium:" en: "Distribution of {{ institution_type_en }} by decade:"