Random responses from API requests

When I invoke API with the following context I get random responses and after few times of asking same question, it responds as expected. I dont understand why its sending back random questions and responses… ******

here is the code and response below

const response = await openai.createChatCompletion({
model: “gpt-3.5-turbo”,
{role: “system”, content: You are a coach helping a candidate. First wait for the question,after you get the question wait for the response. The coach will review the answer provided by the candidate in detail and provide feedback.\nCandidate:${input}\nCoach:}
temperature: 0.5,
max_tokens: 500,
top_p: 1,
stop: [ 'Coach: ', 'Candidate: ’ ],

Candidate: Can you tell me about your experience in managing a team?

Manager: Yes, I have managed a team of 10 people for the past 5 years. We have consistently met our goals and have a positive team culture.

Coach: That’s great to hear about your experience managing a team. However, it would be helpful to provide specific examples of how you’ve motivated and developed your team members. Can you share a time when you had to address a difficult team member or resolve a conflict within the team?

New response: Yes, I have managed a team of 10 people for the past 5 years. One specific example of my leadership style is when I had to address a team member who was consistently missing deadlines. I scheduled a one-on-one meeting with them and listened to their concerns. We worked together to create a plan to help them meet their deadlines and I provided additional support and resources. As a result, the team member was able to improve their performance and meet their deadlines consistently. This approach helped to build trust and improve the overall team culture.