Repository navigation
Let the assistant read whole transcripts before choosing a clip - #24
Merged
Merged
Conversation
A search shows one moment per video, a single transcriber segment that often starts or ends mid-sentence, and the assistant had nothing else to cut from. It now has read_transcript, which reads a GAM transcript as whole sentences with their times (paged for long videos), and the prompt tells it to search for candidates, read them, then cut the passage that best makes the point. A hit's automatic trim grows to the whole sentences it falls in, padded without reaching into the next one, and a hit says when more of the video matched (GAM's other_matches). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1geD2rbaPtRa9JcN8sZH8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When the assistant picked clips, all it saw was the search result: one moment per video, the best match for its query words (a single transcriber segment plus a 240-character snippet). Transcriber segments end wherever the speaker pauses, often mid-sentence, so the cuts started and stopped mid-thought. Any trim the assistant wrote itself was a guess, because it had never seen the rest of the transcript.
What changes
read_transcript(gam_id, start?, end?)is a new assistant tool that calls GAM's existingGET /api/assets/{id}/transcript.[start-end] text.startto read from.set_visualwith atrimtaken from the transcript lines.more_momentson search hits passes through GAM'sother_matches, so the assistant knows the video matched in other places too.No GAM changes are needed.
Testing
pytest -q: 712 passed. New tests cover sentence regrouping, speaker labels, paging and caching, untranscribed and unknown assets, hand-edited segments, sentence-snapped trims andmore_moments.npm test && npm run build: 187 passed and the build succeeds (no frontend changes).Generated by Claude Code