比如我让 deepseek R1 大模型指定主题写一篇 30-40 字的短文。它总是写出五六七十个字来。

该怎么写提示词,让大模型的输出内容符合字数要求呢?求大佬们指教~

举报· 209 次点击
登录 注册 站外分享
1 条回复  
dong706 楼主 小成 2025-2-17 14:55:57
这是 R1 自己的答案: 要实现大模型生成英语作文时精准控制单词数量在 30-40 词范围内,可以尝试以下结构化方法(附示例): 精确指令法(成功率 80%) 提示词示例: "Write a 35-word English essay about summer vacation. Use exactly 6 sentences: 1 opening (5 words), 4 body sentences (6-8 words each), and 1 closing (5 words. Count words meticulously before responding." 输出示例: Summer brings bright sunshine. Children play at sandy beaches. Families picnic under shady trees. Ice cream melts in warm hands. Fireworks light up night skies. These moments create lasting memories. (35 words) 分步控制法(成功率 90%) 提示词结构: [主题]:Spring Festival [要求]: 总词数:35±2 段落结构: Opening: 1 句 (5-7 词) 3 个要点句:每句 8-10 词 Closing: 1 句 (6-8 词) 使用基数词代替序数词 避免从句结构 自我检查法(成功率 95%) 提示词示例: "Generate a 38-word essay about online learning. After drafting, perform these steps: Remove all adjectives Replace phrasal verbs with single verbs Count words and adjust sentence length Final output in this format: [Essay] [Word count: X]" 输出示例: Online learning offers flexibility. Students access courses anywhere. Teachers upload materials digitally. Discussions happen via forums. Tests are taken online. This method saves commute time. [Word count: 37] 示例引导法(成功率 85%) 提供模板: "Follow this exact structure: Sentence 1: 5-word topic introduction Sentence 2-4: 8-word explanations Sentence 5: 7-word conclusion Example: Pets teach responsibility. Children feed them daily. They learn cleaning habits. Walking dogs builds discipline. Caring develops lifelong skills. (35 words)" 注意事项: 使用短句结构(平均 6-8 词 / 句) 避免缩略形式和所有格符号 优先使用单音节词汇 用分号替代连接词( and/but ) 指定具体主题(如 "My Last Birthday" 而非 "An Event") 调试技巧: 若输出超限,可追加指令: "Condense by: Removing all adverbs Converting phrases to single words (e.g. 'students who study' → 'studying students') Using numerals instead of words (3→three)"
返回顶部