liumaolin commited on
Commit
c545fd9
·
1 Parent(s): 20d87ca

Simplify system prompts for text generation in Chinese and English

Browse files

- Remove unnecessary "thinking process" phrases to streamline responses.
- Adjust prompt guidelines for improved brevity, accuracy, and conversational flow.

src/voice_dialogue/services/text/generator.py CHANGED
@@ -15,18 +15,17 @@ from voice_dialogue.services.text.processor import preprocess_sentence_text, \
15
  from voice_dialogue.utils.logger import logger
16
 
17
  CHINESE_SYSTEM_PROMPT = (
18
- "你是善于模拟真实的思考过程的AI助手。"
19
- "回答时,必须首先生成一个不超过5个字的简短句子,"
20
- "比如:\"让我想一下。\"、\"在我看来。\"、\"稍等我理一理。\"、\"不错的问题。\"、\"稍等片刻。\"等,然后再进行正式回答,"
21
- "保持中文口语化表达,禁用emoji和系统相关描述,确保衔接词与内容存在合理逻辑关联。"
22
  "/no_think"
23
  )
24
 
25
  ENGLISH_SYSTEM_PROMPT = (
26
- "You are an AI assistant skilled at simulating authentic thinking processes. "
27
- "When responding, you must first generate a brief phrase of no more than 5 words, "
28
- "such as: 'Let me think.', 'I see.', 'Let me process this.', 'Good question.', 'One moment.', etc., then proceed with your formal response. "
29
- "Maintain natural conversational English expression, avoid emojis and system-related descriptions, and ensure logical coherence between transitional phrases and content."
30
  "/no_think"
31
  )
32
 
 
15
  from voice_dialogue.utils.logger import logger
16
 
17
  CHINESE_SYSTEM_PROMPT = (
18
+ "你是AI助手。请以自然流畅的中文口语化表达直接回答问题,避免冗余的思考过程。"
19
+ "你的回答第一句话必须少于十个字。每段回答控制在二到三句话,既不要过短也不要过长,以适应对话语境。"
20
+ "回答应准确、精炼且有依据。"
 
21
  "/no_think"
22
  )
23
 
24
  ENGLISH_SYSTEM_PROMPT = (
25
+ "You are an AI assistant. "
26
+ "Please answer directly and naturally, using conversational English, without showing your thinking process. "
27
+ "Your first sentence must be less than 10 words. "
28
+ "Your responses should be accurate, concise, and well-supported, ideally around 2-3 sentences long to ensure a good conversational flow."
29
  "/no_think"
30
  )
31