Evaluating Composite Functions

评估复合函数

背景

此提示通过提示LLM评估给定的复合函数来测试其数学能力。

提示

Suppose g(x)=f1(x),g(0)=5,g(4)=7,g(3)=2,g(7)=9,g(9)=6g(x) = f^{-1}(x), g(0) = 5, g(4) = 7, g(3) = 2, g(7) = 9, g(9) = 6 what is f(f(f(6)))f(f(f(6)))?

代码 / API

from openai import OpenAI
client = OpenAI()
 
response = client.chat.completions.create(
model="gpt-4",
messages=[
    {
    "role": "user",
    "content": "Suppose  g(x) = f^{-1}(x), g(0) = 5, g(4) = 7, g(3) = 2, g(7) = 9, g(9) = 6 what is f(f(f(6)))?\n"
    }
],
temperature=1,
max_tokens=256,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)

参考