Comments (9)
我发现了幻觉的真正原因:
问题出在发给LLM的请求上,这个插件实际传入的是
{
"model":"MODEL_NAME",
"messages":[
{"role":"assistant","content":"请求翻译的prompt"}
]
}
这个assistant的role是用来让LLM了解在 “这次用户提问之前LLM说过什么”的,也就是LLM的上下文记忆能力的来源,而用户询问LLM的内容应该把请求里的role
设为user
,所以没有自己问自己的经验的LLM就会产生幻觉
from ojbetter.
好的,有空我加上
from ojbetter.
对了,最好还要加个模式切换开关,因为我看你现在的prompt是作为用户发言输入的
如果要是可以把初始prompt作为system prompt 传入而非作为用户的第一句话,这样对于其他的LLM可能效果会更好一些(因为OpenAI的ChatGPT好像不太会关心system prompt,但是其他的LLM会)
from ojbetter.
你是指再提供一种模式,这种模式下会在messages数组中放俩object,一个是让他充当翻译的系统消息,一个是作为用户消息的翻译文本,是这样吗
from ojbetter.
你是指再提供一种模式,这种模式下会在messages数组中放俩object,一个是让他充当翻译的系统消息,一个是作为用户消息的翻译文本,是这样吗
是这样,就是
[
{"role":"system", "content":"系统提示词"}
{"role":"user","content":"需要翻译的东西"}
]
然后就直接做成一个单独的选项,开启的话发送这样的数据
不开启的话把系统提示词和需要翻译的句子用回车符隔开一块发过去就行,系统提示词留空
from ojbetter.
好的,明个我看有空不,有空加上
from ojbetter.
我发现了幻觉的真正原因:
问题出在发给LLM的请求上,这个插件实际传入的是{ "model":"MODEL_NAME", "messages":[ {"role":"assistant","content":"请求翻译的prompt"} ] }这个assistant的role是用来让LLM了解在 “这次用户提问之前LLM说过什么”的,也就是LLM的上下文记忆能力的来源,而用户询问LLM的内容应该把请求里的
role
设为user
。
原来如此,感谢分享,下午我给改下
from ojbetter.
要不我PR一个
from ojbetter.
好
from ojbetter.
Related Issues (20)
- Fix code scanning alert - Inefficient regular expression
- bug&suggestion HOT 1
- 添加一些新的翻译接口
- Ubuntu firefox适配问题 HOT 4
- 1.15.5 版本删除重装 1.15.2 后无法加载 HOT 16
- 关于复制代码 HOT 4
- 插件文字显示错误 HOT 26
- codeforces problemset url 来源的题目,若题号长度不为 1(如 B1、B2)则无法正常快捷提交
- [Bug]CodeforcesBetter,存在一处翻译错误
- [BUG] 翻译错误/更像是关键词配对异常问题 HOT 1
- AtCoder自动翻译 HOT 1
- [功能请求] 可以为 monaco 添加无缓存的设置选项吗? HOT 1
- 之前一个pr的一个小误 HOT 1
- Codeforces 中的 gym 题目无法跳转至 vjudge,显示未找到
- AtCoder 中的一些比赛无法跳转至洛谷,显示未找到 HOT 1
- 重写为浏览扩展的计划以及进度 HOT 3
- Monaco 编辑器美化代码块bug HOT 1
- Codeforces 轻量站代码提交页的样式问题
- 将 Codeforces 重现赛提交页的状态显示模拟为ICPC风格
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ojbetter.