通过诗歌证明无限素数

背景

此提示测试了 LLM 的自然语言处理和创意能力,要求其以诗歌的形式写出证明素数无限性的证明。

提示

Can you write a proof that there are infinitely many primes, with every line that rhymes?

Code / API

from openai import OpenAI
client = OpenAI ()
 
response = client.chat.completions.create (
    model="gpt-4",
    messages=[
        {
        "role": "user",
        "content": "Can you write a proof that there are infinitely many primes, with every line that rhymes?"
        }
    ],
    temperature=1,
    max_tokens=256,
    top_p=1,
    frequency_penalty=0,
    presence_penalty=0
)

Reference