fix: prevent truncated Ollama answers
This commit is contained in:
@@ -1637,4 +1637,7 @@ metrics from PostGIS and includes dated observations only for persisted
|
||||
temporal series. Geometry is not sent to Ollama. The response contains the
|
||||
answer, used model, scope label, context metrics, discovered temporal series,
|
||||
source dataset ids and warnings. Missing measurements remain unavailable;
|
||||
specifically, no water volume is inferred from 2D water geometry.
|
||||
specifically, no water volume is inferred from 2D water geometry. The backend
|
||||
sets an explicit Ollama context window and returns
|
||||
`OLLAMA_RESPONSE_TRUNCATED` instead of accepting a response with
|
||||
`done_reason=length` as a complete answer.
|
||||
|
||||
@@ -8389,7 +8389,7 @@ Validation evidence:
|
||||
- Focused temporal, source, Ollama, navigation and Unraid regression tests
|
||||
passed, including direct coverage for multi-metric history and DockerMan host
|
||||
mapping.
|
||||
- Full readiness passed 615 backend tests, backend compilation, 91 documented
|
||||
- Full readiness passed 617 backend tests, backend compilation, 91 documented
|
||||
API routes, one Alembic head, frontend TypeScript typecheck/build and all
|
||||
shell syntax gates.
|
||||
- Tower deployment passed the all-in-one container health check, live PostGIS
|
||||
@@ -8403,6 +8403,15 @@ Validation evidence:
|
||||
message keys now use a session-local monotonic id generator; no persisted or
|
||||
security-sensitive identity depends on it. Typecheck, production build and
|
||||
full readiness reran successfully.
|
||||
- The regional operator then reused the five governed forest snapshots and
|
||||
imported 15 new authoritative snapshots: water, built functions and
|
||||
transport for 2013, 2016, 2019, 2022 and 2025. A live exact-Area Mol water
|
||||
comparison returned 606.16 ha in 2013 and 641.75 ha in 2025 across all five
|
||||
observations; the API retained the 10 m raster and object-lineage warnings.
|
||||
- Browser QA also reproduced an Ollama `done_reason=length`: the previous
|
||||
implicit 4096-token context left only 86 tokens after a 4010-token grounded
|
||||
prompt. GeoIntel now requests a configurable 16,384-token context and rejects
|
||||
any future length-truncated response instead of presenting a partial answer.
|
||||
|
||||
Known limitations:
|
||||
- Water volume remains unavailable until a governed depth/bathymetry source is
|
||||
|
||||
Reference in New Issue
Block a user