Repository navigation
feat(youtube): fix the video analysis prompt, add a summary mode - #15
Merged
Merged
Conversation
The video preset mixed two link formats: it asked for `[HH:MM:SS](URL?t=Ns)` while the template is `watch?v=ID&t=Ns`, so a model following the example wrote a second `?` and broke the jump-to-moment link. It also called itself a summary while the bot sells it as the analysis, and capped chunks at 35k tokens, which split any video past ~40 minutes into map-reduce fragments. - video (v2): an analysis - topic and the speaker's position, claims with the arguments behind each, how the argument holds together (without fact-checking), numbers, quotes, moments worth watching. One explicit link example; chunk cap 90k (a two-hour transcript fits, still under low TPM tiers); output budget 8k. - video_summary (new): a retelling in order for someone who won't watch - what it's about, part by part with timestamps, takeaways, whether it's worth watching anyway. - Bot YouTube panel gets a Summary button (Y_SUM); the CLI picker a Summary row. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019axffqQzzXeAQWXNrH2xpr
maxbolgarin
force-pushed
the
claude/cool-einstein-qjmr6y
branch
from
October 10, 2026 10:12
4574a73 to
ace46f9
Compare
|
🎉 This PR is included in version 1.9.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
videopreset: problems found[HH:MM:SS](URL?t=Ns), but the link template iswatch?v=ID&t=Ns. A model that followed the example wrote a second?, which breaks the link.max_chunk_input_tokens: 35000split anything past ~40 minutes into map-reduce fragments, so an argument was summarized in pieces.What changed
videov2 is an analysis. It covers:The prompt now gives one explicit link example. The chunk cap is 90k, so a two-hour transcript (~50-60k tokens) fits in one call and the cap still stays under the low-TPM guard that
test_video_preset_has_chunk_cappins. The output budget is 8k.New
video_summarypreset (hidden). A retelling in order for someone who won't watch: what it's about, the video part by part with a timestamp per part, takeaways, and whether it's worth watching anyway.Surfaces.
Y_SUM), which runs the existing single-item path with a preset override, like Fact-check.SUMMARY_SENTINEL).--preset video_summaryalso works.Docs:
docs/bot.md,docs/sources.md,presets/README.md.Related issue
n/a
Test plan
uv run pytest -q(2659 passed)uv run ruff check .uv run ruff format --check .tests/test_video_presets.pychecks:&t=, neverURL?t=;video_summary.Checklist
CLAUDE.mdif architecture / invariants changed (n/a)🤖 Generated with Claude Code
https://claude.ai/code/session_019axffqQzzXeAQWXNrH2xpr
Generated by Claude Code