Conversation
…ce steps
Closes three gaps identified before KB content authoring:
- Scenarios carry structured `tips[]` (warning / hint / common_mistake) with
bilingual text. Tips flow through ChecklistStep.tips verbatim — the system
prompt forbids paraphrasing.
- Scenarios carry optional `online_booking_url`, `online_service_url`, and
`appointment_phone` fields. These render as CTA buttons; URLs are lint-checked
against the allowlist and never synthesised by the LLM.
- Sequence steps accept `{ scenario_id, applies_if, applies_unless, note? }` in
addition to bare IDs. Filtering runs deterministically in the Worker via
`filterSequenceSteps`; the LLM never evaluates conditions. Situation tags come
from the closed SITUATION_TAGS.md vocabulary, cross-checked against the Zod
enum by `pnpm lint:content`.
Frontend adds a SituationTags chip toggle that posts `situation_tags` on every
query. ChecklistStep card now renders tips and CTA buttons.
Docs updated across PRD §8.2/§8.4/§8.10, TDD §5.4/§6/§12.3/§15, README, and
CLAUDE.md non-negotiables. 8 new vitest cases cover the sequence filter.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Query now returns deterministic checklist only — retrieval + rerank + metadata assembly, no Claude call. Frontend shows a cycling thinking-words spinner while the request is in flight, then a concrete "I don't have that answer yet" card when cosine falls below the relevance floor. That no-coverage path auto-submits the original query (with explicit consent named in the privacy notice) to KV under feedback:<response_id> with a 180-day TTL, so missing topics surface for curation instead of being silently served an unrelated scenario. Also seed the first KB scenario (Meldezettel) and drop the rerank absolute floor — bge-reranker-base outputs are uncalibrated and keyword-biased, so using them as a gate blocked real paraphrases while letting keyword false-positives through. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
No description provided.