Open AI response is not consistent

lakshmi 691 Reputation points
2024-08-09T17:43:36.2433333+00:00

Hi Team,

We are using azure open ai and ai search for using private document answer fetch. We have added the document in storage account and configured index in ai search. Even if the configured document has specific question still we are not getting the answer while using open ai clinet chat completion.

We are using the below chat completions options.

ChatCompletionsOptions chatCompletionsOptions = new()
{
    DeploymentName = AzureOpenAIDeploymentId,
    Temperature = 0,
    MaxTokens = AzureOpenAIParamMaxTokens }; 

var prompt = $"Instuction: Read the question carefully and try to understand what information the user is looking for. Check the provided documents for any relevant information related to the question. If relevant information is found, extract the most suitable answer in English and provide it to the user.If no relevant information is found in the provided documents or the question is not related to the data in the document, respond with, 'The requested information is not available in the retrieved documents'";

chatCompletionsOptions.Messages.Add(new ChatRequestSystemMessage(prompt));
// Add Previous chat history to the chatCompletionsOptions. Add Request user system message and assistant message.

chatCompletionsOptions.AzureExtensionsOptions = new AzureChatExtensionsOptions()
{
    Extensions =
        {
            new AzureSearchChatExtensionConfiguration ()
            {
                Authentication = new OnYourDataSystemAssignedManagedIdentityAuthenticationOptions(),
                SearchEndpoint = new Uri(AzureSearchEndpoint),
                IndexName = indexName,
                Strictness = 5,
                ShouldRestrictResultScope = true,
                RoleInformation = prompt
            }
        }
};

We have tried the same question in ai search index, and we are seeing the answer in ai search but not getting answer while using

Response<ChatCompletions> responseWithoutStream = await OpenAIClient.GetChatCompletionsAsync(chatCompletionsOptions);

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,882 questions
{count} votes

Accepted answer
  1. AshokPeddakotla-MSFT 32,781 Reputation points
    2024-08-12T12:30:15.43+00:00

    lakshmi Could you share the model details? Did you observe the same behavior while using GPT 4 or Using the gpt-35-turbo-16k ?

    Did you enable the setting the "Limit responses to your data" ? Avoid asking long questions and break them down into multiple questions if possible.

    Also, see the Troubleshooting steps and let me know if that helps.


0 additional answers

Sort by: Most helpful

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.