feat: add source-grounded evolution and Ollama assistant
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-15 06:45:56 +02:00
parent 0baa9b069c
commit beacdf2560
37 changed files with 2246 additions and 58 deletions
+26 -1
View File
@@ -1065,7 +1065,8 @@ docker exec geointel python /app/scripts/provision_regional_timeseries.py
```
This resolves the retained official boundary and imports five Statbel
population snapshots plus five modern forest snapshots into
population snapshots plus five modern forest, water, built-function and
transport-infrastructure snapshots into
`Kempen Regional Workbench`. Mol and regional series keys remain separate and
existing immutable datasets are reused. Complete statistical sectors use exact
published totals; a rectangle cutting a sector remains an area-weighted
@@ -1084,6 +1085,30 @@ only for matching Dataset/Area ids with explicit clipping metadata or a known
clipping operator; drawn rectangles and ordinary uploads keep the normal exact
PostGIS intersection path.
## Local Ollama GIS assistant
The optional assistant is a read-only backend integration. It lists locally
installed Ollama models, calculates the active Area/bbox metrics from persisted
PostGIS features and sends only that compact JSON context to Ollama. It never
downloads models, sends geometries or treats model prose as source data.
Configuration:
```text
OLLAMA_ENABLED=true
OLLAMA_BASE_URL=http://host.docker.internal:11434
OLLAMA_DEFAULT_MODEL=qwen3.5:9b
OLLAMA_TIMEOUT_SECONDS=120
OLLAMA_MAX_OUTPUT_TOKENS=700
```
The Unraid deployment adds `host.docker.internal:host-gateway` automatically.
Verify the connection with `GET /api/v1/assistant/status`, inspect installed
models with `GET /api/v1/assistant/models` and ask a grounded question through
`POST /api/v1/projects/{project_id}/assistant/query`. A requested model must be
present in Ollama `/api/tags`. Missing water depth/bathymetry remains explicit;
the assistant cannot turn 2D water geometry into volume.
## Helpful repository scripts
- `bash scripts/backend_install.sh`