-
Notifications
You must be signed in to change notification settings - Fork 0
Add --llm-reduce: one LLM prompt over all batch-transcribe results #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1276bd7
Design spec: --llm-reduce map-reduce step for batch transcribe
alexkroman-assembly 761fd53
Plan: --llm-reduce map-reduce step for batch transcribe
alexkroman-assembly e1d7372
feat(transcribe): plumb --llm-reduce flag as data
alexkroman-assembly 4c95030
feat(transcribe): single-source --llm-reduce extends the chain
alexkroman-assembly 55cde54
feat(transcribe): batch --llm-reduce aggregates results to stdout
alexkroman-assembly c2a04fa
docs(transcribe): document --llm-reduce and the reduce NDJSON event
alexkroman-assembly 2c00d3d
test: add llm_reduce to TranscribeOptions seam defaults
alexkroman-assembly b51a9b7
test: use explicit replace kwargs for mypy in reduce seam test
alexkroman-assembly 1158455
test: regenerate t-alias help snapshot for --llm-reduce
alexkroman-assembly bb6ce6e
test: cover reduce helper edge branches (empty input, status skip)
alexkroman-assembly 11a47c9
refactor(transcribe): make _progress_table reduce_active explicit
alexkroman-assembly 7d722a9
fix(transcribe): skip --llm-reduce call when there is nothing to reduce
alexkroman-assembly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The llm.run_chain call receives transcript_text assembled from user transcripts; do not send unsanitized user transcripts to external services without sanitization or explicit opt-in.
Details
✨ AI Reasoning
The new _run_reduce calls llm.run_chain(api_key, transform.reduce_prompts, transcript_text=combined, ...). The combined string is constructed from user transcripts (see _gather_reduce_inputs) and is passed unchanged as transcript_text to an external LLM-Gateway. This is effectively logging/exfiltrating user-controlled content to a third party and may leak PII or otherwise sensitive data if not sanitized or consented to.
🔧 How do I fix it?
Keep sensitive data such as emails, passwords, and tokens out of logs. When logging values tied to a user, prefer a safe identifier like a user ID over the raw input, and strip line breaks from any user-provided text you do log.
Reply
@AikidoSec feedback: [FEEDBACK]to get better review comments in the future.Reply
@AikidoSec ignore: [REASON]to ignore this issue.More info