WeKnora/config/prompt_templates
wizardchen e9be53e830 fix: respect multi-turn-disabled flag in KnowledgeQA pipeline
When a custom agent has `MultiTurnEnabled=false`, `applyAgentOverridesToChatManage`
sets `chatManage.MaxRounds = 0` to signal "no history". Two pipeline plugins
mistreated this zero value as "use the global default" and silently re-loaded
session history into the LLM context:

- `PluginLoadHistory` fell back to `Conversation.MaxRounds` when
  `chatManage.MaxRounds == 0`.
- `PluginQueryUnderstand.loadHistory` had the same fallback, and even when
  `LOAD_HISTORY` was skipped it would re-populate `chatManage.History`,
  leaking previous turns into rewrite, image analysis, and the final answer.

The RAG branch in `session_knowledge_qa` also added `LOAD_HISTORY`
unconditionally, unlike the pure-chat branch which guarded it with `hasHistory`.

This change:

- Treats `chatManage.MaxRounds <= 0` as an explicit disable in both plugins;
  no fallback to global config.
- Makes the RAG pipeline consistent with the pure-chat path by gating
  `LOAD_HISTORY` on `hasHistory`.
- Removes the duplicated `Current Time: {{current_time}}` line from
  `agent_system_prompt.yaml`. The agent already receives a fresh
  `<runtime_context><current_time>` block with each turn from
  `observe.buildRuntimeContextBlock`, so the static placeholder was
  redundant.

The ReAct agent path (`session_agent_qa`) already checked `MultiTurnEnabled`
directly and is not affected.

Closes #1479
2026-05-26 10:45:42 +08:00
..
agent_system_prompt.yaml fix: respect multi-turn-disabled flag in KnowledgeQA pipeline 2026-05-26 10:45:42 +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 fix(summary): preserve image caption/OCR text in document summaries 2026-05-22 17:25: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