莎士比亚风格下的无限素数证明
背景
以下提示测试了一个LLM的能力,要求其以莎士比亚戏剧的风格写一篇证明存在无限多素数的文章。
提示
Write a proof of the fact that there are infinitely many primes; do it in the style of a Shakespeare play through a dialogue between two parties arguing over the proof.
代码 / API
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4",
messages=[
{
"role": "user",
"content": "Write a proof of the fact that there are infinitely many primes; do it in the style of a Shakespeare play through a dialogue between two parties arguing over the proof."
}
],
temperature=1,
max_tokens=1000,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
参考
- 人工通用智能的火花:GPT-4的早期实验 (在新标签页中打开) (2023年4月13日)