I don't believe that is the model that you used.
I wrote a script and pounded 01 mini and gpt 4 with a wide vareity of tempature and top_p parameters, and was unable to get it to give the wrong answer a single time.
Just a whole bunch of:
(openai-example-py3.12) :~/code/openAiAPI$ python3 featherOrSteel.py
Response 1: A 10.01-pound bag of fluffy cotton is heavier than a 9.99-pound bag of steel ingots.
Response 2: A 10.01-pound bag of fluffy cotton is heavier than a 9.99-pound bag of steel ingots.
Response 3: The 10.01-pound bag of fluffy cotton is heavier than the 9.99-pound bag of steel ingots.
Response 4: The 10.01-pound bag of fluffy cotton is heavier than the 9.99-pound bag of steel ingots.
Response 5: A 10.01-pound bag of fluffy cotton is heavier than a 9.99-pound bag of steel ingots.
Response 6: The 10.01-pound bag of fluffy cotton is heavier than the 9.99-pound bag of steel ingots.
Response 7: The 10.01-pound bag of fluffy cotton is heavier than the 9.99-pound bag of steel ingots.
Response 8: The 10.01-pound bag of fluffy cotton is heavier than the 9.99-pound bag of steel ingots.
Response 9: The 10.01-pound bag of fluffy cotton is heavier than the 9.99-pound bag of steel ingots.
Response 10: A 10.01-pound bag of fluffy cotton is heavier than a 9.99-pound bag of steel ingots.
All responses collected and saved to 'responses.txt'.
Script with one example set of params:
import openai
import time
import random
# Replace with your actual OpenAI API key
openai.api_key = "your-api-key"
# The question to be asked
question = "Which is heavier, a 9.99-pound bag of steel ingots or a 10.01-pound bag of fluffy cotton?"
# Number of times to ask the question
num_requests = 10
responses = []
for i in range(num_requests):
try:
# Generate a unique context using a random number or timestamp, this is to prevent prompt caching
random_context = f"Request ID: {random.randint(1, 100000)} Timestamp: {time.time()}"
# Call the Chat API with the random context added
response = openai.ChatCompletion.create(
model="gpt-4o-2024-08-06",
messages=[
{"role": "system", "content": f"You are a creative and imaginative assistant. {random_context}"},
{"role": "user", "content": question}
],
temperature=2.0,
top_p=0.5,
max_tokens=100,
frequency_penalty=0.0,
presence_penalty=0.0
)
# Extract and store the response text
answer = response.choices[0].message["content"].strip()
responses.append(answer)
# Print progress
print(f"Response {i+1}: {answer}")
# Optional delay to avoid hitting rate limits
time.sleep(1)
except Exception as e:
print(f"An error occurred on iteration {i+1}: {e}")
# Save responses to a file for analysis
with open("responses.txt", "w", encoding="utf-8") as file:
file.write("\n".join(responses))
print("All responses collected and saved to 'responses.txt'.")