How to manage conflicting policies in a chatbot for different countries? (Chat with Azure OpenAI models using your own data)

Syedbabar Ali 375 Reputation points
2023-09-21T12:42:44.3766667+00:00

I am working on a chatbot that answers questions from my organization's policies, which I have provided as an Azure Cognitive Search index in the API.

However, I have a problem because we have almost 400+ policies for different countries, and the chatbot returns answer different,different country policy how to manage it.

For example we have IT Polices

1-IT-Policy-UK.pdf
2-IT-Policy-Uganda.pdf
3-IT-Policy-Kenya.pdf
4-IT-Policy-Afghanistan.pdf

(Chat with Azure OpenAI models using your own data)

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,014 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,080 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. brtrach-MSFT 16,356 Reputation points Microsoft Employee
    2023-10-03T22:29:44.2166667+00:00

    @Syedbabar Ali To manage conflicting policies in a chatbot for different countries, you can use a combination of techniques such as language detection, region detection, and user preferences to provide the most relevant policy information to the user.

    Here are some steps you can follow:

    Use language detection to identify the language of the user's question. You can use the Azure Cognitive Services Text Analytics API to detect the language of the user's question.

    Use region detection to identify the user's location. You can use the Azure Maps REST API to detect the user's location based on their IP address.

    Use user preferences to allow the user to specify their preferred language and region. You can provide a menu or other interface for the user to select their preferred language and region.

    Use the language, region, and user preferences to filter the search results from your Azure Cognitive Search index. You can add language and region fields to your index and use them to filter the search results based on the user's language and region.

    Use the filtered search results to generate a response using the OpenAI API. You can pass the filtered search results to the OpenAI API to generate a response that is based on the most relevant policy information for the user's language and region.

    By following these steps, you can provide the most relevant policy information to the user based on their language, region, and preferences.

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.