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

# Annotations

> Define annotation schemas and apply structured feedback to traces and spans in AI Studio, through the API and SDK, or the CLI.

After observing an application in production, the next step is annotating and curating that data to build evaluation datasets. This process turns raw production logs into high-quality test cases that drive systematic improvement.

**Use Cases**

<AccordionGroup>
  <Accordion title="Collecting quality feedback" icon="thumbs-up">
    Capture thumbs up/down ratings, custom scores, or categorical labels on AI responses. Build a feedback loop that surfaces low-quality generations for review.
  </Accordion>

  <Accordion title="Compliance and QA review" icon="shield-check">
    Flag responses with specific defects (hallucination, off-topic, inappropriate content) using structured annotation keys shared across the team.
  </Accordion>

  <Accordion title="Dataset curation" icon="database">
    Annotate Traces with corrections and quality labels, then export curated subsets as training datasets for future experiments.
  </Accordion>

  <Accordion title="Human-in-the-loop workflows" icon="user-check">
    Route Traces to Annotation Queues for systematic expert review. Combine with Trace Automations to automatically surface Traces that meet specific criteria.
  </Accordion>
</AccordionGroup>

**Concepts**

Three concepts work together to form the annotations system:

* **Annotations**: the feedback categories configured for a project, such as a quality rating or a defect tag
* **Annotation Queues**: organized workflows for reviewing Traces in bulk via **AI Studio**
* **Annotations API**: the API and SDK for applying feedback values to a Trace or span programmatically

<CardGroup cols={3}>
  <Card title="Annotations" icon="clipboard-list" href="#create-annotations">
    Define annotation schemas: keys, value types, and validation rules. Available on chat completion and responses spans once created.
  </Card>

  <Card title="Annotation Queues" icon="list-check" href="/docs/ai-studio/observability/annotation-queues#use-annotation-queues">
    Organize annotation review workflows. Filter and present relevant Traces for review in bulk.
  </Card>

  <Card title="Annotations API" icon="code" href="#use-annotations">
    Apply structured human feedback to Traces and spans programmatically via the API and SDK.
  </Card>
</CardGroup>

## Create Annotations

Each annotation must be defined in the project before it can be used. The definition sets the key, title, and value type; applying an annotation to a Trace requires matching one of these definitions.

<Tabs>
  <Tab title="AI Studio" icon="https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?fit=max&auto=format&n=My16MDKJXrKALEHC&q=85&s=ac04dd509320d58ab9701cb6d6137733" width="100" height="100" data-path="images/logos/ai-studio-round.svg">
    To create an annotation, head to **Optimization > Annotations** and press the <kbd><Icon icon="plus" /></kbd> button. Annotations can also be created directly from an [Annotation Queue](/docs/ai-studio/observability/annotation-queues#use-annotation-queues).

    <Frame caption="Customizing an Annotation.">
      <img src="https://mintcdn.com/orqai/6HurnhGELvozB4iC/images/docs/human-review-settings.png?fit=max&auto=format&n=6HurnhGELvozB4iC&q=85&s=0de8b6fbf5c6356d4d6c63891cbbf980" alt="Create annotation form with Key, Title, Description fields and a Type selector showing Categorical, Range, and Text options." width="1018" height="994" data-path="images/docs/human-review-settings.png" />
    </Frame>

    Each annotation uses one of three value types:

    * **Categorical**: button options with custom labels, such as good/bad or saved/deleted
    * **Range**: a custom scoring slider, for example a scale from 0 to 100
    * **Open field**: free-form text input for detailed comments

    <Info>
      Once created, an annotation is available on all chat completion spans and responses spans in the project. No additional configuration or filtering required.
    </Info>

    <Note>
      Deleting an annotation removes it from any Annotation Queues and Experiments that use it, so it no longer appears as a review option there. Annotations already recorded on a Trace are preserved: every annotated data point remains stored and queryable.
    </Note>
  </Tab>
</Tabs>

### Common Annotations   <Badge color="yellow">Legacy</Badge>

<AccordionGroup>
  <Accordion title="Rating" icon="star">
    Rate the overall quality of AI responses:

    | Rating   | Description                               |
    | -------- | ----------------------------------------- |
    | **good** | The response was helpful and accurate.    |
    | **bad**  | The response was unhelpful or inaccurate. |
  </Accordion>

  <Accordion title="Defects" icon="triangle-exclamation">
    Identify specific issues with AI responses:

    | Defect             | Description                                                   |
    | ------------------ | ------------------------------------------------------------- |
    | **grammatical**    | Responses that contain grammatical errors                     |
    | **spelling**       | Responses that contain spelling errors                        |
    | **hallucination**  | Responses that contain hallucinations or factual inaccuracies |
    | **repetition**     | Responses that contain unnecessary repetition                 |
    | **inappropriate**  | Responses that are deemed inappropriate or offensive          |
    | **off\_topic**     | Responses that do not address the user's query                |
    | **incompleteness** | Responses that are incomplete or partially address the query  |
    | **ambiguity**      | Responses that are vague or unclear                           |

    <Info>
      Multiple defects can be selected for one response using an annotation configured with an array value.
    </Info>
  </Accordion>
</AccordionGroup>

## Use Annotations

Annotations can be applied wherever a Trace or span is reviewed:

* **Directly on a Trace or Log**: open a single Trace or Log in the [Traces](/docs/ai-studio/observability/traces) or [Logs](/docs/ai-studio/observability/logs) view and use the **Annotations** panel.
* **In an [Annotation Queue](/docs/ai-studio/observability/annotation-queues#use-annotation-queues)**: review a curated set of Traces in bulk. Fill a queue with [Trace Automations](/docs/ai-studio/observability/automations) or by manually adding individual Traces or Logs.
* **Programmatically**: apply feedback through the API and SDK using the **API & SDK** tab below.
* **In an [Experiment](#annotations-in-experiments)**: apply annotations while reviewing experiment outputs.

<Note>
  Every annotation applied in an Annotation Queue is written back to its originating Trace. Because the values live on the Trace, they can be queried with the [**Orq MCP**](/docs/ai-studio/get-started/orq-mcp) and used to run analysis across reviewed data.
</Note>

<Tabs>
  <Tab title="AI Studio" icon="https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?fit=max&auto=format&n=My16MDKJXrKALEHC&q=85&s=ac04dd509320d58ab9701cb6d6137733" width="100" height="100" data-path="images/logos/ai-studio-round.svg">
    The annotation capabilities differ between [Logs](/docs/ai-studio/observability/logs) and [Traces](/docs/ai-studio/observability/traces). Logs support human feedback and text corrections to the AI response. Traces support human feedback and [correcting an evaluator result](/docs/ai-studio/observability/traces#correct-an-evaluator-result).

    <Tabs>
      <Tab title="Traces">
        Navigate to the [Traces](/docs/ai-studio/observability/traces) view and select a single trace. The **Annotations** panel will be displayed, allowing you to apply human feedback to the AI response.

        <Frame caption="The Annotations panel in Traces lets you apply human feedback.">
          <img src="https://mintcdn.com/orqai/cbhNm3-6xhlam62F/images/trace-annotation.png?fit=max&auto=format&n=cbhNm3-6xhlam62F&q=85&s=64bb4202d2f67874dafdcb4f397e1d28" alt="Trace detail panel for a claude-sonnet chat-completion showing Evaluations section with Defects, Interactions, and Rating feedback options including good/bad thumbs." width="1732" height="873" data-path="images/trace-annotation.png" />
        </Frame>
      </Tab>

      <Tab title="Logs">
        Navigate to the [Logs](/docs/ai-studio/observability/logs) view and select a single log. The **Annotations** panel will be displayed, allowing you to apply human feedback and provide corrections to the AI response.

        <Frame caption="The Annotations panel in Logs lets you apply human feedback and corrections.">
          <img src="https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-annotations-panel.png?fit=max&auto=format&n=83k4_RKHhrJhLScC&q=85&s=713f04644ec605c275d6142324acafda" alt="Log panel showing a botanist assistant conversation with Rating (good/bad), Defects, and Interactions annotation options on the right, and an Add correction button below the assistant response." width="1762" height="1162" data-path="images/logs-annotations-panel.png" />
        </Frame>

        To make a correction, use the **Add correction** button below the AI-generated response:

        <Frame caption="The Add correction button is below the Assistant response.">
          <img src="https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-add-correction-button.png?fit=max&auto=format&n=83k4_RKHhrJhLScC&q=85&s=308c61614973cde35b1e94a9cee6a108" alt="Assistant response box with an Add correction button highlighted in red below it." width="1824" height="606" data-path="images/logs-add-correction-button.png" />
        </Frame>

        Click to add a correction, which opens an editor for manually revising the model's response. Select **Save** to store the correction.

        <Frame caption="The corrected text and correction will appear side by side, with the correction displayed in green.">
          <img src="https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-correction-editor.png?fit=max&auto=format&n=83k4_RKHhrJhLScC&q=85&s=46554b2e2dee2276cc1cbf0fcaabcbbb" alt="Original assistant response shown in purple above a Correction box in green, with the corrected text entered and a Save button." width="2216" height="883" data-path="images/logs-correction-editor.png" />
        </Frame>

        <Info>
          Corrections are valuable for building curated datasets. Learn more in [Creating a Curated Dataset](/docs/datasets/creating).
        </Info>
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="API & SDK" icon="code">
    Here are examples on how to use the API to annotate LLM responses.

    <AccordionGroup>
      <Accordion title="Add a Quality Rating" icon="star">
        <CodeGroup>
          ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
          curl -X POST "https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation" \
            -H "Authorization: Bearer $ORQ_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "annotations": [
                {
                  "key": "rating",
                  "value": "good"
                }
              ]
            }'
          ```

          ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
          from orq_ai_sdk import Orq
          import os

          orq = Orq(api_key=os.getenv("ORQ_API_KEY"))

          result = orq.annotations.create(
              trace_id="<trace_id>",
              span_id="<span_id>",
              annotations=[
                  {
                      "key": "rating",
                      "value": "good"
                  }
              ]
          )

          print(result)
          ```

          ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
          import { Orq } from "@orq-ai/node";

          const orq = new Orq({
            apiKey: process.env.ORQ_API_KEY,
          });

          const result = await orq.annotations.create({
            traceId: "<trace_id>",
            spanId: "<span_id>",
            annotations: [
              {
                key: "rating",
                value: "good"
              }
            ]
          });

          console.log(result);
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Add Multiple Defects" icon="triangle-exclamation">
        <CodeGroup>
          ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
          curl -X POST "https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation" \
            -H "Authorization: Bearer $ORQ_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "annotations": [
                {
                  "key": "defects",
                  "value": ["grammatical", "spelling", "ambiguity"]
                }
              ]
            }'
          ```

          ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
          from orq_ai_sdk import Orq
          import os

          orq = Orq(api_key=os.getenv("ORQ_API_KEY"))

          result = orq.annotations.create(
              trace_id="<trace_id>",
              span_id="<span_id>",
              annotations=[
                  {
                      "key": "defects",
                      "value": ["grammatical", "spelling", "ambiguity"]
                  }
              ]
          )

          print(result)
          ```

          ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
          import { Orq } from "@orq-ai/node";

          const orq = new Orq({
            apiKey: process.env.ORQ_API_KEY,
          });

          const result = await orq.annotations.create({
            traceId: "<trace_id>",
            spanId: "<span_id>",
            annotations: [
              {
                key: "defects",
                value: ["grammatical", "spelling", "ambiguity"]
              }
            ]
          });

          console.log(result);
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Add a Numeric Score" icon="gauge">
        <CodeGroup>
          ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
          curl -X POST "https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation" \
            -H "Authorization: Bearer $ORQ_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "annotations": [
                {
                  "key": "confidence_score",
                  "value": 0.95
                }
              ],
              "metadata": {
                "identityId": "user-123"
              }
            }'
          ```

          ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
          from orq_ai_sdk import Orq
          import os

          orq = Orq(api_key=os.getenv("ORQ_API_KEY"))

          result = orq.annotations.create(
              trace_id="<trace_id>",
              span_id="<span_id>",
              annotations=[
                  {
                      "key": "confidence_score",
                      "value": 0.95
                  }
              ],
              metadata={
                  "identityId": "user-123"
              }
          )

          print(result)
          ```

          ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
          import { Orq } from "@orq-ai/node";

          const orq = new Orq({
            apiKey: process.env.ORQ_API_KEY,
          });

          const result = await orq.annotations.create({
            traceId: "<trace_id>",
            spanId: "<span_id>",
            annotations: [
              {
                key: "confidence_score",
                value: 0.95
              }
            ],
            metadata: {
              identityId: "user-123"
            }
          });

          console.log(result);
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Add a Text Correction" icon="pen">
        <CodeGroup>
          ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
          curl -X POST "https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation" \
            -H "Authorization: Bearer $ORQ_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "annotations": [
                {
                  "key": "correction",
                  "value": "The correct answer should emphasize scalability and fault tolerance."
                }
              ]
            }'
          ```

          ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
          from orq_ai_sdk import Orq
          import os

          orq = Orq(api_key=os.getenv("ORQ_API_KEY"))

          result = orq.annotations.create(
              trace_id="<trace_id>",
              span_id="<span_id>",
              annotations=[
                  {
                      "key": "correction",
                      "value": "The correct answer should emphasize scalability and fault tolerance."
                  }
              ]
          )

          print(result)
          ```

          ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
          import { Orq } from "@orq-ai/node";

          const orq = new Orq({
            apiKey: process.env.ORQ_API_KEY,
          });

          const result = await orq.annotations.create({
            traceId: "<trace_id>",
            spanId: "<span_id>",
            annotations: [
              {
                key: "correction",
                value: "The correct answer should emphasize scalability and fault tolerance."
              }
            ]
          });

          console.log(result);
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Correct an Evaluator Result" icon="pencil">
        <CodeGroup>
          ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
          curl -X POST "https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation" \
            -H "Authorization: Bearer $ORQ_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "annotations": [
                {
                  "parent_annotation_id": "<evaluator_annotation_id>",
                  "value": false,
                  "explanation": "The response omitted a required disclaimer."
                }
              ]
            }'
          ```

          ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
          from orq_ai_sdk import Orq
          import os

          orq = Orq(api_key=os.getenv("ORQ_API_KEY"))

          result = orq.annotations.create(
              trace_id="<trace_id>",
              span_id="<span_id>",
              annotations=[
                  {
                      "parent_annotation_id": "<evaluator_annotation_id>",
                      "value": False,
                      "explanation": "The response omitted a required disclaimer."
                  }
              ]
          )

          print(result)
          ```

          ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
          import { Orq } from "@orq-ai/node";

          const orq = new Orq({
            apiKey: process.env.ORQ_API_KEY,
          });

          const result = await orq.annotations.create({
            traceId: "<trace_id>",
            spanId: "<span_id>",
            annotations: [
              {
                parentAnnotationId: "<evaluator_annotation_id>",
                value: false,
                explanation: "The response omitted a required disclaimer."
              }
            ]
          });

          console.log(result);
          ```
        </CodeGroup>

        <Info>
          A correction uses `parent_annotation_id` in place of `key`: it's the id of the Evaluator annotation being corrected. The corrected `value` must match that Evaluator's own output type. See [Correct an Evaluator Result](/docs/ai-studio/observability/traces#correct-an-evaluator-result) on the Traces page for the UI equivalent.
        </Info>
      </Accordion>

      <Accordion title="Batch Add Multiple Annotations" icon="layer-group">
        <CodeGroup>
          ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
          curl -X POST "https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation" \
            -H "Authorization: Bearer $ORQ_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "annotations": [
                {
                  "key": "rating",
                  "value": "good"
                },
                {
                  "key": "confidence_score",
                  "value": 0.92
                },
                {
                  "key": "categories",
                  "value": ["helpful", "accurate", "concise"]
                }
              ]
            }'
          ```

          ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
          from orq_ai_sdk import Orq
          import os

          orq = Orq(api_key=os.getenv("ORQ_API_KEY"))

          result = orq.annotations.create(
              trace_id="<trace_id>",
              span_id="<span_id>",
              annotations=[
                  {"key": "rating", "value": "good"},
                  {"key": "confidence_score", "value": 0.92},
                  {"key": "categories", "value": ["helpful", "accurate", "concise"]}
              ]
          )

          print(result)
          ```

          ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
          import { Orq } from "@orq-ai/node";

          const orq = new Orq({
            apiKey: process.env.ORQ_API_KEY,
          });

          const result = await orq.annotations.create({
            traceId: "<trace_id>",
            spanId: "<span_id>",
            annotations: [
              { key: "rating", value: "good" },
              { key: "confidence_score", value: 0.92 },
              { key: "categories", value: ["helpful", "accurate", "concise"] }
            ]
          });

          console.log(result);
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Remove Annotations" icon="trash">
        <CodeGroup>
          ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
          curl -X DELETE "https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation" \
            -H "Authorization: Bearer $ORQ_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "keys": ["rating", "defects"]
            }'
          ```

          ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
          from orq_ai_sdk import Orq
          import os

          orq = Orq(api_key=os.getenv("ORQ_API_KEY"))

          result = orq.annotations.delete(
              trace_id="<trace_id>",
              span_id="<span_id>",
              keys=["rating", "defects"]
          )

          print(result)
          ```

          ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
          import { Orq } from "@orq-ai/node";

          const orq = new Orq({
            apiKey: process.env.ORQ_API_KEY,
          });

          const result = await orq.annotations.delete({
            traceId: "<trace_id>",
            spanId: "<span_id>",
            keys: ["rating", "defects"]
          });

          console.log(result);
          ```
        </CodeGroup>
      </Accordion>
    </AccordionGroup>

    **API Error Handling**

    | Status Code | Error                | Example Message                                                        | Solution                                                                     |
    | ----------- | -------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
    | **404**     | Annotation Not Found | `The annotation with key "rating" for workspace abc123 was not found.` | Create an Annotation with the specified key before annotating.               |
    | **404**     | Span Not Found       | `Span with id xyz789 for workspace abc123 was not found.`              | Verify the `trace_id` and `span_id` are correct and belong to the workspace. |
    | **400**     | Invalid Value        | `Invalid value: poor. Valid options are: good, bad.`                   | Ensure the value matches the options defined in the Annotation.              |
    | **400**     | Value Out of Range   | `Value 15 is out of range [0, 10].`                                    | Provide a number within the defined min/max range for the Annotation.        |
    | **400**     | String Too Long      | `String value exceeds maximum length of 200 characters.`               | Shorten the string annotation to 200 characters or less.                     |

    <Callout icon="hat-chef" color="#7ecece">
      See a complete feedback loop implemented from scratch. Read our cookbook [Capturing User Feedback](/docs/ai-studio/cookbooks/integrations-tooling/capturing-feedback-with-orq).
    </Callout>

    **Constraints**

    * **Batch Limits**: up to 10 annotations per create request, up to 10 keys per delete request
    * **String Length**: string values are limited to 200 characters maximum
    * **Deployment Span Propagation**: when annotating a deployment span, the associated log is automatically annotated with the same values
    * **Metadata Fields**: optional `metadata` object supports `identityId`, `source`, and `reviewerId` for tracking and attribution
  </Tab>

  <Tab title="CLI" icon="terminal">
    Annotate and remove annotations from a span using [`orq traces create`](/reference/cli) and [`orq traces delete`](/reference/cli). The `orq traces` group manages annotations on existing traces and spans; there is no separate `orq annotations` group.

    <AccordionGroup>
      <Accordion title="Add a Quality Rating" icon="star">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        orq traces create <trace_id> <span_id> \
          --annotations '[{"key": "rating", "value": "good"}]'
        ```
      </Accordion>

      <Accordion title="Add Multiple Defects" icon="triangle-exclamation">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        orq traces create <trace_id> <span_id> \
          --annotations '[{"key": "defects", "value": ["grammatical", "spelling", "ambiguity"]}]'
        ```
      </Accordion>

      <Accordion title="Add a Numeric Score" icon="gauge">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        orq traces create <trace_id> <span_id> \
          --annotations '[{"key": "confidence_score", "value": 0.95}]' \
          --metadata '{"identityId": "user-123"}'
        ```
      </Accordion>

      <Accordion title="Add a Text Correction" icon="pen">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        orq traces create <trace_id> <span_id> \
          --annotations '[{"key": "correction", "value": "The correct answer should emphasize scalability and fault tolerance."}]'
        ```
      </Accordion>

      <Accordion title="Batch Add Multiple Annotations" icon="layer-group">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        orq traces create <trace_id> <span_id> \
          --annotations '[{"key": "rating", "value": "good"}, {"key": "confidence_score", "value": 0.92}, {"key": "categories", "value": ["helpful", "accurate", "concise"]}]'
        ```
      </Accordion>

      <Accordion title="Remove Annotations" icon="trash">
        `--keys` takes a comma-separated list, not a JSON array like the API.

        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        orq traces delete <trace_id> <span_id> \
          --keys rating,defects
        ```
      </Accordion>
    </AccordionGroup>

    <Note>Batch limits: up to 10 annotations per `create` call, up to 10 keys per `delete` call. String values are capped at 200 characters.</Note>
    <Tip>See [install and setup](/reference/cli) to get started with the CLI. Run `orq traces create --help` or `orq traces delete --help` for the full flag reference.</Tip>
  </Tab>
</Tabs>

## Annotations in Experiments

Annotations can also be applied outside of Annotation Queues, while reviewing the outputs of an [Experiment](/docs/ai-studio/optimize/experiments). In the experiment review screen, the annotations defined for the project appear alongside Evaluator scores, so outputs can be annotated manually as part of an evaluation run.

<Frame caption="The Annotations panel in the experiment review screen, with annotations shown above the Evaluator scores.">
  <img src="https://mintcdn.com/orqai/lqVyDy-llJ4XuTsl/images/annotations-in-experiments.png?fit=max&auto=format&n=lqVyDy-llJ4XuTsl&q=85&s=9560014b17d377136e272fe131c6a1c6" alt="Experiment review screen showing Response 1 of 20 for product-orchestrator-A, a left panel with Inputs, Expected, and Metrics, a center panel with the System instructions, User input, and Assistant output including function calls, and a right panel with an Annotations comment field and good/bad rating above an Evaluators section listing a json_check evaluator marked No." width="3494" height="1740" data-path="images/annotations-in-experiments.png" />
</Frame>

<Note>
  [Correcting an Evaluator result](/docs/ai-studio/observability/traces#correct-an-evaluator-result) is not available in the experiment review screen. Annotations and Evaluator scores still display as described above.
</Note>
