用莎士比亚风格证明素数无限性的证明

背景

以下提示测试了 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
)

参考