Skip to content

Conversation

@bcsherma
Copy link
Member

Summary

This consolidates the CallViewSpec feature for attaching rich views to calls, particularly useful for evaluation reports.

Schema Changes

  • Add view_spec_ref column to call schema for linking to view specifications

CallViewSpec Types (3 item types)

  • ContentViewItem: Rich content (HTML, markdown, images) with base64 encoding
  • ObjectRefViewItem: References to any weave object/table by URI
  • SavedViewDefinitionItem: Embedded table view configurations

SDK Features

  • weave.set_view() for attaching views to the current call
  • SavedView definitions embedded directly in CallViewSpec (no separate save needed)
  • Support for Content, strings, Tables, ObjectRefs, and SavedViews as view items

Evaluation Integration

  • on_complete callback for Evaluation class
  • Create custom reports with charts, tables, and filtered views
  • Filter SavedViews by trace_id, op name, and output fields

SavedView Enhancements

  • filter_op() method for filtering by operation name
  • add_filter() for field-level filtering with operators (is, isNot, etc.)
  • set_columns() for configuring visible columns
  • Proper query serialization for trace filters

Test Plan

  • Run existing tests
  • Test evaluation with custom report views
  • Verify SavedView filtering works correctly

This consolidates the CallViewSpec feature for attaching rich views to calls,
particularly useful for evaluation reports. Key capabilities:

## Schema Changes
- Add view_spec_ref column to call schema for linking to view specifications

## CallViewSpec Types (3 item types)
- ContentViewItem: Rich content (HTML, markdown, images) with base64 encoding
- ObjectRefViewItem: References to any weave object/table by URI
- SavedViewDefinitionItem: Embedded table view configurations

## SDK Features
- weave.set_view() for attaching views to the current call
- SavedView definitions embedded directly in CallViewSpec (no separate save needed)
- Support for Content, strings, Tables, ObjectRefs, and SavedViews as view items

## Evaluation Integration
- on_complete callback for Evaluation class
- Create custom reports with charts, tables, and filtered views
- Filter SavedViews by trace_id, op name, and output fields

## SavedView Enhancements
- filter_op() method for filtering by operation name
- add_filter() for field-level filtering with operators (is, isNot, etc.)
- set_columns() for configuring visible columns
- Proper query serialization for trace filters
@github-actions
Copy link
Contributor

❌ Documentation Reference Check Failed

No documentation reference found in the PR description. Please add either:

This check is required for all PRs that start with "feat(weave)" unless they explicitly state "docs are not required". Please update your PR description and this check will run again automatically.

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 55.93220% with 52 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
weave/flow/saved_view.py 6.45% 29 Missing ⚠️
weave/trace/view_utils.py 56.25% 16 Missing and 5 partials ⚠️
weave/evaluation/eval.py 60.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@wandbot-3000
Copy link

wandbot-3000 bot commented Jan 30, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants