Add docs for annotating agent runs#2085
Conversation
Document the Annotations feature: what it is, when to use it (and when to reach for live evals instead), how to annotate a run from the agent Runs tab, the fields you can record, the project-wide Annotations page, and exporting annotations as eval cases. Includes Verify and Troubleshooting sections and marks the feature Beta. Registered in the nav under Evaluate, next to Evals and Datasets. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A8uqUP5UYj7vEmofWe4mHW
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new documentation page for beta Logfire Annotations, covering annotation workflows, fields, review views, JSON Lines exports, verification, troubleshooting, and next steps. Adds the page to the “Evaluate: Live Monitoring” navigation under “Annotate Agent Runs.” 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/advanced/run-annotations/index.md`:
- Line 9: Update the Slack community link in the annotations documentation to
use the source-relative path ../../../join-slack/ instead of the hard-coded
absolute URL, while leaving the surrounding message and email link unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 84a2c83d-d237-4227-b408-155fe788e9d9
📒 Files selected for processing (2)
docs/reference/advanced/run-annotations/index.mdmkdocs.yml
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
pydantic/logfire(manual)pydantic/pydantic-ai(manual)pydantic/platform(auto-detected) → reviewed against branchclaude/annotations-feature-flag-rollout-9g08iuinstead of the default branchpydantic/pydantic(auto-detected)
Replace the hard-coded absolute URL (which carries the deployment-specific `/docs` prefix) with a source-relative link, matching the repo docs convention and the existing `faq.md` usage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A8uqUP5UYj7vEmofWe4mHW
Review pass against the shipped UI found three inaccuracies: - Verdict is not a required field: an annotation can be saved with just a comment or tag, so it's described as the headline label with the rest as optional context. - Category and expected output are verdict-conditional (category for neutral/fail, expected output for fail); note when each appears. - Export honors the runs table's verdict/category/tag filters, not the annotator chip; the export and troubleshooting text said otherwise. Also fixed the "no agents" troubleshooting: the 7-day grid window is fixed, so point users to the Agents page for older agents instead of "widening" it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A8uqUP5UYj7vEmofWe4mHW
Style guide flags "just" as filler; use "only". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A8uqUP5UYj7vEmofWe4mHW
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/advanced/run-annotations/index.md`:
- Around line 31-32: Update the annotation workflow step before the optional
fields to state that selecting a verdict is optional. Explicitly mention that
users can save comments or tags without selecting a verdict, while preserving
the existing save and advance instructions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 85033cf9-a38e-4c3c-852d-040724379177
📒 Files selected for processing (2)
docs/reference/advanced/run-annotations/index.mdmkdocs.yml
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
pydantic/logfire(manual)pydantic/pydantic-ai(manual)pydantic/platform(auto-detected)pydantic/pydantic(auto-detected)
🚧 Files skipped from review as they are similar to previous changes (1)
- mkdocs.yml
| 4. Add any of the optional fields below. Which ones appear depends on the verdict you picked. | ||
| 5. Save. Press `cmd+enter` (`ctrl+enter` on Windows and Linux) to save and move to the next unannotated run, or click **Save**. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Document that a verdict is optional.
This step currently tells users to set a verdict, contradicting the shipped behavior described at Line 40: comments or tags can be saved independently. Reword the workflow to make the verdict optional and explicitly preserve the comment-only/tag-only path.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/reference/advanced/run-annotations/index.md` around lines 31 - 32,
Update the annotation workflow step before the optional fields to state that
selecting a verdict is optional. Explicitly mention that users can save comments
or tags without selecting a verdict, while preserving the existing save and
advance instructions.
What this adds
A new documentation page for the Annotations feature at
docs/reference/advanced/run-annotations/index.md, registered in the nav under Evaluate (next to Evals and Datasets).Annotations let you review your AI agents' output and label each run with a verdict (pass / neutral / fail), a category, the answer it should have given, a comment, and tags, then triage them across agents and export the results as eval cases.
Page contents
The feature is marked Beta using the standard
!!! note "Beta: feedback welcome"admonition. Written to the repo's documentation style guide (sentence-case headings, terms glossed on first use, no em-dashes, no hype words) and grounded in the current UI. Drafted with AI assistance and human-reviewed against the shipped product.This documents the same feature the platform-side rollout releases from behind its feature flag; the run-annotations walkthrough already points its
public_docsfrontmatter at this path.🤖 Generated with Claude Code
https://claude.ai/code/session_01A8uqUP5UYj7vEmofWe4mHW
Generated by Claude Code