Configuration of the tv-custom-recommendation-dialog

How the tv-custom-recommendation-dialog must be configured for this use case

Specific configuration

The tv-custom-recommendation-dialog is specifically designed to resolve the advanced TV recommendation, using LLMs in ATRIA.

Currently, this dialog is available for Aura channelData V1 and V3 versions.

For this use case, the required specific configuration is set below:

    {
      "id": "tv-custom-recommendation",
      "channelDataVersion": "v3", // Only in Aura channelData V3 version
      "triggerConditions": [
        {
          "intent": "intent.tv.custom_recommendation"
        }
      ],
      "bypass": {
        "duration": 4,
        "payloadName": "openai",
        "initialData": {},
        "recognizersEnabled": true,
        "recognizersBreakIntents": {
          "intent.tv.display": [
            "[Display Channel]",
            "[Display Contents]"
          ],
          "intent.navigation.section_show": [
            "[Sections]"
          ]
        }
      }
    }

Specific values

Key Value Description
bypass.duration 4 (minutes) This value overwrites the default aura-bot value for bypass lasting 10 minutes.
bypass.payloadName openai Name of the interface that will be used as bypass payload for this dialog.
bypass.initialData empty It should contain any data needed by the dialog to be initialized.
bypass.recognizersEnabled true This value overwrites the default aura-bot way of working with recognizers when it is in bypass mode. If it is set to true, recognizers are executed, and their result is stored in the bypass payload to be used, if needed, afterwards.
bypass.recognizersBreakIntents Array of intents and their tagged topic matches Used to handle when the user requested any other use case during the execution of the advanced custom recommendation.

Environment variables

Property Type Description Modifiable by OB?
AURA_GATEWAY_API_ENDPOINT URI string Endpoint to access the locally deployed ATRIA aura-gateway-api NO
AURA_GATEWAY_API_ISSUER_URL string Aura issuer URL. It is automatically fulfilled by the installer. NO
TVCUSTOMRECOMMENDATION_COMMAND_REGEXP string Regex to match the command for TV custom recommendation NO
TVCUSTOMRECOMMENDATION_GET_TOPIC_REGEXP string Regex to match the topic command for TV custom recommendation NO
TVCUSTOMRECOMMENDATION_CLEAN_TOPIC_REGEXP string Regex to replace the command by text for TV custom recommendation response NO
TVCUSTOMRECOMMENDATION_MAX_ITERATIONS number Maximum number of question and answer cycles allowed by the dialog, to avoid an infinite conversation between the user and the LLM. By default, 5. YES

Configuration by channel

From Prince’s release onwards, the configuration of applicationId and presetId per channel and intent has been added to the channel model.

For this use case, the required specific configuration per channel is set below (added dialogs section under atria property at Main-Recognizer-Video-Triage-29855):

    ...,
    "atria": {
      "dialogs": {
        "intent.tv.custom_recommendation": {
          "applicationId": "816bdab6-3ea3-4a77-bdea-12945d6d7053",
          "presetId": "ef3d0603-3fef-4109-a577-0ab92f9060df"
        }
      }
    }

Specific values by channel

Intent Key Value Description Modifiable by OB?
intent.tv.custom_recommendation applicationId 816bdab6-3ea3-4a77-bdea-12945d6d7053 ATRIA application identifier NO
intent.tv.custom_recommendation presetId ef3d0603-3fef-4109-a577-0ab92f9060df ATRIA preset identifier to be used within the use case. NO

Dialog flows

The following diagrams are a simplification of the whole flow, this means that not all the components of Aura or Kernel are included, for the sake of the readability of the diagrams.

Please, take into account, that:

  • AuraBot includes DirectLine, aura-groot and aura-bot components.
  • ATRIA includes aura-gateway-api, atria-model-gw and OpenAI models calls.
  • AuraTVAPI includes the calls to Kernel.

Standard execution

actor User
participant STB #ebdff7
participant AuraBot
participant AuraNLP
participant Atria
participant AuraTVAPI

User -> STB ++:  Recomendación personalizada
STB -> AuraBot ++: sendActivity("Recomendación personalizada")
AuraBot -> STB: 200 OK
AuraBot -> AuraNLP ++: recognize("Recomendación personalizada")
AuraNLP -> AuraBot --: 200 OK (intent.tv.custom_recommendation)
AuraBot -> AuraBot: openDialog("custom_recommendation")
group custom_recommendation dialog
AuraBot -> AuraBot: init bypass mode
AuraBot -> Atria ++: prompt(app, preset, "custom_recommendation")
Atria -> AuraBot: "¡Hola! ¿En qué puedo ayudarte hoy? ¿Qué tipo de contenido estás buscando?" 200 OK
AuraBot -> AuraBot: sendToUser("¡Hola! ¿En qué puedo ayudarte hoy? ¿Qué tipo de contenido estás buscando?")
end
AuraBot -> STB: sendActivity("¡Hola! ¿En qué puedo ayudarte hoy? ¿Qué tipo de contenido estás buscando?")
User -> STB: Estoy tristón y quiero animarme
STB -> AuraBot: sendActivity("Estoy tristón y quiero animarme")
AuraBot -> STB: 200 OK
group custom_recommendation dialog
AuraBot -> Atria: prompt(app, preset, "Estoy tristón y quiero animarme")
Atria -> AuraBot: "¿Te gustaría ver algo emocionante o prefieres algo más relajado?" 200 OK
AuraBot -> AuraBot: sendToUser("¿Te gustaría ver algo emocionante o prefieres algo más relajado?")
end
AuraBot -> STB: sendActivity("¿Te gustaría ver algo emocionante o prefieres algo más relajado?")
User -> STB: Emocionante
STB -> AuraBot: sendActivity("Emocionante")
AuraBot -> STB: 200 OK
group custom_recommendation dialog
AuraBot -> Atria: prompt(app, preset, "Emocionante")
Atria -> AuraBot: "¿Te gustan las historias de héroes o tal vez algo de alto voltaje? O quizás prefieres persecuciones y carreras." 200 OK
AuraBot -> AuraBot: sendToUser("¿Te gustan las historias de héroes o tal vez algo de alto voltaje? O quizás prefieres persecuciones y carreras.")
end
AuraBot -> STB: sendActivity("¿Te gustan las historias de héroes o tal vez algo de alto voltaje? O quizás prefieres persecuciones y carreras.")
User -> STB: Héroes
STB -> AuraBot: sendActivity("Héroes")
AuraBot -> STB: 200 OK
group custom_recommendation dialog
AuraBot -> Atria: prompt(app, preset, "Héroes")
Atria -> AuraBot: "¿Quieres ver algo sobre héroes salvando el mundo o más bien sobre héroes en situaciones peligrosas?" 200 OK
AuraBot -> AuraBot: sendToUser("¿Quieres ver algo sobre héroes salvando el mundo o más bien sobre héroes en situaciones peligrosas?")
end
AuraBot -> STB: sendActivity("¿Quieres ver algo sobre héroes salvando el mundo o más bien sobre héroes en situaciones peligrosas?")
User -> STB: Salvando el mundo
STB -> AuraBot: sendActivity("Salvando el mundo")
AuraBot -> STB: 200 OK
group custom_recommendation dialog
AuraBot -> Atria: prompt(app, preset, "Salvando el mundo")
Atria -> AuraBot --: "[RESULT TAG]" 200 OK
AuraBot -> AuraTVAPI ++: searchTVContentByTag("[RESULT TAG]")
AuraTVAPI -> AuraBot --: contents 200 OK
AuraBot -> AuraBot: sendToUser("Este es el contenido que puedo recomendarte", contents)
end
AuraBot -> STB: sendActivity("Este es el contenido que puedo recomendarte", contents)

The user requests another use case while the recommendation dialog is open

actor User
participant STB #ebdff7
participant AuraBot
participant AuraNLP
participant Atria
participant AuraTVAPI

User -> STB ++:  Recomendación personalizada
STB -> AuraBot ++: sendActivity("Recomendación personalizada")
AuraBot -> STB: 200 OK
AuraBot -> AuraNLP ++: recognize("Recomendación personalizada")
AuraNLP -> AuraBot --: 200 OK (intent.tv.custom_recommendation)
AuraBot -> AuraBot: openDialog("custom_recommendation")
group custom_recommendation dialog
AuraBot -> AuraBot: init bypass recognizing mode
AuraBot -> Atria ++: prompt(app, preset, "custom_recommendation")
Atria -> AuraBot: "¿Qué tipo de emociones prefieres experimentar al ver una película o serie?" 200 OK
AuraBot -> AuraBot: sendToUser("¿Qué tipo de emociones prefieres experimentar al ver una película o serie?")
end
AuraBot -> STB: sendActivity("¿Qué tipo de emociones prefieres experimentar al ver una película o serie?")
User -> STB: Emociones fuertes
STB -> AuraBot: sendActivity("Emociones fuertes")
AuraBot -> STB: 200 OK
AuraBot -> AuraNLP ++: recognize("Emociones fuertes")
AuraNLP -> AuraBot --: None 200 OK
AuraBot -> AuraBot: storeIntentResolutionInContext(None)
group custom_recommendation dialog
AuraBot -> Atria: prompt(app, preset, "Emociones fuertes")
Atria -> AuraBot: "¿Prefieres historias de acción intensa o situaciones peligrosas en las que los protagonistas tienen que luchar por sobrevivir?" 200 OK
AuraBot -> AuraBot: sendToUser("¿Prefieres historias de acción intensa o situaciones peligrosas en las que los protagonistas tienen que luchar por sobrevivir?")
end
AuraBot -> STB: sendActivity("¿Prefieres historias de acción intensa o situaciones peligrosas en las que los protagonistas tienen que luchar por sobrevivir?")
User -> STB: Abre Netflix por favor
STB -> AuraBot: sendActivity("Abre Netflix por favor")
AuraBot -> STB: 200 OK
AuraBot -> AuraNLP ++: recognize("Abre Netflix por favor")
AuraNLP -> AuraBot --: {intent: intent.navigation.section_show, entities: [section: netflix]} 200 OK
AuraBot -> AuraBot: storeIntentResolutionInContext({intent: intent.navigation.section_show, entities: [section: netflix]})
group custom_recommendation dialog
AuraBot -> Atria: prompt(app, preset, "Abre Netflix por favor")
Atria -> AuraBot: "[Sections]" 200 OK
AuraBot -> AuraBot: redirectToDialog({intent: intent.navigation.section_show, entities: [section: netflix]})
end
group section_show dialog
AuraBot -> AuraBot: sendToUser(openSectionNetflix)
end
AuraBot -> STB: sendActivity(openSectionNetflix)