Skip to content

Add trajectory reviewer - #80

Open
skaltman wants to merge 35 commits into
mainfrom
view-trajectories-53
Open

Add trajectory reviewer#80
skaltman wants to merge 35 commits into
mainfrom
view-trajectories-53

Conversation

@skaltman

@skaltman skaltman commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Adds a trajectory reviewer app.

Launch the reviewer app with:

# launches reviewer for tlg agent trajectories
trajectory_review(read_trajectories("04ee623c-3daf-4893-989e-7be4f2c0e7a7"))

Trust tags are reconstructed from the conversation, see #79.

Notes and flags are written to an append-only JSONL file. There is probably later work to do on how the review data is stored. You can join the review data back to the trajectories data for analysis:

trajectories <- read_trajectories("04ee623c-3daf-4893-989e-7be4f2c0e7a7")
trajectory_reviews_read("commons-review.jsonl", trajectories)
image

Addresses #53

skaltman added 28 commits August 3, 2026 11:24
- `view_trajectories()` → `trajectory_review()`
- `read_trajectory_reviews()` → `trajectory_reviews_read()`
- Update documentation and examples accordingly
@skaltman
skaltman requested a review from simonpcouch August 4, 2026 00:57

@simonpcouch simonpcouch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super excited about this! Some initial thoughts here.

Comment thread R/trajectory-review-log.R Outdated
#' @return A list of actionable review records in file order: all notes and
#' currently active flags. When `trajectories` is supplied, each record also
#' contains `turns`.
#' @export

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of me wonders whether we ought to write the reviews with the turns 'joined' in in the first place. Since it's a human that reviews the responses, I would guess that the scale of these wouldn't reach past 100s of comments, so these files wouldn't ultimately end up huge.

The reason I say this is because I would suspect that humans would not be the ones to then go and read in all of the reviews + process them, so I'd prefer we not export a function mostly for the coding agent's usage. Instead, that format that contains both the turns and the reviews could be document with a few-liner in the trajectory_review() docs that gets the agent most of the way there.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Garrick thinks we should probably have a function like this. He also suggested maybe this ends up being a directory of markdown files so that they're super agent-readable (whether that's immediately what they become or get post-processed into after this intermediate state)

@skaltman skaltman Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like Garrick's idea, and I think regardless of format, the review writing and ingesting process needs a second look. For now:

  • I removed trajectory_reviews_read() for the reason you stated, and because the trajectory review format may change. It's not needed to read in the trajectories, so this doesn't result in any loss of functionality.
  • I did not change the review jsonl format to include the turns because the format may change and I am also a bit hesitant to duplicate that data (but could definitely be convinced that this isn't a problem).
  • I can plan to revisit the review log format for v2.

How does that sound?

Comment thread R/trajectory-timeline.R Outdated
Comment thread R/trajectories.R
Comment thread inst/www/commons-viewer/commons-viewer.css Outdated
Comment thread R/trajectory-review.R Outdated
Comment thread R/trajectory-review.R
@simonpcouch simonpcouch linked an issue Aug 4, 2026 that may be closed by this pull request
@simonpcouch

simonpcouch commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Feedback from Paul & Garrick:

  • Trajectory is good, no need to rename
  • Trust level might need some interface other than a selector
  • The Conversation vs. Question picker is confusing. What does it mean to be in one tab or another?
  • Should the timeline plot instead be a series of stacked bars?
  • Maybe the conversation view should be full-height and then the plot becomes the top of the sidebar that the "Notes for Question n" currently lives in
  • Should there be a way to remove / edit existing notes?

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.

Viewing trajectories

2 participants