You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Prompt-Engineering-Guide/pages/risks/factuality.zh.mdx

34 lines
1.2 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 真实性
LLM模型有时会生成听起来连贯且令人信服但有时是虚构的回答。改进提示可以帮助提高模型生成更准确/真实的回答,并降低生成不一致和虚构回答的可能性。
一些解决方案可能包括:
- 在上下文中提供基本事实(例如相关文章段落或维基百科条目),以减少模型生成虚构文本的可能性。
- 通过降低概率参数并指示模型在不知道答案时承认(例如,“我不知道”)来配置模型以生成更少样式的响应。
- 在提示中提供问题和答案的组合示例,其中可能知道和不知道的问题和答案。
让我们看一个简单的例子:
*提示:*
```
Q: 什么是原子?
A: 原子是组成一切的微小粒子。
Q: Alvan Muntz是谁
A:
Q: Kozar-09是什么
A:
Q: 火星有多少个卫星?
A: 两个Phobos和Deimos。
Q: Neto Beto Roberto是谁
```
*输出:*
```
A:
```
我编造了“Neto Beto Roberto”的名字所以模型在这种情况下是正确的。尝试稍微改变问题看看是否可以使其正常工作。根据您迄今学到的所有知识还有不同的方法可以进一步改进它。