🚀 在我们的新课程中掌握提示工程和构建 AI 代理!使用 PROMPTING20 享 8 折优惠 ➜ 立即报名
物理推理

利用 LLM 进行物理推理

背景

此提示通过让 LLM 对一组对象执行操作来测试其物理推理能力。

提示

Here we have a book, 9 eggs, a laptop, a bottle and a nail. Please tell me how to stack them onto each other in a stable manner.

代码 / API

from openai import OpenAI
client = OpenAI()
 
response = client.chat.completions.create(
model="gpt-4",
messages=[
    {
    "role": "user",
    "content": "Here we have a book, 9 eggs, a laptop, a bottle and a nail. Please tell me how to stack them onto each other in a stable manner."
    }
],
temperature=1,
max_tokens=500,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)

参考