> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clavata.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Label Copilot

> Generate and refine label syntax through a guided, AI-powered workflow.

The **Label Copilot** (internally codenamed LUNA — Label Understanding & Notation Assistant) is an AI-powered tool that turns a plain-language label description into working policy syntax. Instead of writing DSL by hand, the copilot guides you through a step-by-step loop of generation, evaluation, signal review, and refinement until your label is performing the way you intend.

<Note>
  The label copilot is currently in beta and is actively being improved. Text
  content is supported today; image support is coming soon.
</Note>

# How the Label Copilot Works

The copilot follows a four-step iterative loop:

1. **Define Your Label** — provide a label name and plain-language description; the copilot generates the syntax
2. **Evaluate Content** — test the generated label against a dataset of real examples
3. **Review Signals** — for any misclassified items, indicate which signals are firing correctly or incorrectly
4. **Clarify & Refine** — answer the copilot's clarifying questions to drive a refined, more accurate version of the syntax

You can repeat the loop as many times as needed. When you're satisfied with the results, insert the label directly from within the copilot.

# Step 1: Define Your Label

The first step is telling the copilot what you want the label to detect.

Two fields are required to generate:

* **Label name** — a short, descriptive name for the label (e.g., `hate_speech`, `spam_promotion`)
* **Content modality** — select **Text** (image support is coming soon)

You can also provide a **Description** — a natural-language explanation of what the label should and should not apply to. This field is optional, but the more specific you are, the better the initial result will be.

Once ready, click **Generate**. The syntax will stream into the editor: here's an example of what a completed generation looks like.

<img src="https://mintcdn.com/clavataai/NYscoMsgeNjRCORx/public/images/LUNA_define_label_filled_4_8_2026.png?fit=max&auto=format&n=NYscoMsgeNjRCORx&q=85&s=c9fe619f0a1fb6786e00f2ef7d4a44f9" alt="LUNA_define_label_filled" width="1269" height="766" data-path="public/images/LUNA_define_label_filled_4_8_2026.png" />

# Step 2: Evaluate Content

With syntax generated, the next step is testing it against real content.

<Note>
  You can add your label without testing by clicking **Insert label selection**
</Note>

## Selecting a Dataset

Choose an existing dataset or create a new one. Your dataset should include a mix of content that **should** trigger the label and content that **should not**. A minimum of **3 positive** (Label) and **3 negative** (Not label) examples is required before running evaluation.

<Note>
  If you are using the label copilot in an existing policy it will select your
  current dataset.
</Note>

## Labeling Rows

For each row in the dataset, mark it with one of the following:

| Action                       | Keyboard shortcut |
| ---------------------------- | ----------------- |
| Label (positive example)     | `→`               |
| Not label (negative example) | `←`               |
| Skip                         | `s`               |
| Navigate up/down             | `↑` / `↓`         |
| Focused view                 | `spacebar`        |

<img src="https://mintcdn.com/clavataai/NYscoMsgeNjRCORx/public/images/LUNA_content_labelled_4_8_2026.png?fit=max&auto=format&n=NYscoMsgeNjRCORx&q=85&s=7c7c7f8af326ca7b54acc8dbb7d1ebf8" alt="LUNA_content_labelled" width="1266" height="756" data-path="public/images/LUNA_content_labelled_4_8_2026.png" />

## Running Evaluation

Once you have enough labeled examples, click **Run evaluation**. Moonbounce tests the generated syntax against your dataset and shows you which rows were correctly and incorrectly classified.

* If **all reviewed items are correctly classified**, you can proceed directly to inserting the label
* If there are **misclassifications**, the copilot may automatically run an optimization pass (auto-patch) — if it finds deterministic improvements, it removes redundant rules and re-runs evaluation silently; a toast notification confirms any rules that were removed

<img src="https://mintcdn.com/clavataai/NYscoMsgeNjRCORx/public/images/LUNA_content_label_review_4_8_2026.png?fit=max&auto=format&n=NYscoMsgeNjRCORx&q=85&s=58e4bdcbd09ab6ab0ae4c092ef6f637f" alt="LUNA_content_label_review" width="1263" height="760" data-path="public/images/LUNA_content_label_review_4_8_2026.png" />

# Step 3: Review Signals

This step appears when misclassifications remain after evaluation.

Signals are the individual rules that contribute to a label match. For each misclassified item, the copilot shows you the signals that fired and asks you to mark each one:

| Value       | Meaning                                         |
| ----------- | ----------------------------------------------- |
| **True**    | This signal is correctly firing for this item   |
| **False**   | This signal should not have fired for this item |
| **Unknown** | You're not sure                                 |

This feedback tells the copilot precisely which parts of the syntax are working and which are not, giving it the information it needs to produce a better refinement.

<img src="https://mintcdn.com/clavataai/NYscoMsgeNjRCORx/public/images/LUNA_review_signals_4_8_2026.png?fit=max&auto=format&n=NYscoMsgeNjRCORx&q=85&s=ba90b8df04bda44a236999b5346f30ee" alt="LUNA_review_signals" width="1262" height="759" data-path="public/images/LUNA_review_signals_4_8_2026.png" />

# Step 4: Clarify & Refine

After signal review, the copilot generates clarifying questions based on the feedback it received. Each question is aimed at resolving ambiguity in the label definition — for example, distinguishing borderline cases or tightening the scope.

For each question, either select a suggested answer or type a custom one, then click **Submit**. The copilot refines the DSL and returns you to the **Define Label** step with updated syntax already in the editor.

From there, you can run another round of evaluation or insert the label if you're satisfied with the result.

<img src="https://mintcdn.com/clavataai/NYscoMsgeNjRCORx/public/images/LUNA_review_questions_4_8_2026.png?fit=max&auto=format&n=NYscoMsgeNjRCORx&q=85&s=5bc9fe7d5b87e4079e42cf99e489fb7f" alt="LUNA_review_questions" width="1262" height="756" data-path="public/images/LUNA_review_questions_4_8_2026.png" />

# Inserting or Refining Your Label

At the end of a loop, you have two options:

* **Insert label selection** — adds the label to your policy. Use this when the evaluation results meet your expectations.
* **Evaluate Content** — returns you to Step 2 to run another round of evaluation and refinement. Use this when you want to keep improving the label before committing it.

<img src="https://mintcdn.com/clavataai/NYscoMsgeNjRCORx/public/images/LUNA_content_label_review_secondpass_4_8_2026.png?fit=max&auto=format&n=NYscoMsgeNjRCORx&q=85&s=07d29bd9c4fe1568cd3c15f0d3bcd755" alt="LUNA_second_evaluation" width="1264" height="761" data-path="public/images/LUNA_content_label_review_secondpass_4_8_2026.png" />

# Tips for Best Results

* **Be specific in your description.** Vague descriptions produce vague syntax. Include examples of what the label should and should not apply to, edge cases, and context about your platform.
* **Use a representative dataset.** The evaluation step is only as useful as the examples in it. Include a realistic mix of positive and negative cases, including borderline examples.
* **Expect iteration.** One or two refinement rounds is normal. The label copilot is designed to improve with each pass of feedback.

## We'd Love to Hear From You

Whether you have a suggestion, feedback, or a bug to report, here are the best ways to get in touch:

* **In the App:** Use the **Feedback button** for direct suggestions.
* **On Slack:** Reach out to the team in your shared channel.
* **With your AM:** Talk to your dedicated account manager.
* **Via Email:** Send a message to [**support@moonbounce.io**](mailto:support@moonbounce.io).
* **Security, availability, or other incidents:** Use the in-app **Feedback button** or email [**support@moonbounce.io**](mailto:support@moonbounce.io). See [Customer Feedback](/feedback/customer_feedback) for what to include.
