This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

TV Custom Recommendation UC

TV Custom Recommendation UC

Global use case developed by Aura Platform Team that allows users to launch a custom recommendation based on Large Language Models (LLMs), through the use of ATRIA

Introduction

The TV Custom Recommendation use case is a global experience designed and developed by Aura Global Team that allows Telefónica customers to ask Aura for a TV recommendation based on their mood and likes, using a vocal interface.

Find additional information in the following documents:

Specifications

Kernel API

In order to resolve the user’s request, Aura uses Video Contents normalized Kernel API.

Request-response model

TV custom recommendation UC is available for use in both the deprecated request-response model v1 and the current request-response model v3.

Available channels

The TV Custom Recommendation UC is available for STB channel both in Spain and in Brazil.

Custom recommendation features

Currently, the TV custom recommendation use case includes:

  • A conversation flow to identify the user’s likes and mood
  • Once all the information is captured and treated by the LLM, a search by topic is launched to the TV APIs

Use case development

The TV custom recommendation use case development includes these components:

Understanding features

  • TV custom recommendation use case intent: intent.tv.custom-recommendation

In order to understand users’ requests (utterances), Aura is trained with:

  • NLP expression to recognize the user’s utterance and detect the user’s intention.

Use case logic

Once Aura has recognized the user’s utterance based on NLP components, the use case should be resolved based on:

Use case configuration

Check the section Configuration of the TV Custom Recommendation use case in order to know the required configuration for the TV Custom Recommendation experience for each OB.

1 - Dialog configuration

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)

2 - TV Custom Recommendation resources

TV Custom Recommendation use case resources

Resources used by the TV Custom Recommendation use case

Introduction

The TV Custom Recommendation use case will use three different types of resources:

Specific resources for the use case: tv.custom_recommendation

The resources associated to the TV Custom Recommendation plugin are defined below:

Specific resources for tv.custom-recommendation use case Definition Example Managed by Scope
tv-custom-recommendation:command.exit Resource returned when the user sends a message to stop the dialog and launch a different UC Entendido. Recuerda que puedes volver a probarlo diciendo “Recomendador avanzado" tv.custom_recommendation dialog Use case-specific
tv-custom-recommendation:command.close.words Resource returned when the user sends a message to stop the dialog. By default, it is not configured. Salir, cerrar, goodbye, exit, quit tv.custom_recommendation dialog Use case-specific
tv-custom-recommendation:error.message Resource returned in the happening of an error Algo no ha ido bien, inténtalo de nuevo tv.custom_recommendation dialog Use case-specific
tv-custom-recommendation:command.none Resource returned when ATRIA does not recognize what the user is saying and returns a topic of “[None]” Uy, no tengo claro a qué te refieres tv.custom_recommendation dialog Use case-specific
tv-custom-recommendation:command.unknown-error Resource returned when ATRIA returns a tagged topic that is not matched in the dialog. Algo no ha ido bien, inténtalo de nuevo tv.custom_recommendation dialog Use case-specific

3 - NLP configuration by OB

NLP configuration by OB

NLP configuration by OB for the TV Custom Recommendation use case

Introduction

The current document includes the configuration of the NLP model for the normalized TV Custom Recommendation use case in the OBs where it is available.

Spain

The TV Custom Recommendation use case is accessible in STB channel.

Intent

intent.tv.custom_recommendation

Entities

No entities are handled for this intent.

Pipeline stages

Since there is a closed list of commands that could trigger this UC, the stage involved in its recognition is a deterministic one:

  • “ExactMatchRecognizerWrapper”

The whole pipeline.jsonfile is available at https://github.com/Telefonica/aura-nlpdata-es/blob/master/data/es-es/stb/pipeline.json

Commands

Currently, the commands that trigger this intent are:

      "Abre el recomendador avanzado",
      "Abre el recomendador personalizado",
      "Abre la recomendación avanzada",
      "Abre la recomendación personalizada",
      "Abre recomendación avanzada",
      "Abre recomendación personalizada",
      "Abre recomendador avanzado",
      "Abre recomendador personalizado",
      "Abrir el recomendador avanzado",
      "Abrir el recomendador personalizado",
      "Abrir la recomendación avanzada",
      "Abrir la recomendación personalizada",
      "Abrir recomendación avanzada",
      "Abrir recomendación personalizada",
      "Abrir recomendador avanzado",
      "Abrir recomendador personalizado",
      "Recomendación avanzada",
      "Recomendación personalizada",
      "Recomendador avanzado",
      "Recomendador personalizado"

Brazil

The aura-nlpdata repository structure in Brazil is organized by channel: aura-nlpdata-br-[channel]. Each repository will contain the files for the available use cases in this channel.

The following configuration corresponds to the STB channel, which is included in the repository: https://github.com/Telefonica/aura-nlpdata-br-stb

Intent

intent.tv.custom_recommendation

Entities

No entities are handled for this intent.

Pipeline stages

Since there is a closed list of commands that could trigger this UC, the stage involved in its recognition is a deterministic one:

  • “ExactMatchRecognizerWrapper”

The whole pipeline.jsonfile is available at: https://github.com/Telefonica/aura-nlpdata-br-stb/blob/master/data/pt-br/stb/pipeline.json

Commands

Currently, the commands that trigger this intent are:

      "Abra o recomendador avançado",
      "Abra o recomendador personalizado",
      "Abra a recomendação avançada",
      "Abra a recomendação personalizada",
      "Abra recomendação avançada",
      "Abra recomendação personalizada",
      "Abra recomendador avançado",
      "Abra recomendador personalizado",
      "Abrir o recomendador avançado",
      "Abrir o recomendador personalizado",
      "Abrir a recomendação avançada",
      "Abrir a recomendação personalizada",
      "Abrir recomendação avanzada",
      "Abrir recomendação personalizada",
      "Abrir recomendador avançado",
      "Abrir recomendador personalizado",
      "Recomendação avançada",
      "Recomendação personalizada",
      "Recomendador avançado",
      "Recomendador personalizado"

4 - NLP configuration by OB

NLP configuration by OB

NLP configuration by OB for the TV Custom Recommendation use case

Introduction

The current document includes the configuration of the NLP model for the normalized TV Custom Recommendation use case in the OBs where it is available.

Spain

The TV Custom Recommendation use case is accessible in STB channel.

Intent

intent.tv.custom_recommendation

Entities

No entities are handled for this intent.

Pipeline stages

Since there is a closed list of commands that could trigger this UC, the stage involved in its recognition is a deterministic one:

  • “ExactMatchRecognizerWrapper”

The whole pipeline.jsonfile is available at https://github.com/Telefonica/aura-nlpdata-es/blob/master/data/es-es/stb/pipeline.json

Commands

Currently, the commands that trigger this intent are:

      "Abre el recomendador avanzado",
      "Abre el recomendador personalizado",
      "Abre la recomendación avanzada",
      "Abre la recomendación personalizada",
      "Abre recomendación avanzada",
      "Abre recomendación personalizada",
      "Abre recomendador avanzado",
      "Abre recomendador personalizado",
      "Abrir el recomendador avanzado",
      "Abrir el recomendador personalizado",
      "Abrir la recomendación avanzada",
      "Abrir la recomendación personalizada",
      "Abrir recomendación avanzada",
      "Abrir recomendación personalizada",
      "Abrir recomendador avanzado",
      "Abrir recomendador personalizado",
      "Recomendación avanzada",
      "Recomendación personalizada",
      "Recomendador avanzado",
      "Recomendador personalizado"

Brazil

The aura-nlpdata repository structure in Brazil is organized by channel: aura-nlpdata-br-[channel]. Each repository will contain the files for the available use cases in this channel.

The following configuration corresponds to the STB channel, which is included in the repository: https://github.com/Telefonica/aura-nlpdata-br-stb

Intent

intent.tv.custom_recommendation

Entities

No entities are handled for this intent.

Pipeline stages

Since there is a closed list of commands that could trigger this UC, the stage involved in its recognition is a deterministic one:

  • “ExactMatchRecognizerWrapper”

The whole pipeline.jsonfile is available at: https://github.com/Telefonica/aura-nlpdata-br-stb/blob/master/data/pt-br/stb/pipeline.json

Commands

Currently, the commands that trigger this intent are:

      "Abra o recomendador avançado",
      "Abra o recomendador personalizado",
      "Abra a recomendação avançada",
      "Abra a recomendação personalizada",
      "Abra recomendação avançada",
      "Abra recomendação personalizada",
      "Abra recomendador avançado",
      "Abra recomendador personalizado",
      "Abrir o recomendador avançado",
      "Abrir o recomendador personalizado",
      "Abrir a recomendação avançada",
      "Abrir a recomendação personalizada",
      "Abrir recomendação avanzada",
      "Abrir recomendação personalizada",
      "Abrir recomendador avançado",
      "Abrir recomendador personalizado",
      "Recomendação avançada",
      "Recomendação personalizada",
      "Recomendador avançado",
      "Recomendador personalizado"