Hallucination filtering Phases 2+3 — confidence-gated full mode + WhisperKit decode knobs#102
Merged
Merged
Conversation
RawSegment/TranscriptSegment carry Whisper's per-segment noSpeechProb and compressionRatio (nil-default; WhisperKit populates, other backends leave nil). HallucinationFilterMode gains .full: denylist plus the canonical joint silence rule (noSpeechProb > 0.6 AND avgLogprob < -1.0) and the repetition rule (compressionRatio > 2.4). nil signals never trip a rule, so full degrades to denylist per backend with no branching. Output formats unchanged — the signals stay filter-internal. Refs #100
… logprob thresholds (#101) TranscribeOptions carries three optional thresholds (nil = WhisperKit's own defaults, byte-for-byte pre-#101 behavior); makeDecodeOptions applies them only when set; CLI exposes --no-speech-threshold / --compression-ratio-threshold / --logprob-threshold, help-marked '(WhisperKit only)' — other backends never read them. chunkingStrategy deliberately deferred (issue residue). README documents both the full filter mode and the decode knobs. Refs #101
…ope docs (verify #101) HIGH: ArgumentParser's default strategy rejects a leading-dash value, and the log-prob domain is all-negative — the documented '--logprob-threshold -1.0' failed with 'Missing value' across the flag's entire meaningful range. parsing: .unconditional fixes the space form (regression-tested by parsing the real Transcribe command; the test target now links the executable target). Also: the deterministic-decode interaction is documented in the flag help + README (doc-promise drift), and README notes the knobs are CLI-only for now (MCP/GUI scope note). Refs #101
kiki830621
marked this pull request as ready for review
July 16, 2026 15:49
This was referenced Jul 16, 2026
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.
Cluster PR: Refs #100, Refs #101 (same-file group — shared WhisperKitEngine/TranscribeOptions/CLI surface; sequential commits per issue).
#100 —
--hallucination-filter full(afe0e66)RawSegment/TranscriptSegmentcarry Whisper's per-segmentnoSpeechProb/compressionRatio(nil-default; WhisperKit populates).full= denylist + the canonical joint silence rule (noSpeechProb > 0.6ANDavgLogprob < -1.0) + repetition rule (compressionRatio > 2.4). nil signals never trip → per-backend degradation to denylist for free. Output formats unchanged.#101 — decode-param knobs (8ba9bbd + 01e90c8)
--no-speech-threshold/--compression-ratio-threshold/--logprob-threshold(WhisperKit only; nil = stock defaults, byte-for-byte). Verify caught a real HIGH: ArgumentParser rejects leading-dash values and the log-prob domain is all-negative — the flag was unusable in space form across its whole meaningful range; fixed withparsing: .unconditional+ a regression test that parses the real command (test target now links the executable target).chunkingStrategydeferred per issue residue.Verification
Checklist
🤖 Generated by /idd-all (batch mode). Do NOT add a GitHub close trailer — manual /idd-close per issue after merge.