我只有一个请求,而且永远是同一个:你有一个提示,所以请不要把它藏在代码的空白处。我所需要做的就是添加一句话:始终使用芬兰语。仅此而已。突然间,一切都将在全球范围内使用。
但现在这只是浪费我的时间、我的活跃用户的时间以及我获得的每一个匿名用户的时间,包括那些需要此类服务的人。
这是一项出色的工作。但由于缺少那一个功能……不行。我想把它提供给我的用户,因为如果他们能使用,那么每个人都能使用。但在芬兰语论坛上使用英语生成这个、摘要等等是完全没有意义的。
我只有一个请求,而且永远是同一个:你有一个提示,所以请不要把它藏在代码的空白处。我所需要做的就是添加一句话:始终使用芬兰语。仅此而已。突然间,一切都将在全球范围内使用。
但现在这只是浪费我的时间、我的活跃用户的时间以及我获得的每一个匿名用户的时间,包括那些需要此类服务的人。
这是一项出色的工作。但由于缺少那一个功能……不行。我想把它提供给我的用户,因为如果他们能使用,那么每个人都能使用。但在芬兰语论坛上使用英语生成这个、摘要等等是完全没有意义的。
希望在主要语言问题解决之前不会 ![]()
我们在 DiscourseAI 中有一个用于提示自定义的计划,允许我们的用户快速更改插件各个部分使用的所有提示。我相信我们今年能够解决这个问题。
同时,我们可以将此类请求集中在此主题中。
这真是个难题!让提示可定制是一个非常棘手的问题。
让我们来仔细考虑一下具体细节:
CompletionPrompt.seed do |cp|
cp.id = -306
cp.name = "explain"
cp.prompt_type = CompletionPrompt.prompt_types[:text]
cp.messages = { insts: <<~TEXT }
你是一名导师,在特定上下文中向学生解释一个术语。
我会在 <input> 标签内提供你需要知道的一切,其中包含我希望你解释的术语(在 <term> 标签内)、它被使用的上下文(在 <context> 标签内)、它被使用的主题的标题(在 <topic> 标签内),以及可选的,对话中的上一条帖子(在 <replyTo> 标签内)。
利用所有这些信息,写一段话,简要解释这个术语的含义。使用 Markdown 格式化响应。只回复解释,不要回复其他任何内容。
TEXT
end
server.en.ymlserver.en.yml优点
缺点
tags,它将完全损坏(例如 <title>)优点
缺点
<replyTo> 标签和 <item> 标签以及 <input> 标签。优点
缺点
<something_new> 标签,他们将如何知道?如果我们能够实现这一点,再加上一些额外的自定义指令,可能会很不错,例如添加“重要提示:所有回复都必须是芬兰语”,但要使其始终有效将非常困难。
优点
缺点
我个人倾向于(3)。特别是因为它使我们能够添加自定义提示并具有强大的分离性。但我完全理解(2)作为一种解决方案,也许我们可以成功实现它,并且它统一了许多非常好的代码。我们需要先玩玩并尝试这个想法,然后才能决定获胜者。
也许不是。但 OpenAI 可以。
我们(作为最终用户管理员)在这种情况下不需要编写完整的提示。我们只需要在提示中添加使用特定语言的要求。我什么都不懂编程,但总的来说,将文本字符串添加到文本中应该很简单,不是吗?而且你在这里发送的只是文本?
当然,提示本身必须是英语。
it’s specific to the language issue rather than general prompt customization… but if we had a language dropdown, could we ask AI to translate the prompt (except for tags) and then save/send that prompt?
translate this into finnish except for the <> tags:
You are a tutor explaining a term to a student in a specific context. I will provide everything you need to know inside <input> tags, which consists of the term I want you to explain inside <term> tags, the context of where it was used inside <context> tags, the title of the topic where it was used inside <topic> tags, and optionally, the previous post in the conversation in <replyTo> tags. Using all this information, write a paragraph with a brief explanation of what the term means. Format the response using Markdown. Reply only with the explanation and nothing more.
Sinä olet ohjaaja, joka selittää termin oppilaalle tietyssä kontekstissa. Minä tarjoan sinulle kaiken tarvittavan tiedon <input> tageissa, joka sisältää termin, jonka haluat minun selittävän <term> tageissa, kontekstin, jossa sitä käytettiin <context> tageissa, aiheen otsikon, jossa sitä käytettiin <topic> tageissa, ja valinnaisesti, edellisen viestin keskustelussa <replyTo> tageissa. Käyttäen kaikkea tätä tietoa, kirjoita kappale lyhyellä selityksellä siitä, mitä termi tarkoittaa. Muotoile vastaus käyttäen Markdownia. Vastaa vain selityksellä eikä millään muulla.
Could the technical details be a separate part of the prompt? then we have a prompt that’s something like:
Apply this behavior (admins can edit or append):
- You are a tutor explaining a term to a student in a specific context.
- Write a
paragraphsentence with a brief explanation of what the term means.- Reply only with the explanation and nothing more.
- Use lots of emoji
Using these technical details (uneditable, where we update to avoid drift):
- the term I want you to explain in inside of
<term>tags- the context of where it was used inside
<context>tags- the title of the topic where it was used inside
<topic>tags- the previous post in the conversation is in
<replyTo>tags (optional)- format the response using Markdown
这与语言问题有关,而不是一般的提示定制……但是如果我们有一个语言下拉菜单,我们能否让 AI 翻译提示(标签除外),然后保存/发送那个提示?
将以下内容翻译成芬兰语,但排除 <> 标签:
你是一位导师,在特定上下文中向学生解释一个术语。我将在 <input> 标签内提供你需要知道的所有信息,包括我希望你解释的术语(在 <term> 标签内)、它所使用的上下文(在 <context> 标签内)、它所使用的主题的标题(在 <topic> 标签内),以及可选的,对话中的上一篇文章(在 <replyTo> 标签内)。利用所有这些信息,写一段话,简要解释该术语的含义。使用 Markdown 格式化响应。只回复解释内容,不要添加其他任何内容。
Sinä olet ohjaaja, joka selittää termin oppilaalle tietyssä kontekstissa. Minä tarjoan sinulle kaiken tarvittavan tiedon <input> tageissa, joka sisältää termin, jonka haluat minun selittävän <term> tageissa, kontekstin, jossa sitä käytettiin <context> tageissa, aiheen otsikon, jossa sitä käytettiin <topic> tageissa, ja valinnaisesti, edellisen viestin keskustelussa <replyTo> tageissa. Käyttäen kaikkea tätä tietoa, kirjoita kappale lyhyellä selityksellä siitä, mitä termi tarkoittaa. Muotoile vastaus käyttäen Markdownia. Vastaa vain selityksellä eikä millään muulla.
技术细节能否作为提示的一部分?那么我们的提示将是这样的:
应用此行为(管理员可以编辑或追加):
- 你是一位导师,在特定上下文中向学生解释一个术语。
- 写一段
段落句子,简要解释该术语的含义。- 只回复解释内容,不要添加其他任何内容。
- 使用大量表情符号
使用这些技术细节(不可编辑,我们会更新以避免漂移):
- 我希望你解释的术语在
<term>标签内- 它所使用的上下文在
<context>标签内- 它所使用的主题的标题在
<topic>标签内- 对话中的上一篇文章在
<replyTo>标签内(可选)- 使用 Markdown 格式化响应
不,那是个非常糟糕的主意。它会进行两次翻译,每次都会改变提示。所有需要的是短语“用[任何语言]回答”[1]。你的问题是决定使用哪种语言,我想建议使用该论坛使用的默认语言。
或“使用”…这只是措辞问题,但必须是英文。嗯,这对 OpenAI 来说是真的,其他对我来说是未知的领域 ↩︎
我有一个临时的解决方案。
从 GitHub Fork discourse-ai 并修改内容以说法语。
像这样:
然后修改 app.yml 文件并将 discourse-ai 插件地址更改为您自己的仓库。
最后,手动将您的仓库与官方仓库同步。
抱歉,请不要这样做,此拉取请求会将请求发送到 Netlify 代理,我今天会尝试一些简单的修复。
我有一个概念验证和工作示例:
GPT-4 在大多数语言中效果相当好,GPT 3.5 还可以,但不知道 Gemini Pro 在说什么,它完全不在状态。
Claude 2 也产生了合理的结果。
我测试了之前/之后,至少对于 GPT-4-Turbo 和葡萄牙语,在使用校对器时没有任何变化。我猜模型足够聪明,能够将我的文本保留为原始语言。
我将其扩展到图片标题,并且在那里效果非常好:
谢谢大家!至少现在字幕是使用想要的语言创建的(质量符合预期,但对我来说,这取决于 OpenAI)。
摘要……我还不确定,因为我好久都没法创建那些了。但这完全是另一回事了。