Evaluating Composite Functions

Evaluating Composite Functions

Background

This prompt tests an LLM's mathematical capabilities by prompting it to evaluate a given composition function.

Prompt

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)))?

Code / 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
)

Reference