WeKnora/config/prompt_templates
wizardchen d812770806 fix: inject KB document listing on fallback for broad queries (#959)
When users ask broad queries like "请整理知识库中的数据" in RAG mode,
vector/keyword search returns nothing because the query has no specific
content to match. The user needs to see what documents exist, not search
results.

- Add buildKBDocumentListing() to fetch document titles/filenames from
  the knowledge base and inject them into the fallback prompt via
  {{kb_documents}} placeholder
- Update fallback prompt templates (model_fallback, default_fallback_prompt)
  to include document listing context so the LLM can guide users
- Improve rewrite prompt: tighten summarize vs kb_search classification,
  expand kb_search to cover browse/organize/list operations, add examples

Closes #959
2026-04-28 23:31:04 +08:00
..
agent_system_prompt.yaml refactor(agent_system_prompt): update synthesis and issue flagging instructions 2026-04-24 13:16:47 +08:00
context_template.yaml feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
fallback.yaml fix: inject KB document listing on fallback for broad queries (#959) 2026-04-28 23:31:04 +08:00
generate_questions.yaml refactor(prompt_templates): improve question generation guidelines and context handling 2026-04-01 21:59:22 +08:00
generate_session_title.yaml fix: update session title word count requirement 2026-03-17 22:23:24 +08:00
generate_summary.yaml feat(summary): enhance document summarization capabilities and UI 2026-04-02 18:34:39 +08:00
graph_extraction.yaml feat: enhance localization and configuration support 2026-03-17 22:23:24 +08:00
intent_prompts.yaml fix: Update intent prompts for knowledge assistant response clarity 2026-04-22 21:17:20 +08:00
keywords_extraction.yaml feat: enhance localization and configuration support 2026-03-17 22:23:24 +08:00
rewrite.yaml fix: inject KB document listing on fallback for broad queries (#959) 2026-04-28 23:31:04 +08:00
system_prompt.yaml refactor(prompt): streamline context handling in templates 2026-03-25 22:08:29 +08:00