How to use converstation of utterances in Conversational Language Understading?

Jun An 0 Reputation points
2024-04-09T20:25:22.4466667+00:00

I have added two intents on a project of Conversational Language Understanding in Language Service

  1. Ask Weather
  2. Ask Stock Price

It is working if I just ask a single sentence such as "What is the weather in Toronto?" or "What is the price of Tesla stock today?"

result intent is correct either "Ask Weather" or "Ask Stock Price" based on utterance.

However I can't figure out how to pass conversation of utterances.

For example, below is conversation between Assistant & User.


User: "What is the weather in Toronto?"

Assistant: "Today is 7c"

User: "What about in Japan?"

Assistant: "Japan is 10c"

User: "What is the stock price of apple today?"


In this case, the Intent should be changed based on conversation, it supposed to give me topIntent of "Ask Stock Price" instead of "Ask Weather" so CLU should understand chat history and figure out.

Also, I can't always use last question since you might ask follow on question based on asistant's answer which we have to look previous history to figure out what is the main type of question.

I can see payload only supporting single text of utterance, how to pass conversation?

I assume it will be something like this, but I can't find from API

{
    "kind": "Conversation",
    "analysisInput": {
        "conversationItems": [
            {
                "id": "1",
                "participantId": "User",
                "text": "How is Google’s stock performing today?"
            },
            {
                "id": "2",
                "participantId": "Assistant",
                "text": "The current price for Alphabet Inc. (GOOGL) is $2,854.42 per share."
            },
            {
                "id": "3",
                "participantId": "User",
                "role": "User",
                "text": "What about tesla?"
            },
            {
                "id": "4",
                "participantId": "Assistant",
                "role": "User",
                "text": "It is $300"
            },
            {
                "id": "5",
                "participantId": "User",
                "text": "by the way, how is Korea's weather tomorrow?"
            }
        ]
    },
    "parameters": {
        "projectName": "Copilot-Language",
        "deploymentName": "LanguageCopilotDeployment",
        "stringIndexType": "TextElement_V8"
    }
}

Could you help? thank you


Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
357 questions
{count} votes