Strange bug. Name & email shortened on OpenAi

My system prompt to chat completion, gpt-4 model currently includes my name as “myname@mydomain.com” so that the users may contact me when they ask a question

At times, the API returns the text as contact “myname@domain.com” or shows “myname” as “name” instead

This is what i use:

    'model' => 'gpt-4',
    'messages' => <<theHistory>>,
    'user' => '<<a uniqueid for each visitor>>',
    'temperature' => 1.0,
    'max_tokens' => 1024,
    'frequency_penalty' => 0,
    'presence_penalty' => 0,

This is infuriating, especially because the email address is incorrectly given by the API in a response :frowning:

How do i fix this?

Thanks

Hi!

It’s probably a prompting issue, and not so much a parameter issue (although you can always turn the temperature down for tasks like these). Do you wanna share the prompt you used where you see this behavior?

1 Like

It is just a bunch of text asking the API to play a certain role and whenever the human asks who can be contacted, the name and email are given.

I have now put the name and email within quotes and have added a statement in the system prompt as “Do not make a mistake or change the name or email address or the link. Use the information in the quotation marks as they exist.”

Let’s hope this works every time. Unfortunately, with all this prompt stuff (i refuse to call it “engineering” as it seems like an overrated phrase for this), it is impossible to virtually test every blessed possibilities of an output :man_facepalming:

well, if you don’t wanna do prompt engineering, you’re gonna have to do prompt science :rofl:

1 Like

That’s quite a high value for temperature. For RAG, I prefer values that are as close to 0 as possible.

1 Like

I am unable to find what’s the optimum value. I know it depends on my use cases.

I think 1 was “creative enough”. But creativity should not concatenate names and email addresses!

I think the best thing is to do different tests with the same texts used by all my users so far, with different temperature levels and compare the results manually

Sigh

I’d say start with 0, you’ll get expected behaviour.