Maintain previous context Azure Custom Question and Answering C# for BOT

117 Views Asked by At

I created bot using Azure Portal and connecting to Azure Custom Question and Answering (Language studio). We needed some customization so I downloaded the source code (C#) and would like to know how can i retain conversation so if user next question it understands that it knows the context if question is relevant to previous question? Basically building ChatGPT like bot and is there a way that we can format the response of Answer. Sometime the Answers are given in form - "Not" , so instead if it can reply and add relevant content based on the question so it makes little more nice. We are trying to build a internal chat bot which will be based on company policy, faq etc.

1

There are 1 best solutions below

0
Rishabh Meshram On

Based on the provided information, one possible solution is to use multi-turn conversations in Azure QnA Maker.

This allow you to manage the multiple turns of a conversation, where the previous question's context influences the next question and answer. You can use follow-up prompts to create multiple turns of a conversation.

Please check multi-turn conversations documentation for detailed steps.

You can also check out sample code for multi turn prompt and QnA Custom Bot with multi-turn conversation in BotBuilder-Samples.