• v26.04.14.2 Stable

    bvandeusen released this 2026-04-14 21:45:58 -04:00 | 408 commits to main since this release

    Discuss failure mode fixes

    Fixes a hallucination path in the article-discuss flow. Previously, if article extraction returned empty or RAG pulled in unrelated orphan notes that looked more relevant than the generic seed prompt, the model would confabulate a response that had nothing to do with the article.

    Empty-article hard-fail. seed_article_discussion now raises a new EmptyArticleError when the article body is empty or reduces to empty after prep. The /briefing and /news discuss routes catch it and return 422 with a clean error. No more empty synthetic read_article tool results silently telling the model "the article has nothing in it" and watching it invent content to fill the void. The /news route also cleans up the empty conversation it had already created so the user doesn't end up with a phantom chat.

    Skip RAG on the seed turn. When user_message matches ARTICLE_DISCUSS_SEED inside build_context, both the semantic-search and keyword-search auto-injection paths short-circuit. The article IS the context on turn one — RAG was diluting it by feeding the model unrelated orphan notes ranked against the generic "I want to talk about this article" seed. Follow-up turns keep RAG on because by then the user's own messages drive the query.

    Downloads