Real-world Qwen validation and deterministic validators #16
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Target release: v1.3.0
AI summarization phases 1–3 are implemented; real-world model quality review is the outstanding longer-term item.
Acceptance
Source:
docs/ROADMAP.md→ In Progress → Local LLM Alert Summarization → "Longer-term review items".Audit note (2026-07-18)
From the 2026-07 codebase audit (
docs/.internal/report-2026-07-17.md), finding F-33.Add structural prompt hygiene to this issue's deterministic-validator scope:
payload.source_textandsource_title/source_metadataare interpolated into the<official_source>prompt delimiters unescaped (app/services/ai_summarizer.py:370-399). Escape/strip literal delimiter tokens from source text/title before interpolation so upstream (or malformed-feed) content can't break out of the source block.app/services/ai_summarizer.py:592-770) but not links; add a validator that rejects/strips URLs in the output that don't appear in the source text.Also within this issue's remit while touching the summarizer:
_output_tokens_for_chars(app/services/ai_summarizer.py:189-200) is a no-op —max(4096, min(max_chars*6, 4096))always returns 4096, somax_charshas no effect. Simplify to a documented constant or fix the intended floor.Code-side work done in #105 (merged):
source_text/source_titleare neutralized (zero-width space after<in delimiter tags) before interpolation into the prompt blocks; stored DB text is untouched.summary_validation_errorsnow rejects a URL in the summary that isn't present in the source text, feeding the existing retry loop._output_tokens_for_charswas a no-op (max(4096, min(max_chars*6, 4096))≡ 4096); fixed tomax(4096, min(max_chars*6, 8192)).Closing this issue: the deterministic-validator/hygiene deliverables are shipped. The remaining acceptance items ("track real-world Qwen quality over multiple real events", "turn repeated model mistakes into validators", "tune cloud-safe metadata defaults") are an ongoing operational activity with no fixed code deliverable — they depend on observing real SPC/NWS events against a running model. As specific, reproducible model mistakes surface in operation, file them as targeted validator issues (they'll be quick, isolated additions to
summary_validation_errors). Tracking that indefinitely under one open issue isn't useful, so this closes with the milestone; reopen or file follow-ups as real findings appear.