Define annotation schemas and apply structured human feedback to LLM traces and spans in AI Studio, through the API and SDK, or from 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.
The Feedback API is deprecated. Existing Feedback API integrations continue to work. Use Annotations to capture user ratings, comments, and corrections on completed requests.
Use Cases
Collecting quality feedback
Capture thumbs up/down ratings, custom scores, or categorical labels on AI responses. Build a feedback loop that surfaces low-quality generations for review.
Compliance and QA review
Flag responses with specific defects (hallucination, off-topic, inappropriate content) using structured annotation keys shared across the team.
Dataset curation
Annotate Traces with corrections and quality labels, then export curated subsets as training datasets for future experiments.
Human-in-the-loop workflows
Route Traces to Annotation Queues for systematic expert review. Combine with Trace Automations to automatically surface Traces that meet specific criteria.
ConceptsThree 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
Annotations
Define annotation schemas: keys, value types, and validation rules. Available on chat completion and responses spans once created.
Annotation Queues
Organize annotation review workflows. Filter and present relevant Traces for review in bulk.
Annotations API
Apply structured human feedback to Traces and spans programmatically via the API and SDK.
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. The workspace-provided keys rating and correction are shared across projects, and each project defines them before their values appear on its pages.
AI Studio
To create an annotation, head to Optimization > Annotations in AI Studio, or Settings > Annotations in AI Gateway, and press the button. Annotations can also be created directly from an Annotation Queue.
Customizing an Annotation.
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
Once created, an annotation is available on all chat completion spans and responses spans in the project. No additional configuration or filtering required.
Select the project before creating a definition. An annotation created inside a project belongs to that project, which keeps each project’s annotation set focused on its own review needs. Definitions created at workspace level remain available across every project.
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.
The rating and correction keys are shared across the workspace. A value written under either appears on a project’s pages only after that project defines the same annotation.
Rating
Rate the overall quality of AI responses:
Rating
Description
good
The response was helpful and accurate.
bad
The response was unhelpful or inaccurate.
Defects
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
Multiple defects can be selected for one response using an annotation configured with an array value.
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 or Logs view and use the Annotations panel.
In an Annotation Queue: review a curated set of Traces in bulk. Fill a queue with Trace 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: apply annotations while reviewing experiment outputs.
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 and used to run analysis across reviewed data.
AI Studio
API & SDK
CLI
The annotation capabilities differ between Logs and Traces. Logs support human feedback and text corrections to the AI response. Traces support human feedback and correcting an evaluator result.
Traces
Logs
Navigate to the Traces view and select a single trace. The Annotations panel will be displayed, allowing you to apply human feedback to the AI response.
The Annotations panel in Traces lets you apply human feedback.
Navigate to the 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.
The Annotations panel in Logs lets you apply human feedback and corrections.
To make a correction, use the Add correction button below the AI-generated response:
The Add correction button is below the Assistant response.
Click to add a correction, which opens an editor for manually revising the model’s response. Select Save to store the correction.
The corrected text and correction will appear side by side, with the correction displayed in green.
Quick examples for annotating LLM responses. For the full usage guide (request fields, annotation values, corrections, batch and remove semantics, and error handling), see Annotations API.
curl -X POST "https://my.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." } ] }'
from orq_ai_sdk import Orqimport osorq = 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)
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>", requestBody: { annotations: [ { key: "correction", value: "The correct answer should emphasize scalability and fault tolerance." } ] }});console.log(result);
For error handling, batch limits, and constraints, see Annotations API.
Annotate and remove annotations from a span using orq traces create and orq traces delete. The orq traces group manages annotations on existing traces and spans; there is no separate orq annotations group.
Deprecated: Human Review Sets are replaced by project-level Annotations and will be removed in release 4.18.
A Human Review Set presents a group of Annotations together in the Annotations panel of a Log. A set carries a display name, the Annotations it collects, and two settings:
Project: one project, or every project in the workspace when no project is set.
Match rule: by run type, matching a deployment, a playground, or an experiment output, or by name, matching a deployment key, a playground name, or an experiment name.
When at least one set matches a Log, the Annotations panel shows the Annotations those sets collect, grouped under each set’s display name when several sets match. A Log that matches no set shows the project’s Annotations on their own.Review sets are managed through the API.
Annotations can also be applied outside of Annotation Queues, while reviewing the outputs of an Experiment. 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.
The Annotations panel in the experiment review screen, with annotations shown above the Evaluator scores.
Correcting an Evaluator result is not available in the experiment review screen. Annotations and Evaluator scores still display as described above.
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Orq.ai Documentation","colors":{"primary":"#027f6b","light":"#00d2b5","dark":"#027f6b"},"logo":{"light":"https://mintcdn.com/orqai/OG_14djpK9Yasgfk/images/Orq_ai_Symbol_Dark.svg?fit=max\u0026auto=format\u0026n=OG_14djpK9Yasgfk\u0026q=85\u0026s=d01651850182afdbc6309808b688d470","dark":"https://mintcdn.com/orqai/BYq_L5I_ZDBWL_Pf/images/Orq_ai_Symbol_Light.svg?fit=max\u0026auto=format\u0026n=BYq_L5I_ZDBWL_Pf\u0026q=85\u0026s=3e372f93174202f20c31d2c045af92b9","href":"/ai-gateway/get-started/introduction"},"favicon":"https://mintcdn.com/orqai/rmwcfFw4PPljHRCz/favicon.svg?fit=max\u0026auto=format\u0026n=rmwcfFw4PPljHRCz\u0026q=85\u0026s=1827beca4e1fb46e074d8bda067f3fb1","api":{"openapi":"openapi.json","examples":{"languages":["curl","typescript","python"]}},"background":{"color":{"light":"#f7f6f5","dark":"#171717"}},"navbar":{"links":[],"primary":{"type":"button","label":"Get Started","href":"https://my.orq.ai/auth/signup"}},"footer":{"socials":{"github":"https://github.com/orq-ai","x":"https://x.com/orq_ai","linkedin":"https://www.linkedin.com/company/orqai","website":"https://orq.ai"}},"seo":{"metatags":{"author":"Orq.ai","og:type":"website","og:site_name":"Orq.ai Documentation","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@orq_ai","twitter:creator":"@orq_ai","viewport":"width=device-width, initial-scale=1.0","robots":"index, follow","language":"English"},"organization":{"id":"https://docs.orq.ai/#organization","name":"Orq.ai","legalName":"Orq.AI Holding B.V.","url":"https://orq.ai","logo":"https://docs.orq.ai/images/Orq_ai_Symbol_Dark.svg","sameAs":["https://github.com/orq-ai","https://x.com/orq_ai","https://www.linkedin.com/company/orqai/"]},"indexing":"all"},"fonts":{"heading":{"family":"ES Klarheit Kurrent Semibold","weight":600,"source":"https://framerusercontent.com/assets/HiovZWjG27S5NQhE8dyeECDMc.woff2","format":"woff2"},"body":{"family":"Inter","source":"https://cdn.jsdelivr.net/npm/@fontsource/inter@5.0.8/files/inter-latin-400-normal.woff2","format":"woff2"}},"styling":{"codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":true},"integrations":{"posthog":{"apiKey":"phc_MKGkZTCrnrBUKVqT0XxWbfDqCwik8EF2GIob0NhCU3C","apiHost":"https://eu.i.posthog.com"}},"contextual":{"options":["copy","download-spec","chatgpt","claude","view"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"orqai","hasAudioNarration":false,"actualSubdomain":"orqai","customDomains":["docs.orq.ai"],"gitSource":{"type":"github","owner":"orq-ai","repo":"orquesta-web","deployBranch":"main","contentDirectory":"documentation/mintlify","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adfba949be6b0e9bcd593a3","collectionId":"031753a3-f345-4ab2-939e-88e0aa4709da","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adfba949be6b0e9bcd593a3"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adfba949be6b0e9bcd593a3","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"API Reference","count":410},{"language":"default","tag":"Platform APIs","count":263},{"language":"default","tag":"Integrations","count":93},{"language":"default","tag":"Orq SDK","count":71},{"language":"default","tag":"AI Gateway","count":69},{"language":"default","tag":"Management APIs","count":68},{"language":"default","tag":"SDK Reference","count":68},{"language":"default","tag":"Cookbooks","count":34},{"language":"default","tag":"Model Providers","count":31},{"language":"default","tag":"Frameworks \u0026 SDKs","count":30}],"searchSettings":{"maxResults":15}},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"email":"support@orq.ai","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":".nav-anchor img{border-radius:50%}.ig-root{scroll-margin-top:6rem}.ig-search{width:100%;padding:10px 14px 10px 38px;border-radius:8px;border:1px solid rgba(0,0,0,.15);font-size:14px;outline:0;margin-bottom:20px;background:0 0;box-sizing:border-box;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23999' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m21 21-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0Z'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:12px center}.dark .ig-search{border-color:rgba(255,255,255,.15)}.ig-search:focus{border-color:#027f6b}.ig-tabs{display:flex;border-bottom:1px solid rgba(0,0,0,.1);margin-bottom:20px;gap:0}.dark .ig-tabs{border-bottom-color:rgba(255,255,255,.1)}.ig-tab{padding:8px 16px;background:0 0;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;font-size:14px;font-weight:500;color:#888;white-space:nowrap}.ig-tab:hover{color:#027f6b}.dark .ig-tab:hover{color:#677f78}.ig-tab-active{border-bottom-color:#027f6b!important;color:#027f6b!important}.dark .ig-tab-active{border-bottom-color:#677f78!important;color:#677f78!important}.ig-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}@media (max-width:768px){.ig-grid{grid-template-columns:repeat(3,1fr)}}@media (max-width:480px){.ig-grid{grid-template-columns:repeat(2,1fr)}}.ig-card{display:flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid rgba(0,0,0,.1);border-radius:6px;text-decoration:none!important;color:inherit!important;font-size:14px;font-weight:500;transition:background .12s,border-color .12s}.ig-card:hover{background:rgba(2,127,107,.05);border-color:rgba(2,127,107,.25)}.dark .ig-card{border-color:rgba(255,255,255,.1)}.dark .ig-card:hover{background:rgba(103,127,120,.1);border-color:rgba(103,127,120,.3)}.ig-card-icon{width:20px;height:20px;object-fit:contain;flex-shrink:0}.ig-tab-count{display:inline-flex;align-items:center;justify-content:center;margin-left:6px;padding:0 5px;min-width:18px;height:18px;border-radius:9px;font-size:11px;font-weight:600;background:rgba(0,0,0,.08);color:inherit}.dark .ig-tab-count{background:rgba(255,255,255,.12)}.ig-tab-active .ig-tab-count{background:rgba(2,127,107,.15)}.dark .ig-tab-active .ig-tab-count{background:rgba(103,127,120,.25)}.ig-empty{text-align:center;padding:48px 24px;color:#999;font-size:14px;grid-column:1/-1}kbd.key,kbd.key *{color:#fff!important}kbd.key{background:#242424;border-radius:5px;padding:2px 8px;font-size:.85em;display:inline-flex;align-items:center;gap:6px;border:1px solid #3a3a3a;font-family:inherit;white-space:nowrap}#sidebar-content .flex-1:has(>svg.flex-shrink-0){flex:none!important}#sidebar-content{width:16rem!important;min-width:16rem!important}@media (min-width:1024px){.lg\\:pl-56{padding-left:16rem!important}}.topbar-right-container nav[aria-label=Main] .navbar-link a,.topbar-right-container nav[aria-label=Main] .navbar-link a:hover{background-color:transparent!important}@media (min-width:1024px){.topbar-right-container nav[aria-label=Main] ul{gap:1rem!important}.topbar-right-container nav[aria-label=Main] .navbar-link a{padding-left:0!important;padding-right:0!important}#page-title{font-size:2rem!important;line-height:1.2!important}}.nav-tabs-item:has(a[href^='/reference']){display:none!important}#navbar .nav-tabs-item[href='/ai-studio/integrations/overview']{position:relative}#navbar .nav-tabs-item[href='/ai-studio/integrations/overview']::before{content:'';position:absolute;top:50%;left:-12px;transform:translateY(-50%);height:55%;width:1px;background:rgba(0,0,0,.15)}.dark #navbar .nav-tabs-item[href='/ai-studio/integrations/overview']::before{background:rgba(255,255,255,.15)}@media (min-width:1280px){#content-container{padding-left:3rem!important;padding-right:2rem!important}#content-side-layout{max-width:20rem!important}#content-area{width:calc(100% - 20rem)!important}}"}],"page":{"pagePath":"ai-studio/observability/annotations","slug":"/ai-studio/observability/annotations","pageMetadata":{"title":"Annotations","sidebarTitle":"Annotations","description":"Define annotation schemas and apply structured human feedback to LLM traces and spans in AI Studio, through the API and SDK, or from the CLI.","keywords":["feedback"],"href":"/ai-studio/observability/annotations"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Define annotation schemas and apply structured human feedback to LLM traces and spans in AI Studio, through the API and SDK, or from the CLI.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Badge,Card,CardGroup,CodeBlock,CodeGroup,Frame,Heading,Icon,Info,Note,OptimizedImage,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Badge)_missingMdxReference(`Badge`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Icon)_missingMdxReference(`Icon`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`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.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The Feedback API is deprecated.`}),` Existing Feedback API integrations continue to work. Use Annotations to capture user ratings, comments, and corrections on completed requests.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Use Cases`})}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Collecting quality feedback`,icon:`thumbs-up`,id:`collecting-quality-feedback`,children:_jsx(_components.p,{children:`Capture thumbs up/down ratings, custom scores, or categorical labels on AI responses. Build a feedback loop that surfaces low-quality generations for review.`})}),_jsx(Accordion,{title:`Compliance and QA review`,icon:`shield-check`,id:`compliance-and-qa-review`,children:_jsx(_components.p,{children:`Flag responses with specific defects (hallucination, off-topic, inappropriate content) using structured annotation keys shared across the team.`})}),_jsx(Accordion,{title:`Dataset curation`,icon:`database`,id:`dataset-curation`,children:_jsx(_components.p,{children:`Annotate Traces with corrections and quality labels, then export curated subsets as training datasets for future experiments.`})}),_jsx(Accordion,{title:`Human-in-the-loop workflows`,icon:`user-check`,id:`human-in-the-loop-workflows`,children:_jsx(_components.p,{children:`Route Traces to Annotation Queues for systematic expert review. Combine with Trace Automations to automatically surface Traces that meet specific criteria.`})})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Concepts`})}),`\n`,_jsx(_components.p,{children:`Three concepts work together to form the annotations system:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Annotations`}),`: the feedback categories configured for a project, such as a quality rating or a defect tag`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Annotation Queues`}),`: organized workflows for reviewing Traces in bulk via `,_jsx(_components.strong,{children:`AI Studio`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Annotations API`}),`: the API and SDK for applying feedback values to a Trace or span programmatically`]}),`\n`]}),`\n`,_jsxs(CardGroup,{cols:3,children:[_jsx(Card,{title:`Annotations`,icon:`clipboard-list`,href:`#create-annotations`,children:_jsx(_components.p,{children:`Define annotation schemas: keys, value types, and validation rules. Available on chat completion and responses spans once created.`})}),_jsx(Card,{title:`Annotation Queues`,icon:`list-check`,href:`/ai-studio/observability/annotation-queues#use-annotation-queues`,children:_jsx(_components.p,{children:`Organize annotation review workflows. Filter and present relevant Traces for review in bulk.`})}),_jsx(Card,{title:`Annotations API`,icon:`code`,href:`/ai-studio/observability/annotations-api`,children:_jsx(_components.p,{children:`Apply structured human feedback to Traces and spans programmatically via the API and SDK.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`create-annotations`,children:`Create Annotations`}),`\n`,_jsxs(_components.p,{children:[`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. The workspace-provided keys `,_jsx(_components.code,{children:`rating`}),` and `,_jsx(_components.code,{children:`correction`}),` are shared across projects, and each project defines them before their values appear on its pages.`]}),`\n`,_jsx(Tabs,{children:_jsxs(Tab,{title:`AI Studio`,icon:`https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=ac04dd509320d58ab9701cb6d6137733`,\"data-og-width\":`100`,width:`100`,\"data-og-height\":`100`,height:`100`,\"data-path\":`images/logos/ai-studio-round.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=280\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=d9df8d5b2ef07a766e62eaa0623240cd 280w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=560\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=3c40989d2bc47d1ec6d05f8eb3a585dd 560w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=840\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=2c40a18399d00e68a15d7d1262484486 840w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=3e853add10f479adccee3068427de43d 1100w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=71d1130736022278f4de6d95e7583c9b 1650w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=41a312377a09cf0f6da1edb9b02b695c 2500w`,id:`ai-studio`,children:[_jsxs(_components.p,{children:[`To create an annotation, head to `,_jsx(_components.strong,{children:`Optimization > Annotations`}),` in `,_jsx(_components.strong,{children:`AI Studio`}),`, or `,_jsx(_components.strong,{children:`Settings > Annotations`}),` in `,_jsx(_components.strong,{children:`AI Gateway`}),`, and press the `,_jsx(`kbd`,{children:_jsx(Icon,{icon:`plus`})}),` button. Annotations can also be created directly from an `,_jsx(_components.a,{href:`/ai-studio/observability/annotation-queues#use-annotation-queues`,children:`Annotation Queue`}),`.`]}),_jsx(Frame,{caption:`Customizing an Annotation.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/orqai/6HurnhGELvozB4iC/images/docs/human-review-settings.png?fit=max\u0026auto=format\u0026n=6HurnhGELvozB4iC\u0026q=85\u0026s=0de8b6fbf5c6356d4d6c63891cbbf980`,alt:`Create annotation form with Key, Title, Description fields and a Type selector showing Categorical, Range, and Text options.`,\"data-og-width\":`1018`,width:`1018`,\"data-og-height\":`994`,height:`994`,\"data-path\":`images/docs/human-review-settings.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/orqai/6HurnhGELvozB4iC/images/docs/human-review-settings.png?w=280\u0026fit=max\u0026auto=format\u0026n=6HurnhGELvozB4iC\u0026q=85\u0026s=435657e18822a0353deb0d0a4bc304c8 280w, https://mintcdn.com/orqai/6HurnhGELvozB4iC/images/docs/human-review-settings.png?w=560\u0026fit=max\u0026auto=format\u0026n=6HurnhGELvozB4iC\u0026q=85\u0026s=02afa7d137f36325447dcce73f49f2e4 560w, https://mintcdn.com/orqai/6HurnhGELvozB4iC/images/docs/human-review-settings.png?w=840\u0026fit=max\u0026auto=format\u0026n=6HurnhGELvozB4iC\u0026q=85\u0026s=602575b411683d4d63a41ff4aa0fc7f2 840w, https://mintcdn.com/orqai/6HurnhGELvozB4iC/images/docs/human-review-settings.png?w=1100\u0026fit=max\u0026auto=format\u0026n=6HurnhGELvozB4iC\u0026q=85\u0026s=966afe0965bc9dbea2ded3a97f01be4d 1100w, https://mintcdn.com/orqai/6HurnhGELvozB4iC/images/docs/human-review-settings.png?w=1650\u0026fit=max\u0026auto=format\u0026n=6HurnhGELvozB4iC\u0026q=85\u0026s=d719168bb8b7b877bfa202c9780fa444 1650w, https://mintcdn.com/orqai/6HurnhGELvozB4iC/images/docs/human-review-settings.png?w=2500\u0026fit=max\u0026auto=format\u0026n=6HurnhGELvozB4iC\u0026q=85\u0026s=313e0558488e22f2c54818a00efd1955 2500w`})}),_jsx(_components.p,{children:`Each annotation uses one of three value types:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Categorical`}),`: button options with custom labels, such as good/bad or saved/deleted`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Range`}),`: a custom scoring slider, for example a scale from 0 to 100`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Open field`}),`: free-form text input for detailed comments`]}),`\n`]}),_jsx(Info,{children:_jsx(_components.p,{children:`Once created, an annotation is available on all chat completion spans and responses spans in the project. No additional configuration or filtering required.`})}),_jsx(Tip,{children:_jsx(_components.p,{children:`Select the project before creating a definition. An annotation created inside a project belongs to that project, which keeps each project’s annotation set focused on its own review needs. Definitions created at workspace level remain available across every project.`})}),_jsx(Note,{children:_jsx(_components.p,{children:`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.`})})]})}),`\n`,_jsxs(Heading,{level:`3`,id:`common-annotations-legacy`,children:[`Common Annotations `,_jsx(Badge,{color:`yellow`,children:`Legacy`})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`rating`}),` and `,_jsx(_components.code,{children:`correction`}),` keys are shared across the workspace. A value written under either appears on a project’s pages only after that project defines the same annotation.`]})}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Rating`,icon:`star`,id:`rating`,children:[_jsx(_components.p,{children:`Rate the overall quality of AI responses:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Rating`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`good`})}),_jsx(_components.td,{children:`The response was helpful and accurate.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`bad`})}),_jsx(_components.td,{children:`The response was unhelpful or inaccurate.`})]})]})]})]}),_jsxs(Accordion,{title:`Defects`,icon:`triangle-exclamation`,id:`defects`,children:[_jsx(_components.p,{children:`Identify specific issues with AI responses:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Defect`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`grammatical`})}),_jsx(_components.td,{children:`Responses that contain grammatical errors`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`spelling`})}),_jsx(_components.td,{children:`Responses that contain spelling errors`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`hallucination`})}),_jsx(_components.td,{children:`Responses that contain hallucinations or factual inaccuracies`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`repetition`})}),_jsx(_components.td,{children:`Responses that contain unnecessary repetition`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`inappropriate`})}),_jsx(_components.td,{children:`Responses that are deemed inappropriate or offensive`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`off_topic`})}),_jsx(_components.td,{children:`Responses that do not address the user’s query`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`incompleteness`})}),_jsx(_components.td,{children:`Responses that are incomplete or partially address the query`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`ambiguity`})}),_jsx(_components.td,{children:`Responses that are vague or unclear`})]})]})]}),_jsx(Info,{children:_jsx(_components.p,{children:`Multiple defects can be selected for one response using an annotation configured with an array value.`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`use-annotations`,children:`Use Annotations`}),`\n`,_jsx(_components.p,{children:`Annotations can be applied wherever a Trace or span is reviewed:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Directly on a Trace or Log`}),`: open a single Trace or Log in the `,_jsx(_components.a,{href:`/ai-studio/observability/traces`,children:`Traces`}),` or `,_jsx(_components.a,{href:`/ai-studio/ai-engineering/deployments#analytics-and-logs`,children:`Logs`}),` view and use the `,_jsx(_components.strong,{children:`Annotations`}),` panel.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`In an `,_jsx(_components.a,{href:`/ai-studio/observability/annotation-queues#use-annotation-queues`,children:`Annotation Queue`})]}),`: review a curated set of Traces in bulk. Fill a queue with `,_jsx(_components.a,{href:`/ai-studio/observability/automations`,children:`Trace Automations`}),` or by manually adding individual Traces or Logs.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Programmatically`}),`: apply feedback through the API and SDK using the `,_jsx(_components.strong,{children:`API \u0026 SDK`}),` tab below.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`In an `,_jsx(_components.a,{href:`#annotations-in-experiments`,children:`Experiment`})]}),`: apply annotations while reviewing experiment outputs.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`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 `,_jsx(_components.a,{href:`/ai-studio/integrations/code-assistants/orq-mcp`,children:_jsx(_components.strong,{children:`Orq MCP`})}),` and used to run analysis across reviewed data.`]})}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`AI Studio`,icon:`https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=ac04dd509320d58ab9701cb6d6137733`,\"data-og-width\":`100`,width:`100`,\"data-og-height\":`100`,height:`100`,\"data-path\":`images/logos/ai-studio-round.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=280\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=d9df8d5b2ef07a766e62eaa0623240cd 280w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=560\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=3c40989d2bc47d1ec6d05f8eb3a585dd 560w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=840\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=2c40a18399d00e68a15d7d1262484486 840w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=3e853add10f479adccee3068427de43d 1100w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=71d1130736022278f4de6d95e7583c9b 1650w, https://mintcdn.com/orqai/My16MDKJXrKALEHC/images/logos/ai-studio-round.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=My16MDKJXrKALEHC\u0026q=85\u0026s=41a312377a09cf0f6da1edb9b02b695c 2500w`,id:`ai-studio-2`,\"data-child-tab-ids\":`[\"traces\",\"logs\"]`,children:[_jsxs(_components.p,{children:[`The annotation capabilities differ between `,_jsx(_components.a,{href:`/ai-studio/ai-engineering/deployments#analytics-and-logs`,children:`Logs`}),` and `,_jsx(_components.a,{href:`/ai-studio/observability/traces`,children:`Traces`}),`. Logs support human feedback and text corrections to the AI response. Traces support human feedback and `,_jsx(_components.a,{href:`/ai-studio/observability/traces#correct-an-evaluator-result`,children:`correcting an evaluator result`}),`.`]}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Traces`,id:`traces`,children:[_jsxs(_components.p,{children:[`Navigate to the `,_jsx(_components.a,{href:`/ai-studio/observability/traces`,children:`Traces`}),` view and select a single trace. The `,_jsx(_components.strong,{children:`Annotations`}),` panel will be displayed, allowing you to apply human feedback to the AI response.`]}),_jsx(Frame,{caption:`The Annotations panel in Traces lets you apply human feedback.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/orqai/cbhNm3-6xhlam62F/images/trace-annotation.png?fit=max\u0026auto=format\u0026n=cbhNm3-6xhlam62F\u0026q=85\u0026s=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.`,\"data-og-width\":`1732`,width:`1732`,\"data-og-height\":`873`,height:`873`,\"data-path\":`images/trace-annotation.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/orqai/cbhNm3-6xhlam62F/images/trace-annotation.png?w=280\u0026fit=max\u0026auto=format\u0026n=cbhNm3-6xhlam62F\u0026q=85\u0026s=b0b52a13a2e2868f2dc8cd96b5a5bc8b 280w, https://mintcdn.com/orqai/cbhNm3-6xhlam62F/images/trace-annotation.png?w=560\u0026fit=max\u0026auto=format\u0026n=cbhNm3-6xhlam62F\u0026q=85\u0026s=285ee03b419263b9f84d41ac97ec00d6 560w, https://mintcdn.com/orqai/cbhNm3-6xhlam62F/images/trace-annotation.png?w=840\u0026fit=max\u0026auto=format\u0026n=cbhNm3-6xhlam62F\u0026q=85\u0026s=97b816af69bbaa2d20c0d43b4d647087 840w, https://mintcdn.com/orqai/cbhNm3-6xhlam62F/images/trace-annotation.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cbhNm3-6xhlam62F\u0026q=85\u0026s=15a9e2cd9afef556f2b0c129d8234942 1100w, https://mintcdn.com/orqai/cbhNm3-6xhlam62F/images/trace-annotation.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cbhNm3-6xhlam62F\u0026q=85\u0026s=6cd857c5b0ab77079902ef3f9c27674c 1650w, https://mintcdn.com/orqai/cbhNm3-6xhlam62F/images/trace-annotation.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cbhNm3-6xhlam62F\u0026q=85\u0026s=a8b1745ac7487a2fef1fff87aff276a8 2500w`})})]}),_jsxs(Tab,{title:`Logs`,id:`logs`,children:[_jsxs(_components.p,{children:[`Navigate to the `,_jsx(_components.a,{href:`/ai-studio/ai-engineering/deployments#analytics-and-logs`,children:`Logs`}),` view and select a single log. The `,_jsx(_components.strong,{children:`Annotations`}),` panel will be displayed, allowing you to apply human feedback and provide corrections to the AI response.`]}),_jsx(Frame,{caption:`The Annotations panel in Logs lets you apply human feedback and corrections.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-annotations-panel.png?fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=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.`,\"data-og-width\":`1762`,width:`1762`,\"data-og-height\":`1162`,height:`1162`,\"data-path\":`images/logs-annotations-panel.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-annotations-panel.png?w=280\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=70f8dc7e4060272faf4b6e9f3efceaf8 280w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-annotations-panel.png?w=560\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=922c3a243ec913cc749ab174e9cf9e0b 560w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-annotations-panel.png?w=840\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=27b07cbd66059655f94e94915a7dee10 840w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-annotations-panel.png?w=1100\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=12ba1a9e7667020287426d49d0a79cee 1100w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-annotations-panel.png?w=1650\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=8758abb90f2046a307db2dff4fada77c 1650w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-annotations-panel.png?w=2500\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=e4ef4ae1af44d26ec677b86e347f5cb8 2500w`})}),_jsxs(_components.p,{children:[`To make a correction, use the `,_jsx(_components.strong,{children:`Add correction`}),` button below the AI-generated response:`]}),_jsx(Frame,{caption:`The Add correction button is below the Assistant response.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-add-correction-button.png?fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=308c61614973cde35b1e94a9cee6a108`,alt:`Assistant response box with an Add correction button highlighted in red below it.`,\"data-og-width\":`1824`,width:`1824`,\"data-og-height\":`606`,height:`606`,\"data-path\":`images/logs-add-correction-button.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-add-correction-button.png?w=280\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=cfae4dc3b238ca5b859a475159cf0cb3 280w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-add-correction-button.png?w=560\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=5787966f24dfa4897f44482d1e6f75f4 560w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-add-correction-button.png?w=840\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=45d7323f20e7ac4f2de2a0eb75b455cc 840w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-add-correction-button.png?w=1100\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=7b6a3d7d5a2739a37d58efd9e1698359 1100w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-add-correction-button.png?w=1650\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=a8b97abb6ad4dad781c63fa6734a97c0 1650w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-add-correction-button.png?w=2500\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=c181296c666f1b68ec52613f282bcbc9 2500w`})}),_jsxs(_components.p,{children:[`Click to add a correction, which opens an editor for manually revising the model’s response. Select `,_jsx(_components.strong,{children:`Save`}),` to store the correction.`]}),_jsx(Frame,{caption:`The corrected text and correction will appear side by side, with the correction displayed in green.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-correction-editor.png?fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=46554b2e2dee2276cc1cbf0fcaabcbbb`,alt:`Original assistant response shown in purple above a Correction box in green, with the corrected text entered and a Save button.`,\"data-og-width\":`2216`,width:`2216`,\"data-og-height\":`883`,height:`883`,\"data-path\":`images/logs-correction-editor.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-correction-editor.png?w=280\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=1422e40b03bc94b049ce0cc57f00aa2a 280w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-correction-editor.png?w=560\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=0e3fc569804a9bcb1da2659b16877ac7 560w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-correction-editor.png?w=840\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=b229b209f01db803d7b9132efe8302a7 840w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-correction-editor.png?w=1100\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=4bde8b80e009c655048df0d7a184236c 1100w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-correction-editor.png?w=1650\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=b9f1fa795d8d60cd4ec24e5e491273a3 1650w, https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/logs-correction-editor.png?w=2500\u0026fit=max\u0026auto=format\u0026n=83k4_RKHhrJhLScC\u0026q=85\u0026s=24d8a502a0ebc92e7c22965313aec8f7 2500w`})}),_jsx(Info,{children:_jsxs(_components.p,{children:[`Corrections are valuable for building curated datasets. Learn more in `,_jsx(_components.a,{href:`/ai-studio/optimize/datasets`,children:`Creating a Curated Dataset`}),`.`]})})]})]})]}),_jsxs(Tab,{title:`API \u0026 SDK`,icon:`code`,id:`api-%26-sdk`,children:[_jsxs(_components.p,{children:[`Quick examples for annotating LLM responses. For the full usage guide (request fields, annotation values, corrections, batch and remove semantics, and error handling), see `,_jsx(_components.a,{href:`/ai-studio/observability/annotations-api`,children:`Annotations API`}),`.`]}),_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Add Multiple Defects`,icon:`triangle-exclamation`,id:`add-multiple-defects`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://my.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$ORQ_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"annotations\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"key\": \"defects\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"value\": [\"grammatical\", \"spelling\", \"ambiguity\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` orq_ai_sdk `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` Orq`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` os`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`orq `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` Orq(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`api_key`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ORQ_API_KEY\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`result `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` orq.annotations.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` trace_id`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003ctrace_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` span_id`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003cspan_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` annotations`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`[`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"defects\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"value\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"grammatical\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"spelling\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ambiguity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(result)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`20`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { Orq } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"@orq-ai/node\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` orq`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` Orq`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` apiKey: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`ORQ_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` result`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` orq.annotations.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`create`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` traceId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003ctrace_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` spanId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003cspan_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requestBody: {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` annotations: [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` key: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"defects\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` value: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"grammatical\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"spelling\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ambiguity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(result);`})]}),`\n`]})})})]})}),_jsx(Accordion,{title:`Add a Numeric Score`,icon:`gauge`,id:`add-a-numeric-score`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`14`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://my.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$ORQ_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"annotations\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"key\": \"star-rating\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"value\": 4`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"metadata\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identity_id\": \"user-123\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`20`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` orq_ai_sdk `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` Orq`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` os`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`orq `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` Orq(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`api_key`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ORQ_API_KEY\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`result `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` orq.annotations.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` trace_id`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003ctrace_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` span_id`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003cspan_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` annotations`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`[`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"star-rating\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"value\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`4`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` metadata`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identity_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"user-123\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(result)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`23`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { Orq } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"@orq-ai/node\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` orq`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` Orq`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` apiKey: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`ORQ_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` result`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` orq.annotations.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`create`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` traceId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003ctrace_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` spanId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003cspan_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requestBody: {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` annotations: [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` key: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"star-rating\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` value: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`4`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` metadata: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` identityId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"user-123\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(result);`})]}),`\n`]})})})]})}),_jsx(Accordion,{title:`Add a Text Correction`,icon:`pen`,id:`add-a-text-correction`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://my.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$ORQ_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"annotations\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"key\": \"correction\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"value\": \"The correct answer should emphasize scalability and fault tolerance.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` orq_ai_sdk `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` Orq`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` os`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`orq `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` Orq(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`api_key`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ORQ_API_KEY\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`result `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` orq.annotations.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` trace_id`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003ctrace_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` span_id`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003cspan_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` annotations`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`[`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"correction\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"value\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"The correct answer should emphasize scalability and fault tolerance.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(result)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`20`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { Orq } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"@orq-ai/node\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` orq`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` Orq`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` apiKey: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`ORQ_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` result`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` orq.annotations.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`create`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` traceId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003ctrace_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` spanId: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\u003cspan_id>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requestBody: {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` annotations: [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` key: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"correction\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` value: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"The correct answer should emphasize scalability and fault tolerance.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(result);`})]}),`\n`]})})})]})})]}),_jsx(Info,{children:_jsxs(_components.p,{children:[`For error handling, batch limits, and constraints, see `,_jsx(_components.a,{href:`/ai-studio/observability/annotations-api#error-handling`,children:`Annotations API`}),`.`]})})]}),_jsxs(Tab,{title:`CLI`,icon:`terminal`,id:`cli`,children:[_jsxs(_components.p,{children:[`Annotate and remove annotations from a span using `,_jsx(_components.a,{href:`/reference/cli`,children:_jsx(_components.code,{children:`orq traces create`})}),` and `,_jsx(_components.a,{href:`/reference/cli`,children:_jsx(_components.code,{children:`orq traces delete`})}),`. The `,_jsx(_components.code,{children:`orq traces`}),` group manages annotations on existing traces and spans; there is no separate `,_jsx(_components.code,{children:`orq annotations`}),` group.`]}),_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Add a Quality Rating`,icon:`star`,id:`add-a-quality-rating`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`orq`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` traces`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` create`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`trace_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`span_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --annotations`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '[{\"key\": \"rating\", \"value\": \"good\"}]'`})]}),`\n`]})})})}),_jsx(Accordion,{title:`Add Multiple Defects`,icon:`triangle-exclamation`,id:`add-multiple-defects-1`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`orq`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` traces`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` create`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`trace_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`span_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --annotations`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '[{\"key\": \"defects\", \"value\": [\"grammatical\", \"spelling\", \"ambiguity\"]}]'`})]}),`\n`]})})})}),_jsx(Accordion,{title:`Add a Numeric Score`,icon:`gauge`,id:`add-a-numeric-score-1`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`orq`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` traces`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` create`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`trace_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`span_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --annotations`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '[{\"key\": \"star-rating\", \"value\": 4}]'`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --metadata`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{\"identity_id\": \"user-123\"}'`})]}),`\n`]})})})}),_jsx(Accordion,{title:`Add a Text Correction`,icon:`pen`,id:`add-a-text-correction-1`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`orq`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` traces`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` create`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`trace_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`span_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --annotations`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '[{\"key\": \"correction\", \"value\": \"The correct answer should emphasize scalability and fault tolerance.\"}]'`})]}),`\n`]})})})}),_jsx(Accordion,{title:`Batch Add Multiple Annotations`,icon:`layer-group`,id:`batch-add-multiple-annotations`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`orq`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` traces`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` create`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`trace_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`span_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --annotations`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '[{\"key\": \"rating\", \"value\": \"good\"}, {\"key\": \"star-rating\", \"value\": 4}, {\"key\": \"categories\", \"value\": [\"helpful\", \"accurate\", \"concise\"]}]'`})]}),`\n`]})})})}),_jsxs(Accordion,{title:`Remove Annotations`,icon:`trash`,id:`remove-annotations`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`--keys`}),` takes a comma-separated list, not a JSON array like the API.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`orq`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` traces`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` delete`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`trace_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`span_i`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`d`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --keys`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` rating,defects`})]}),`\n`]})})})]})]}),_jsxs(Tip,{children:[`See `,_jsx(_components.a,{href:`/reference/cli`,children:`install and setup`}),` to get started with the CLI. Run `,_jsx(_components.code,{children:`orq traces create --help`}),` or `,_jsx(_components.code,{children:`orq traces delete --help`}),` for the full flag reference.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`human-review-sets`,children:`Human Review Sets`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Deprecated`}),`: Human Review Sets are replaced by project-level `,_jsx(_components.a,{href:`/ai-studio/observability/annotations`,children:`Annotations`}),` and will be removed in release 4.18.`]})}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`Human Review Set`}),` presents a group of Annotations together in the `,_jsx(_components.strong,{children:`Annotations`}),` panel of a `,_jsx(_components.a,{href:`/ai-studio/observability/logs`,children:`Log`}),`. A set carries a display name, the Annotations it collects, and two settings:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Project`}),`: one project, or every project in the workspace when no project is set.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Match rule`}),`: by run type, matching a deployment, a playground, or an experiment output, or by name, matching a deployment key, a playground name, or an experiment name.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`When at least one set matches a Log, the `,_jsx(_components.strong,{children:`Annotations`}),` panel shows the Annotations those sets collect, grouped under each set’s display name when several sets match. A Log that matches no set shows the project’s Annotations on their own.`]}),`\n`,_jsxs(_components.p,{children:[`Review sets are `,_jsx(_components.a,{href:`/reference/human-review-sets/create-a-human-review-set`,children:`managed through the API`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`annotations-in-experiments`,children:`Annotations in Experiments`}),`\n`,_jsxs(_components.p,{children:[`Annotations can also be applied outside of Annotation Queues, while reviewing the outputs of an `,_jsx(_components.a,{href:`/ai-studio/optimize/experiments`,children:`Experiment`}),`. 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.`]}),`\n`,_jsx(Frame,{caption:`The Annotations panel in the experiment review screen, with annotations shown above the Evaluator scores.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/orqai/lqVyDy-llJ4XuTsl/images/annotations-in-experiments.png?fit=max\u0026auto=format\u0026n=lqVyDy-llJ4XuTsl\u0026q=85\u0026s=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.`,\"data-og-width\":`3494`,width:`3494`,\"data-og-height\":`1740`,height:`1740`,\"data-path\":`images/annotations-in-experiments.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/orqai/lqVyDy-llJ4XuTsl/images/annotations-in-experiments.png?w=280\u0026fit=max\u0026auto=format\u0026n=lqVyDy-llJ4XuTsl\u0026q=85\u0026s=a5dc609a55ac3ceece3c490aacd42b2d 280w, https://mintcdn.com/orqai/lqVyDy-llJ4XuTsl/images/annotations-in-experiments.png?w=560\u0026fit=max\u0026auto=format\u0026n=lqVyDy-llJ4XuTsl\u0026q=85\u0026s=0d57a55dc0224a8bbfd357ebc482ac01 560w, https://mintcdn.com/orqai/lqVyDy-llJ4XuTsl/images/annotations-in-experiments.png?w=840\u0026fit=max\u0026auto=format\u0026n=lqVyDy-llJ4XuTsl\u0026q=85\u0026s=e0fbbcec5b8a02d57f176b0bf7424b84 840w, https://mintcdn.com/orqai/lqVyDy-llJ4XuTsl/images/annotations-in-experiments.png?w=1100\u0026fit=max\u0026auto=format\u0026n=lqVyDy-llJ4XuTsl\u0026q=85\u0026s=9ffd3412543b7a77a26244bd2a8a80fe 1100w, https://mintcdn.com/orqai/lqVyDy-llJ4XuTsl/images/annotations-in-experiments.png?w=1650\u0026fit=max\u0026auto=format\u0026n=lqVyDy-llJ4XuTsl\u0026q=85\u0026s=07e4acc04cee0548bfc79638b23c4774 1650w, https://mintcdn.com/orqai/lqVyDy-llJ4XuTsl/images/annotations-in-experiments.png?w=2500\u0026fit=max\u0026auto=format\u0026n=lqVyDy-llJ4XuTsl\u0026q=85\u0026s=7a89f7159dd1c3797d0464a4caa1a507 2500w`})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/ai-studio/observability/traces#correct-an-evaluator-result`,children:`Correcting an Evaluator result`}),` is not available in the experiment review screen. Annotations and Evaluator scores still display as described above.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Annotations","sidebarTitle":"Annotations","description":"Define annotation schemas and apply structured human feedback to LLM traces and spans in AI Studio, through the API and SDK, or from the CLI.","keywords":["feedback"],"href":"/ai-studio/observability/annotations"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Create Annotations","slug":"create-annotations","depth":2,"children":[{"title":"Common Annotations Legacy","slug":"common-annotations-legacy","depth":3,"children":[]}]},{"title":"Use Annotations","slug":"use-annotations","depth":2,"children":[]},{"title":"Human Review Sets","slug":"human-review-sets","depth":2,"children":[]},{"title":"Annotations in Experiments","slug":"annotations-in-experiments","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/orqai/19ee3574279bbaa0/gtm.js","/_mintlify/custom/orqai/1f1a49b99957b631/commonroom-signals.js"],"subdomain":"orqai","siteName":"Orq.ai Documentation","title":"Annotations - Orq.ai Documentation","contextualStarterQuestions":[{"_id":"6ad732af6eee305c2d26c865","deploymentId":"68c9bcd7a1b07562da8b036b","questionText":"How do I export curated datasets?","status":"active","generatedBy":"contextual","path":"ai-studio/observability/annotations","createdAt":"2026-10-20T09:21:51.900Z","updatedAt":"2026-10-20T09:21:51.900Z","__v":0},{"_id":"6ad732af6eee305c2d26c863","deploymentId":"68c9bcd7a1b07562da8b036b","questionText":"How do I create annotations?","status":"active","generatedBy":"contextual","path":"ai-studio/observability/annotations","createdAt":"2026-10-20T09:21:51.900Z","updatedAt":"2026-10-20T09:21:51.900Z","__v":0},{"_id":"6ad732af6eee305c2d26c864","deploymentId":"68c9bcd7a1b07562da8b036b","questionText":"What are annotation queues?","status":"active","generatedBy":"contextual","path":"ai-studio/observability/annotations","createdAt":"2026-10-20T09:21:51.900Z","updatedAt":"2026-10-20T09:21:51.900Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-20T09:21:45.409Z","originalFileLocation":"ai-studio/observability/annotations.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Define annotation schemas and apply structured human feedback to LLM traces and spans in AI Studio, through the API and SDK, or from the CLI.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Orq.ai Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Annotations - Orq.ai Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Define annotation schemas and apply structured human feedback to LLM traces and spans in AI Studio, through the API and SDK, or from the CLI.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Orq.ai Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.orq.ai/ai-studio/observability/annotations\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://orqai.mintlify.app/_mintlify/api/og/v2?division=Review\u0026amp;title=Annotations\u0026amp;description=Define+annotation+schemas+and+apply+structured+human+feedback+to+LLM+traces+and+spans+in+AI+Studio%2C+through+the+API+and+SDK%2C+or+from+the+CLI.\u0026amp;theme=0116d0baa6ba6403f431e631\u0026amp;signature=ce35693b5e69a3e7c3746311be1879e3517231637ca90eb55f8398b884974808\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Annotations - Orq.ai Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Define annotation schemas and apply structured human feedback to LLM traces and spans in AI Studio, through the API and SDK, or from the CLI.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://orqai.mintlify.app/_mintlify/api/og/v2?division=Review\u0026amp;title=Annotations\u0026amp;description=Define+annotation+schemas+and+apply+structured+human+feedback+to+LLM+traces+and+spans+in+AI+Studio%2C+through+the+API+and+SDK%2C+or+from+the+CLI.\u0026amp;theme=0116d0baa6ba6403f431e631\u0026amp;signature=ce35693b5e69a3e7c3746311be1879e3517231637ca90eb55f8398b884974808\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/orqai/5zquLIiRlftT1q7X/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Orq.ai Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#027f6b\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"author\" content=\"Orq.ai\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@orq_ai\">\u003cmeta data-mint-head name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\u003cmeta data-mint-head name=\"language\" content=\"English\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.orq.ai/ai-studio/observability/annotations\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ai-studio/observability/annotations.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.orq.ai/#organization\",\"name\":\"Orq.ai\",\"legalName\":\"Orq.AI Holding B.V.\",\"url\":\"https://orq.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.orq.ai/images/Orq_ai_Symbol_Dark.svg\"},\"sameAs\":[\"https://github.com/orq-ai\",\"https://x.com/orq_ai\",\"https://www.linkedin.com/company/orqai/\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.orq.ai#website\",\"name\":\"Orq.ai Documentation\",\"url\":\"https://docs.orq.ai\",\"publisher\":{\"@id\":\"https://docs.orq.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.orq.ai/ai-studio/observability/annotations#webpage\",\"url\":\"https://docs.orq.ai/ai-studio/observability/annotations\",\"name\":\"Annotations\",\"description\":\"Define annotation schemas and apply structured human feedback to LLM traces and spans in AI Studio, through the API and SDK, or from the CLI.\",\"dateModified\":\"2026-10-20T09:21:45.409Z\",\"isPartOf\":{\"@id\":\"https://docs.orq.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.orq.ai/ai-studio/observability/annotations#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.orq.ai/ai-studio/observability/annotations#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Orq.ai Documentation\",\"item\":\"https://docs.orq.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Annotations\",\"item\":\"https://docs.orq.ai/ai-studio/observability/annotations\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.orq.ai/ai-studio/observability/annotations#article\",\"headline\":\"Annotations\",\"name\":\"Annotations\",\"description\":\"Define annotation schemas and apply structured human feedback to LLM traces and spans in AI Studio, through the API and SDK, or from the CLI.\",\"url\":\"https://docs.orq.ai/ai-studio/observability/annotations\",\"mainEntityOfPage\":{\"@id\":\"https://docs.orq.ai/ai-studio/observability/annotations#webpage\"},\"dateModified\":\"2026-10-20T09:21:45.409Z\",\"keywords\":\"feedback\",\"publisher\":{\"@id\":\"https://docs.orq.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.orq.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Orq.ai Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Orq.ai Documentation","nav":{"global":null,"tabs":[{"tab":"AI Gateway","pages":[{"title":"AI Gateway","href":"/ai-gateway/get-started/introduction"}]},{"tab":"AI Observability","groups":[{"group":"Overview","icon":"rocket","pages":[{"title":"Quick Start","sidebarTitle":"Quickstart","href":"/ai-studio/observability/quickstart"},{"title":"Orq span attributes reference","sidebarTitle":"Span Attributes","href":"/ai-studio/observability/span-attributes"},{"title":"Token and cost tracking","sidebarTitle":"Token \u0026 Cost Tracking","href":"/ai-studio/observability/token-cost-tracking"}]},{"group":"Instrument your app","icon":"code","pages":[{"title":"App tracking for AI requests","sidebarTitle":"App Tracking","href":"/ai-gateway/app-tracking"},{"title":"Thread management for grouped requests","sidebarTitle":"Thread Management","href":"/ai-gateway/thread-management"},{"title":"Track usage by identity","sidebarTitle":"Identities","href":"/ai-studio/observability/identities"}]},{"group":"Explore","icon":"compass","pages":[{"title":"LLM traces for debugging","sidebarTitle":"Traces","href":"/ai-studio/observability/traces"},{"title":"Agent Graphs","href":"/ai-studio/observability/agent-graphs"},{"title":"Conversation threads in traces","sidebarTitle":"Threads","tag":"Studio","href":"/ai-studio/observability/threads"},{"title":"Application logs","sidebarTitle":"Logs","href":"/ai-studio/observability/logs"},{"title":"Trace and log selection with OQL","sidebarTitle":"OQL","href":"/ai-studio/observability/oql"},{"title":"Views API","href":"/ai-studio/observability/views-api"},{"title":"Trace evaluations","sidebarTitle":"Trace Evaluations","href":"/ai-studio/observability/trace-evaluations"},{"title":"MCP Tracing","href":"/ai-studio/observability/mcp-tracing"}]},{"group":"Monitor","icon":"chart-line","pages":[{"title":"Alerts","sidebarTitle":"Alerts","tag":"Beta","href":"/ai-studio/observability/alerts"},{"title":"Notifiers for alert destinations","sidebarTitle":"Notifiers","tag":"Beta","href":"/ai-studio/observability/notifiers"},{"title":"Monitors","sidebarTitle":"Monitors","tag":"Beta","href":"/ai-studio/observability/monitors"},{"title":"Trace Automations","sidebarTitle":"Automations","tag":"Studio","href":"/ai-studio/observability/automations"}]},{"group":"Export","icon":"arrow-up-from-bracket","pages":[{"title":"Reporting API","sidebarTitle":"Reporting API","href":"/ai-studio/observability/reporting-api"},{"title":"Telemetry API","sidebarTitle":"Telemetry API","description":"Query traces, logs, and usage metrics through one endpoint: one request shape, one filter dialect, and one response shape per source.","href":"/ai-studio/observability/telemetry-api"}]},{"group":"Review","icon":"clipboard-check","pages":[{"title":"Annotations","sidebarTitle":"Annotations","href":"/ai-studio/observability/annotations"},{"title":"Annotations API","sidebarTitle":"Annotations API","description":"Apply structured feedback to traces and spans via the Annotations API. Add ratings, defect tags, corrections, and evaluator overrides programmatically.","href":"/ai-studio/observability/annotations-api"},{"title":"Annotation Queues","sidebarTitle":"Annotation Queues","href":"/ai-studio/observability/annotation-queues"}]},{"group":"Data privacy \u0026 security","icon":"shield-check","pages":[{"title":"Data privacy and security","sidebarTitle":"Data Privacy \u0026 Security","href":"/ai-studio/observability/data-privacy"}]}]},{"tab":"Managed agents","pages":[{"title":"Managed agents","href":"/ai-studio/ai-engineering/quickstart"}]},{"tab":"Administration","pages":[{"title":"Administration","href":"/ai-studio/organization/workspace-settings"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/ai-studio/integrations/overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/reference/client-libraries"}]},{"tab":"Cookbooks","hidden":true,"pages":[{"title":"Cookbooks","href":"/ai-studio/cookbooks/cookbooks"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/release-4-17"}]}]},"title":"Annotations - Orq.ai Documentation","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-COGkNuA6.js","DynamicMarkdown-85clUA0i.js","zoom-image-lightbox-BZxD9MAj.js","lightbox-handle-r17bVUz3.js"]}