Why Azure Web app Bot gives wrong answer?

Anonymous
2022-11-18T07:43:58.667+00:00

i've created a Web app Bot for Q&A on Azure, following those steps:

  • created a new project and filled the Q&A knowledge base con Language Studio
  • Deployed it from language studio
  • Created a bot from language studio, as a C# bot
  • Added a Direct Line channel to the Web app Bot

When i go to the created resource, and try to test it, i get "almost" twice the same reply from the bot:

261779-image.png

i've tested it also from the Bot Framework Emulator, downloading the source code generated by Azure, and i have the same result.
Obviously it is the same also in the chatbot integrated in an actual webapp.
If the answer is just a simple, single line one, i don't see any problem.
Also, if i try to do the same test in Language Studio i get the correct response.

The answer i expect is actually only the second part.

I noticed that when i test the bot from "Test in Web Chat" in Azure Portal, the request is being done to the endpoint

https://webchat.botframework.com//v3/directline/conversations/\*\*\*\*/activities

Instead, when i test it from Language Studio, the request looks like this

https://****.cognitiveservices.azure.com/language/:query-knowledgebases?projectName=*****&api-version=2021-10-01&deploymentName=test

how can i understand what's goin on here?

EDIT:
i found something very weird: if the question is asked without a question mark the answer is fine

EDIT 2:
i found out it depends on the answer numbered list in markdown!
if i replace the numbered list with a dotted one the reply is just fine, with or without the question mark

261932-image.png

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
746 questions
Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
352 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,364 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-11-18T16:42:11.84+00:00

    I've got it working..

    The behaviour i was seeing seems very likely to be a bug, but there is at lease a workaround.

    If i go to the related app service configurations, and set EnablePreciseAnswer fo false everything works fine

    1 person found this answer helpful.
    0 comments No comments