Context
Issue #17 proposes a ckan_smart_search orchestrator tool that accepts natural language queries like "find climate datasets in Italy." This would dramatically improve accessibility for non-technical users who don't know which CKAN portal to query or its native search syntax.
However, the current implementation approach assumes users either:
- Already know which CKAN instance they want to query (and pass a URL)
- Manually specify the country/region before searching
This creates friction for the primary use case: "I'm looking for data about X, in country Y" — without requiring users to know that Italy's data portal is dati.gov.it, Canada's is open.canada.ca, etc.
Problem
Today, a user asking "find renewable energy statistics for Denmark" would need to:
- Know that Denmark uses an open data portal
- Know its URL is the correct CKAN instance
- Or provide it manually before the search runs
This defeats the purpose of a natural language interface. The orchestrator should be smart enough to route queries to the right CKAN instance based on geographic and contextual clues.
Proposed Solution
Add an optional CKAN instance detector to ckan_smart_search that:
- Parses geographic references from the query ("Denmark", "Italy", "Canada") using existing tools or a lightweight regex/NLP approach
- Maps countries to known CKAN instances using a configuration file (e.g.,
src/config/ckan-instances.json) with entries like:
{
"IT": {"url": "https://dati.gov.it", "names": ["italy", "italia"]},
"CA": {"url": "https://open.canada.ca", "names": ["canada"]},
"US": {"url": "https://catalog.data.gov", "names": ["usa", "united states"]}
}
- Defaults to user-provided instance if geography is ambiguous or not detected
- Logs the detected instance in responses so users understand where the search ran
Why This Matters
Without detection, ckan_smart_search is still more convenient than raw API calls, but it doesn't feel "smart" — it still requires domain knowledge (knowing which portal to use). With detection, it becomes a true natural language interface that non-technical users can trust.
Good Example
User: "Where can I find water quality data in France?"
Server (internal):
- Detects "France" → maps to https://www.data.gouv.fr
- Runs search:
package_search(q='water quality')
- Response: "Found 47 datasets on data.gouv.fr about water quality..."
User doesn't need to know about data.gouv.fr; the orchestrator figured it out.
Success Criteria
Contributed by Klement Gunndu
Context
Issue #17 proposes a
ckan_smart_searchorchestrator tool that accepts natural language queries like "find climate datasets in Italy." This would dramatically improve accessibility for non-technical users who don't know which CKAN portal to query or its native search syntax.However, the current implementation approach assumes users either:
This creates friction for the primary use case: "I'm looking for data about X, in country Y" — without requiring users to know that Italy's data portal is dati.gov.it, Canada's is open.canada.ca, etc.
Problem
Today, a user asking "find renewable energy statistics for Denmark" would need to:
This defeats the purpose of a natural language interface. The orchestrator should be smart enough to route queries to the right CKAN instance based on geographic and contextual clues.
Proposed Solution
Add an optional CKAN instance detector to
ckan_smart_searchthat:src/config/ckan-instances.json) with entries like:{ "IT": {"url": "https://dati.gov.it", "names": ["italy", "italia"]}, "CA": {"url": "https://open.canada.ca", "names": ["canada"]}, "US": {"url": "https://catalog.data.gov", "names": ["usa", "united states"]} }Why This Matters
Without detection,
ckan_smart_searchis still more convenient than raw API calls, but it doesn't feel "smart" — it still requires domain knowledge (knowing which portal to use). With detection, it becomes a true natural language interface that non-technical users can trust.Good Example
User: "Where can I find water quality data in France?"
Server (internal):
package_search(q='water quality')User doesn't need to know about data.gouv.fr; the orchestrator figured it out.
Success Criteria
ckan-instances.jsonadded with 10+ major CKAN portals (data.gov, dati.gov.it, open.canada.ca, etc.)ckan_smart_searchworkflowContributed by Klement Gunndu