# Show highest scoring category on video

If you have a model that returns scores, you can display the highest scoring category as a text overlay on the video feed using the Nx Meta Rules Engine.

#### Select a suitable model

You need a model that outputs a score. You can quickly identify these by looking for the **Scores** tag in the model overview.

<figure><img src="/files/Sm27y9UA1hafK829YdtT" alt="Nx AI Cloud model listing showing a model with the Scores tag highlighted"><figcaption><p>Look for the Scores tag to identify models that output category scores</p></figcaption></figure>

Or check the model detail page: if the model outputs named scores, they appear in the output description.

<figure><img src="/files/UcJQG3AwVuSflSirvQxE" alt="Model detail page showing the output description listing named score values"><figcaption><p>Model detail — outputs listing confirms the model returns named scores</p></figcaption></figure>

#### Create an Event Rule in Nx Meta

In the Nx Meta Desktop client, open **Camera Rules** for the camera running the AI plugin.

<figure><img src="/files/JT3Ek1L6yNzwpPJyAo8v" alt="Nx Meta Desktop Client showing the Camera Rules option in the camera context menu"><figcaption><p>Open Camera Rules from the camera context menu</p></figcaption></figure>

Click **Add a New Rule**. See the [inference framerate how-to](/nx-ai-manager-v6.1.2/nx-ai-manager-plugin/howtos/show-ai-inference-framerate-on-video.md) for a step-by-step walkthrough of the rule editor interface.

#### Set the "When" Condition

**Source**: Select the camera device (usually pre-selected).

**Event**: Select **Analytics Event** with type **Category detected**.

#### Set the "Do" Action

**At**: Select the same camera as the source.

**Action**: Select **Show text overlay**.

**Text**: The default `$eventText` value contains the highest scoring category name. No custom text is needed.

<figure><img src="/files/2LlpBmTSazCHUZ8RgZgC" alt="Completed event rule showing Analytics Event - Category detected as the trigger and Show text overlay as the action"><figcaption><p>Completed rule — triggers on Category detected and shows the result as an overlay</p></figcaption></figure>

When the event fires, the highest scoring category is displayed on the video feed.

<figure><img src="/files/hCX9l3BMDlutztnNAQal" alt="Camera video feed showing the highest scoring category name as a text overlay"><figcaption><p>Highest scoring category displayed as a text overlay on the video feed</p></figcaption></figure>

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nx.docs.scailable.net/nx-ai-manager-v6.1.2/nx-ai-manager-plugin/howtos/show-highest-scoring-category-on-video.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
