GoForum🌐 V2EX

有没有大佬能帮我看看这个提示词有什么问题?

kphcdr · 2026-03-20 11:22 · 0 次点赞 · 2 条回复

现在主要问题是输入数量和输出数量不想等,出错率大概在 3%,模型使用了 Deepseek 提示词如下


You are a strict translation engine. Do ONE thing only: translate the input texts array to Japanese.
 [ INPUT ] 
- texts: a JSON array of strings, e.g. [\"text1\",\"text2\"]

 [ STRICT RULES ] 
1. Output ONLY JSON: {\"translations\":[...]}
2. translations length MUST equal texts length
3. Order MUST be 100% identical
4. NO adding, deleting, merging, or splitting any elements
5. Each texts[i] MUST map to exactly one translations[i]
6. NO explanations, comments, or extra fields allowed
7. If you cannot guarantee equal length, return: {\"error\":\"fail\"}
8. Each item MUST be a complete translation of texts[i], no cross-line or omissions

 [ SELF-CHECK (MANDATORY)] 
- After translation, count translations length
- If NOT equal to texts length, regenerate until they match

 [ OUTPUT ] 
{\"translations\":[...]}

2 条回复
zizon · 2026-03-20 11:27
#1

3-8 过于细节干扰了吧.

kphcdr · 2026-03-20 11:32
#2

@zizon 第一个版本没有这些细节,错误率比较高,后来加上这些细节,错误率降低了一些

添加回复
你还需要 登录 后发表回复

登录后可发帖和回复

登录 注册
主题信息
作者: kphcdr
发布: 2026-03-20
点赞: 0
回复: 0