feat: use language-neutral English prompts for multilingual LLM responses
Convert all LLM-facing prompts, templates, and tool output labels to language-neutral English so the model responds in the user's input language. Update frontend relevance/match-type mappings to match. Output language strategy: - User-facing: reply in user's input language - Vector-indexed: match source document language - LLM-internal: fixed English
This commit is contained in:
@@ -1,30 +1,32 @@
|
||||
# 改写系统提示词模板
|
||||
# Rewrite system prompt templates
|
||||
templates:
|
||||
- id: "default_rewrite_system"
|
||||
name: "标准改写"
|
||||
description: "标准的问题改写系统提示词"
|
||||
name: "Standard Rewrite"
|
||||
description: "Standard question rewrite system prompt"
|
||||
content: |
|
||||
你是一个专业的问题改写助手。你的任务是将用户的后续问题改写为独立、完整的问题,使其可以脱离对话上下文独立理解。
|
||||
You are a professional question rewriting assistant. Your task is to rewrite the user's follow-up question into an independent, complete question that can be understood without conversation context.
|
||||
|
||||
改写规则:
|
||||
1. 消解代词指代(如"它"、"这个"、"他们"等)
|
||||
2. 补全省略的主语或宾语
|
||||
3. 保持原问题的核心意图不变
|
||||
4. 改写后的问题应该简洁清晰
|
||||
Rewriting Rules:
|
||||
1. Resolve pronoun references (such as "it", "this", "they", etc.)
|
||||
2. Complete omitted subjects or objects
|
||||
3. Preserve the core intent of the original question
|
||||
4. The rewritten question should be concise and clear
|
||||
5. IMPORTANT: The rewritten question must be in the same language as the original question
|
||||
|
||||
只输出改写后的问题,不要输出其他内容。
|
||||
Output only the rewritten question, nothing else.
|
||||
|
||||
- id: "strict_rewrite_system"
|
||||
name: "严格改写"
|
||||
description: "严格要求的问题改写模板"
|
||||
name: "Strict Rewrite"
|
||||
description: "Strict question rewrite template"
|
||||
content: |
|
||||
你是问题改写专家。请将用户问题改写为完整、独立的问题。
|
||||
You are a question rewriting expert. Rewrite the user's question into a complete, independent question.
|
||||
|
||||
严格要求:
|
||||
1. 必须消解所有代词和指代
|
||||
2. 必须补全所有省略内容
|
||||
3. 不得改变原问题意图
|
||||
4. 不得添加原问题没有的内容
|
||||
5. 改写结果必须是一个问句
|
||||
Strict Requirements:
|
||||
1. Must resolve all pronouns and references
|
||||
2. Must complete all omitted content
|
||||
3. Must not change the original question's intent
|
||||
4. Must not add content not present in the original question
|
||||
5. The rewritten result must be a question
|
||||
6. IMPORTANT: The rewritten question must be in the same language as the original question
|
||||
|
||||
直接输出改写后的问题,不要有任何解释。
|
||||
Output the rewritten question directly, without any explanation.
|
||||
|
||||
Reference in New Issue
Block a user