Spaces:
Runtime error
Runtime error
Commit History
-
Fix language selector: wire user choice through to generator
webmuppet +1: Claude Sonnet 4.6Three-layer fix: - pipeline.py: run_query_retrieval accepts an explicit language param; uses it for the response language while still auto-detecting the source language for query translation (can't translate from 'mi' if the text is English) - generator.py: language instruction now says 'user has selected X as their response language' rather than 'user asked in another language', which was wrong when the query was typed in English; imports get_language_name for the human-readable label - server.py: passes body.language through to run_query_retrieval - prompts/generator_system.md: clarifies that an explicit language instruction in the messages takes precedence over the English default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>016503a
-
Surface system prompt to prompts/generator_system.md
webmuppet +1: Claude Opus 4.7 (1M context)The prompt template was previously a 90-line triple-quoted Python string with line continuations, hard to read and edit. Extracted verbatim to prompts/generator_system.md (clean markdown, no escaping) so it can be opened in any editor and reasoned about as a document. Loading semantics changed: - Was: cached at module load, restart required to pick up changes - Now: read from file every call, save-and-rerun is enough The prototype's volume is low (handful of LLM calls per session) so the per-call file read is negligible — gain in iteration speed beats the microsecond cost. If we ever need to cache, we can reintroduce a module-level cache with a file-mtime invalidation hook. The {TODAY} placeholder substitution still happens at call time as before. Other files referencing SYSTEM_PROMPT-like constants (scripts/build_indexes.py SUMMARY_SYSTEM_PROMPT, PageIndex examples) are unrelated and unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>6353df2 -
Prompt: lock 'Short answer:' as a level-2 heading
webmuppet +1: Claude Opus 4.7 (1M context)The 'Short answer: ...' lead was inconsistently formatted across responses — sometimes a ## heading (renders as the violet h2 we styled) and sometimes **bold body text**. Both were valid markdown but produced visually inconsistent UX. The fix is at the prompt layer, not CSS: explicit instruction in the Structure section that the lead MUST be '## Short answer: ...' as h2. Also updated the example output to match the prescribed form (was '**Answer:** Short answer:' which the model was anchoring on as the canonical pattern). Adds matching guidance for using ## / ### consistently within the body of the answer for the section hierarchy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>990de55 -
Initial commit — health marketing compliance RAG
webmuppet +1: Claude Opus 4.7 (1M context)Conversational compliance assistant for NZ healthcare marketing regulation, scoped to complementary/alternative practitioners and supplement sellers. Six-domain corpus + PageIndex retrieval + Claude Sonnet generation. Configured for Hugging Face Spaces (docker SDK). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>bad8b6c