ChatGPT turbo prompt formatting issue

bot is unable to say “i don’t know” even i am instructing not answer any other question .

i mean bot should not answer maths questions. It should only answer relationship issues

{
“model”: “gpt-3.5-turbo”,
“temperature”: 0,
“messages”: [
{
“role”: “system”,
“content”: “Assistant will only help to resolve family relationship issues. , and will say : i don’t know . if any other thing is being asked”
},
{
“role”: “system”,
“name”: “example_user”,
“content”: “What is 2+2?”
},
{
“role”: “system”,
“name”: “example_assistant”,
“content”: “Sorry. Please ask relevant questions from me”
},
{
“role”: “system”,
“name”: “example_user”,
“content”: "Can you tell me joke? or a song ? or a poem? hahah "
},
{
“role”: “system”,
“name”: “example_assistant”,
“content”: “Sorry. Please ask relevant questions from me and stop being ridiculous!!”
},
{
“role”: “system”,
“name”: “example_user”,
“content”: "My colleage hates me in office because i am being praised be the boss. can you tell me what to do "
},
{
“role”: “system”,
“name”: “example_assistant”,
“content”: “Ignore his jealous behaviour. You are bigger than this”
},
{
“role”: “system”,
“name”: “example_user”,
“content”: “can you tell me pythagoras theorem ?”
},
{
“role”: “system”,
“name”: “example_assistant”,
“content”: "Sorry. "
},
{
“role”: “user”,
“content”: “What is 333 +3 ?”
}
]
}

#############################################

response :
{
“id”: “chatcmpl-6r5AtpOm7ix9YprGc8FKZlehYZ0kQ”,
“object”: “chat.completion”,
“created”: 1678109295,
“model”: “gpt-3.5-turbo-0301”,
“usage”: {
“prompt_tokens”: 190,
“completion_tokens”: 8,
“total_tokens”: 198
},
“choices”: [
{
“message”: {
“role”: “assistant”,
“content”: “The answer is 336.”
},
“finish_reason”: null,
“index”: 0
}
]
}

Hi Faiz,

Not to sure about this, but I don’t think all the roles have to be ‘system’. I might be wrong but the first system role with the content is what it is usually used for. The rest of the roles have to be user and assistant based on what the model expect as an input. Try something like this and see if it helps ?

{
“model”: “gpt-3.5-turbo”,
“temperature”: 0,
“messages”: [
{
“role”: “system”,
“content”: “Assistant will only help to resolve family relationship issues. , and will say : i don’t know . if any other thing is being asked”
},
{
“role”: “user”,
“content”: “What is 2+2?”
},
{
“role”: “assistant”,
“content”: “Sorry. Please ask relevant questions from me”
},
{
“role”: “user”,
“content”: "Can you tell me joke? or a song ? or a poem? hahah "
},
{
“role”: “assistant”,
“content”: “Sorry. Please ask relevant questions from me and stop being ridiculous!!”
},
{
“role”: “user”,
“content”: "My colleague hates me in office because i am being praised be the boss. can you tell me what to do "
},
{
“role”: “assistant”,
“content”: “Ignore his jealous behaviour. You are bigger than this”
}

Cheers !

Sorry , it was not helpful. i tried the suggestion but still same result