mockup: add AI map assistant#3673
Draft
BRaimbault wants to merge 2 commits into
Draft
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Mockup
DO NOT MERGE
Description
DHIS2 users of analytics apps could manage their maps and charts in plain language — starting in the Maps app with add / edit / remove a layer and answer questions about the available metadata and how the app works, and later analyse what the map shows.
Because DHIS2 instances hold sensitive health data, two principles govern every choice. First, the customer decides what leaves their server: an administrator can restrict what any AI provider sees — down to "nothing leaves; only a self-hosted model may be used" — even at the cost of capability. Second, no vendor lock-in: customers use whatever AI they host or pay for, with at least one open-source/self-hosted option and one mainstream cloud option, and new providers added by writing one small adapter.
The assistant appears in two forms. Tier 1 — embedded in each analytics app (Maps, Data Visualizer, Event Visualizer), driving that app directly; this is where we start. Tier 2 — cross-app on a dashboard, where one assistant composes an entire dashboard — finding existing saved content or creating new maps and charts — without the user touching a dialog. Both run on the same shared machinery — provider connectors, a server-side broker, an egress-policy engine, and a tool/executor layer — so security and provider rules are defined and audited once.
The first deliverable is a proof of concept in the Maps app: add, edit, and remove layers, plus answer questions about the instance's metadata and DHIS2 documentation, against two interchangeable providers — a small self-hosted model and a cloud model. It is built so no health figures ever leave the browser: adding a layer and answering "what malaria indicators do we have?" both need only names and labels, never values. This validates the two hardest constraints — provider-swapping and data-minimisation — before any sensitive data is in scope. Analyse the map requires values to leave, so it follows once the egress-policy engine exists. The end state extracts the shared machinery into a library the other analytics apps can consume.
The single most important design property: the assistant manipulates the real app, not a parallel one. Its tools dispatch the same actions a user's clicks do, so an AI-built layer is an ordinary layer the user can then edit or delete by hand.
Screenshots