From b9c30fc9709b343c7e0aac39bbc7ddb830397821 Mon Sep 17 00:00:00 2001 From: kempersc Date: Fri, 9 Jan 2026 12:32:28 +0100 Subject: [PATCH] feat(rag): extend database routing to count, temporal, and financial templates Add databases: ["oxigraph"] to 5 more templates that don't benefit from vector search: - count_institutions_by_type_location - compare_locations - find_by_founding - find_custodians_by_budget_threshold - find_institutions_by_founding_date Total templates with Oxigraph-only routing: 10 --- data/sparql_templates.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/sparql_templates.yaml b/data/sparql_templates.yaml index 276e153226..6a5be4907e 100644 --- a/data/sparql_templates.yaml +++ b/data/sparql_templates.yaml @@ -699,6 +699,7 @@ templates: description: "Count heritage institutions of a specific type in a location" intent: ["statistical"] response_modes: ["count"] + databases: ["oxigraph"] # Count query - Oxigraph only, skip vector search ui_template: nl: "Er zijn {{ count }} {{ institution_type_nl }} in {{ location }}." en: "There are {{ count }} {{ institution_type_en }} in {{ location }}." @@ -768,6 +769,7 @@ templates: description: "Count institutions grouped by type" intent: ["statistical"] response_modes: ["count", "chart"] + databases: ["oxigraph"] # Aggregation query - Oxigraph only, skip vector search ui_template: nl: "Verdeling van instellingen per type:" en: "Distribution of institutions by type:" @@ -914,6 +916,7 @@ templates: description: "Find oldest or most recently founded institutions" intent: ["temporal", "exploration"] response_modes: ["table"] + databases: ["oxigraph"] # Temporal query - Oxigraph only, skip vector search ui_template: nl: "Gevonden: {{ result_count }} instellingen gesorteerd op oprichtingsdatum." en: "Found: {{ result_count }} institutions sorted by founding date." @@ -1050,6 +1053,7 @@ templates: description: "Compare number of institutions between locations" intent: ["comparative", "statistical"] response_modes: ["table", "chart"] + databases: ["oxigraph"] # Comparative query - Oxigraph only, skip vector search ui_template: nl: "Vergelijking van {{ location1 }} en {{ location2 }}:" en: "Comparison of {{ location1 }} and {{ location2 }}:" @@ -1123,6 +1127,7 @@ templates: description: "Find custodians with budget/expense category above or below a threshold" intent: ["financial", "exploration"] response_modes: ["table"] + databases: ["oxigraph"] # Financial query - Oxigraph only, skip vector search ui_template: nl: "Gevonden: {{ result_count }} instellingen." en: "Found: {{ result_count }} institutions." @@ -1513,6 +1518,7 @@ templates: description: "Find oldest or newest (most recently founded) institutions" intent: ["temporal", "exploration"] response_modes: ["table"] + databases: ["oxigraph"] # Temporal query - Oxigraph only, skip vector search ui_template: nl: "Gevonden: {{ result_count }} {{ institution_type_nl }} gesorteerd op oprichtingsdatum." en: "Found: {{ result_count }} {{ institution_type_en }} sorted by founding date."