refactor(prompt): streamline context handling in templates

- Removed redundant instructions from the context template to simplify user guidance.
- Added context retrieval information to the system prompt, ensuring consistency in how context is presented across templates.
- Enhanced parameter casting to allow single strings to be treated as string arrays, improving flexibility in parameter handling.
- Adjusted minimum thought requirements in sequential thinking to allow for more varied input scenarios.
This commit is contained in:
wizardchen
2026-03-25 16:27:41 +08:00
committed by lyingbug
parent ae89871ac5
commit 1416217a0a
5 changed files with 29 additions and 9 deletions
@@ -16,16 +16,8 @@ templates:
default: true
has_knowledge_base: true
content: |
The following is retrieved information that may or may not be relevant:
{{contexts}}
User question: {{query}}
Instructions:
- If the retrieved information is relevant to the user's question, use it to provide an accurate answer.
- If the retrieved information is NOT relevant (e.g., the user is greeting, chatting, or asking something unrelated), ignore it and respond naturally as a helpful assistant.
- Do not mention "retrieved information" or "reference materials" in your response unless the user explicitly asks about sources.
- id: "detailed_context"
name: "Detailed Template"
description: "Context template with detailed instructions"
@@ -34,6 +34,9 @@ templates:
## CRITICAL: Language Rule
- ALWAYS respond in {{language}}
The following is retrieved information that may or may not be relevant:
{{contexts}}
- id: "expert_assistant"
name: "Domain Expert"
description: "Expert template for in-depth domain-specific answers"