feat(C-3): 旁白模型 A/B 比對工具 + 遷移提案(offline 前置,實跑=本機開額度)#79
Merged
Conversation
劉老師 2026-06-15 開額度。本 routine 環境無 GEMINI_API_KEY(key 在本機、不該帶進 session),品質 A/B 須在本機跑,故備好可跑的工具 + 切換步驟: - tools/ab_narration.py:同份簡報同幾頁,舊模型 vs 候選模型各生一次旁白並排輸出。 只跑旁白生成(不跑 TTS/ffmpeg/完整 render = 省額度),注入不同 model 呼叫真實 narrate_page_with_gemini(prompt/retry/thinking_budget=0 與正式線一致、不漂移)。 - slide_ingest.narrate_page_with_gemini 加選填 model 參數(預設仍 MODEL,pipeline 零影響)。 - docs/C3_NARRATION_AB_PROPOSAL.md:怎麼跑 / 決策準則 / 驗過怎麼切(resolve text.fast) + rollback(設定頁覆寫回 2.5)/ 3 個待拍板開放問題。 - tests/test_ab_narration.py 11 測(全 fake client 不打 API)。 本機全套 2702 passed(剩 1 QR 像素為容器缺 Noto CJK 字型假象,CI 權威)。
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.
做什麼
劉老師 2026-06-15 對 C-3(旁白模型遷 2.5→3.x)開額度。但本 routine 環境沒有
GEMINI_API_KEY(你的 key 在你本機,且不該把 key 帶進 session),所以品質 A/B 必須在你本機開額度跑。這個 PR 把「能跑的工具 + 切換步驟」備好(offline 前置):tools/ab_narration.py— A/B 比對工具:對同一份簡報的同幾頁,用舊模型 vs 候選模型各生一次旁白並排輸出成 Markdown 報告。model呼叫真實的narrate_page_with_gemini(prompt、三段式 retry、thinking_budget=0、_clean_narration全與正式線一致)→ 不會 prompt 漂移。slide_ingest.py—narrate_page_with_gemini加選填model參數(預設仍MODEL,正式 pipeline 零影響),讓 A/B 能注入不同模型。docs/C3_NARRATION_AB_PROPOSAL.md— 提案:為什麼動 / 怎麼在你本機跑(指令)/ 決策準則表 / 驗過怎麼切(chokepoint 改走resolve("text.fast"))+ rollback(設定頁覆寫回 2.5、免改 code)/ 3 個待拍板開放問題。tests/test_ab_narration.py— 11 測(全 fake client,不打 API)。docs/PRODUCT_READINESS.mdC-3 →[~]記進度。怎麼測
在你本機設好
GEMINI_API_KEY後:python tools/ab_narration.py 你的簡報.pdf --pages 1,3,5 \ --models gemini-2.5-flash,gemini-3.5-flash --out ab_narration_report.md挑有代表性的幾頁(純文字 + 含公式/圖表 + 章節銜接)即可,不必整份跑。看
ab_narration_report.md兩欄並排比品質,再決定切不切。CI(裝了字型)為權威;本機全套 2702 passed(剩 1 QR 像素為容器缺 Noto CJK 字型假象)。
Reviewer 決策點(待你拍板,見 proposal §6)
resolve()。text.fastvs 新增narration角色 ③ 候選模型清單。Generated by Claude Code