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

Return to the regular view of this page.

TV LLM Recommend UC

TV LLM Recommend UC

Global use case developed by Aura Platform Team that allows users to get personalized TV/video recommendations in Aura

Introduction

The video LLM Recommend use case is a global experience designed and developed by Aura Global Team that allows Telefónica customers to ask Aura for content recommendations (live channels and catalog items) using a voice interface.

Find additional information in the following documents:

Specifications

Kernel API

To resolve the user’s request, Aura uses the normalized Video Contents Kernel API.

Request-response model

The TV LLM Recommend UC is available only when using the normalized request-response model v3.

Available channels

The TV LLM Recommend UC can be enabled in any channel implementing the normalized v3 request-response model and TV-related payloads.

TV LLM Recommend features

The normalized TV LLM Recommend UC includes personalized recommendations:

  • Suggest a single live channel (with a zap action).
  • Suggest a single catalog item (e.g., VOD).
  • Suggest a list of items when multiple results are available.
  • Return no content when the API returns no results.

Current limitations

Currently, the TV LLM Recommend UC does not include:

  • Fallback/contingency search (as in TV search).
  • Filters customized (as persons, genres, participants, …).
  • Third-party catalogs outside Aura/Kernel scope.

Use case development

The TV LLM Recommend UC includes these components:

Understanding features

  • Intent: intent.tv.recommend

Use case logic

Once Aura recognizes the user’s utterance, the UC is resolved via:

Response

The response follows the standard video plugin response schema.

Where:

  • intent: input intent.

  • entities: input entities as received.

  • result_intent: usually MEDIA.SEARCH; CHANNEL.PLAY is used when returning a single live channel.

  • resources: List of response resources that includes three main parameters:

    • type: Type of the response resource.
    • name: Name of the response resource. Example: tv:video.recommend.multiple-results, tv:video.recommend.by-default.simple-result, tv:video.recommend.display.single-result, tv:video.recommend.no-results.
    • params: This field returns any required parameter in the resource. Example: channelId or deviceId for tv:video.recommend.display.single-result.
  • payload: Information provided by the Kernel API, when we make the content get info request. If we receive a response, this field includes the following parameters:

    • type: The value of this field depends on the type of data included in the field data (info returned by the API):
      • If it is a value: details
      • If it is a list: content_list
    • data: It returns the information provided by the Kernel API.
  • status: Final status request. This field includes the following parameters:

    • code: Status code.
    • message: Status message, which describes the status code.
    • params: Parameter that sends details of status. This field does not appear if it is empty.
  • actions: Actions to follow with the result of request. This plugin could include the following actions:

    • REMOTEON.ZAPTO: Used to tune a live channel on STB.
  • conditions: conditions for actions to be applied.

1 - Dialog configuration

Configuration of the generic-dialog for TV Recommend use case

How the generic-dialog must be configured for this use case

Specific configuration

The TV Recommend use case is triggered by the generic-dialog-v3.
For this use case, the required configuration is:

{
  "id": "generic-dialog-v3",
  "channelDataVersion": "v3",
  "triggerConditions": [
    {
      "intent": "intent.tv.recommend",
      "settings": {
        "locales": {
          "error": [
            "core:flc.answer.error"
          ]
        },
        "needTvResolution": true,
        "payloadType": "tv"
      }
    }
  ]
}

2 - TV Recommend plugin

Complex Logic Framework plugin for the TV Recommend use case

TV Recommend plugin

Complex Logic Framework plugin for the TV Recommend use case

Introduction

The TV Recommend plugin resolves requests from a user to obtain personalized recommendations for audiovisual content from Telefónica catalogs.

  • Intent: intent.tv.recommend
  • Main result intents: MEDIA.SEARCH (default), CHANNEL.PLAY (when zapping to a live channel).

Validate input request

This step validates that the input request fulfills all the requirements from the input schema.

If the input data is invalid, the resource returned is:


The plugin works with the following entity types:

Entity type Usage in search Notes
ent.audiovisual_channel Yes Multiple values accepted, separated by ||.
ent.audiovisual_person Yes For participants (actors, directors, presenters, etc.), multiple values accepted with ||.
ent.audiovisual_query Yes Free text query, multiple values accepted with ||.

Multiple entities & values:
You can repeat the same entity type multiple times and/or provide several values in a single entity using the \|\| separator.


Building the search query

The plugin constructs two query strings:

  1. search_query → technical query sent to Kernel API:

    • Group query and channel entities in parentheses.
    • Joins different entity types with AND.
    • Query: split on ||, trim each value, and join with OR inside the parentheses (no quotes).
    • Channel: trim each value, wrap each value in quotes, and join with OR inside the parentheses.
    • Person: trim each value, wrap each value in quotes, and join with AND (no group parentheses).
    • Example:
      ("La 1" OR "La 2") AND "Brad Pitt" AND (mystery OR series)
      
  2. search_query_response → a simplified, user-readable query string included in the payload and telemetry.

If no entities are present, the plugin returns a no results response.


API video query (Handler 4P)

Plugin calls Handler4P.tv_4p_handler.get_user_content_search(...) with the following parameters:

  • user_id: data[aura_user][user_id]
  • administrative_number: data[app_context][user][account_number]
  • access_token: data[aura_user][access_token]
  • scopes: data[aura_user][scopes]
  • purposes: data[aura_user][purposes]
  • device_type: data[app_context][device][type]
  • catalog_types:
    • Default: VOD, LIVE, L7D
    • Allowed: VOD, LIVE, L7D, LCH, LSR
    • Filtered according to allowed_catalog_types of the device
  • search_query: built as explained above
  • show_series: series
  • profile: data[app_context][user][video_profile_name] (optional; only if present to avoid API 501 errors)
  • commercialization_types: [SVOD]
  • max_quality: data[app_context][device][max_quality] (optional)
  • current_region: data[app_context][location][currentRegion] (optional)
  • order: personal

Response logic

Depending on the number and type of results, the plugin builds different responses:

1. No results

  • Plays negative sound unless the channel is disabled in the sound_disabled_channels configuration
  • result_intent: MEDIA.SEARCH
  • Resource: tv:video.recommend.no-results
  • Status: SUCCESS.NO_CONTENT

2. One result

  • Live channel:
    • Payload: { type: details, data: <channel info> }
    • Action: REMOTEON.ZAPTO (with params channelId and deviceId)
    • Plays positive sound unless the channel is disabled in the sound_disabled_channels configuration
    • result_intent: CHANNEL.PLAY
    • Resource: tv:video.recommend.display.single-result
  • Non-live content (VOD, L7D, etc.):
    • Payload: details of the single item
    • Plays positive sound
    • result_intent: MEDIA.SEARCH
    • Resource: tv:video.recommend.by-default.simple-result

3. Multiple results

  • Payload: content list and search_query (search query response string)
  • Plays positive sound unless the channel is disabled in the sound_disabled_channels configuration
  • result_intent: MEDIA.SEARCH
  • Resource: tv:video.recommend.multiple-results (with param query_displayed)

Resources returned

The TV Recommend plugin may return the following resources:

  • tv:video.model-validation.request.error → input validation error
  • tv:video.api.answer.error → API Video error
  • tv:video.recommend.no-results → no content found
  • tv:video.recommend.by-default.simple-result → one non-live result
  • tv:video.recommend.multiple-results → multiple results
  • tv:video.recommend.display.single-result → one live channel (tune channel)

Payload and actions

  • Payload:

    • type: details (single item) or content_list (multiple items)
    • data: item(s) from Kernel API
    • For multiple results: includes search_query (human-readable string)
  • Actions:

    • Sound feedback (positive/negative)
    • For a single live channel: {"name": "REMOTEON.ZAPTO", "params": {"channelId": "$channelId", "deviceId": "$deviceId"}, "target": "stb"}

Status codes

  • status: Final status request. This field includes the following parameters:
    • code: Status code with value: SUCCESS, SUCCESS.NO_CONTENT or ERROR.INTERNAL.
    • message: Status message, which describes the status code.
    • params: Parameter that sends details of status. This field does not appear if it is empty.

Example behavior

  • “Recommend me something”
    • for a single live channel result → CHANNEL.PLAY tune channel with live channel.
    • for a multiple results → MEDIA.SEARCH with tv:video.recommend.multiple-results.
    • for any results → tv:video.recommend.no-results.

3 - TV LLM Recommend UC resources

TV LLM Recommend UC resources

Resources used by the TV LLM Recommend UC

Introduction

The TV LLM Recommend UC will use three different types of resources:

Specific resources for the use case: TV LLM Recommend

The resources associated to the TV LLM Recommend plugin are defined below:

Specific resources for TV LLM Search use case Definition Example Managed by Scope
tv:video.recommend.by-default.simple-result Resource returned when finds one result as recommendation Here is a suggestion tv.recommend plugin Use case-specific
tv:video.recommend.multiple-results Resource returned when finds more than one result as recommendation Here are some suggestions tv.recommend plugin Use case-specific
tv:video.recommend.display.single-result Resource returned when one live channel is recommended and starts playback Tuning to channel tv.recommend plugin Use case-specific
tv:video.recommend.no-results Resource returned when does not find any result as recommendation Nothing found tv.recommend plugin Use case-specific

4 - AI configuration by OB

AI configuration by OB

The following information applies to both Spain and Brazil; there will not be separate blocks for each OB.

Introduction

LLMs UCs are configured and located within the aura-config-provision repository. See the TV LLM Search Preset (notice that in the url, the field [ob] needs to be replaced by [es] or [br]) LLM use cases have been designed to provide a fallback mechanism for user requests that currently return a ‘None’ intent or zero results, offering a second chance for classification and response generation.

Intent

  • intent.tv.recommend: This intent will be returned when the user seeks TV content recommendations and explicitly refers to entities such as genres, subgenres, titles, sports-related content, directors, or actors. Example: “¿Qué documentales me recomiendas?”.

Entities

Three different entities can be returned if mentioned by the user:

  • entities.channel: This entity will be returned whenever there is a mention of a TV channel or a third-party TV platform in the user’s request.
  • entities.person: This entity will be returned whenever a proper name belonging to an actor, actress, director, driver, boxer, or other public figure is mentioned in the user’s request.
  • entities.query: This entity will be returned when any relevant information for performing a search on the platform is mentioned in the user’s request. (e.g., TV titles, genres, subgenres)

LLM output format

Examples:

Input Output
“Recomiéndame algún documental sobre historia” {"intent": "intent.tv.recommend", "entities.query": "documental||historia"}
“¿Qué películas de acción me recomiendas?” {"intent": "intent.tv.recommend", "entities.query": "películas||acción"}