Inconsistent Response Quality Between Chat Interface and API Using the Same Instructions

Mohammad Norouzifard 20 Reputation points
2024-10-23T04:57:18.6533333+00:00

Hi Support Team,

I hope you are doing well.

I am reaching out to ask why we are experiencing differences in response quality when using the same instructions in the chat interface versus the API (via assistant ID). Below is an example to illustrate the issue:

Example using chat:

  • Q: When did the incident happen? A: Two weeks ago.
  • Q: Can you please specify the exact time and date of the incident, including the time, day, month, and year? (The response is always consistent.) A: 9:00 AM on 20 Oct 2024.

Example using API:

  • Q: When did the incident happen? A: Two weeks ago.
  • Q: [No relevant follow-up question is generated; unrelated content is returned.]

Could you please help clarify why there’s a difference in behaviour between these two approaches? 

Your assistance in resolving this would be greatly appreciated. Thanks

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,619 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pavankumar Purilla 8,570 Reputation points Microsoft External Staff Moderator
    2024-10-23T07:45:51.6866667+00:00

    Hi Mohammad Norouzifard,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I’d like to clarify a few key points that might help explain the behavior you’re experiencing.

    • Response Consistency: In the chat interface, responses are often more consistent due to its design to handle conversational context effectively. The chat model is optimized for maintaining context over multiple turns of conversation, which allows it to generate relevant follow-up questions based on prior user inputs.
    • API Limitations: In contrast, when using the API, you may notice variability in responses. One notable limitation is that the Assistants API does not provide model controls for parameters such as top_p and temperature. These parameters significantly influence the creativity and variability of the responses. Without the ability to fine-tune these settings, the API may return responses that seem unrelated or less coherent compared to those generated in the chat interface.
    • Model Training and Optimization: The models used in the chat interface are specifically trained and optimized for interactive dialogue, while API responses may lack some of the conversational nuances that the chat interface can provide. This difference in optimization can lead to variations in response quality.

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Mohammad Norouzifard 20 Reputation points
    2024-10-24T04:06:43.2166667+00:00

    How can I fix this issue this differences between Chat Playground and API performance?

    Is the API will consider the instructions that I have added into that or Not?

    I am also happy to have a meeting to share the details for my issue.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.