跳到主要内容

使用LLMs进行物理推理

背景

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

提示

这里有一本书、9个鸡蛋、一台笔记本电脑、一瓶水和一根钉子。请告诉我如何将它们稳定地堆叠在一起。

代码 / 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
)

参考