Skip to content

Hallucination filtering Phases 2+3 — confidence-gated full mode + WhisperKit decode knobs#102

Merged
kiki830621 merged 3 commits into
mainfrom
idd/100-101-hallucination-phase23
Jul 16, 2026
Merged

Hallucination filtering Phases 2+3 — confidence-gated full mode + WhisperKit decode knobs#102
kiki830621 merged 3 commits into
mainfrom
idd/100-101-hallucination-phase23

Conversation

@kiki830621

Copy link
Copy Markdown
Member

Cluster PR: Refs #100, Refs #101 (same-file group — shared WhisperKitEngine/TranscribeOptions/CLI surface; sequential commits per issue).

#100--hallucination-filter full (afe0e66)

RawSegment/TranscriptSegment carry Whisper's per-segment noSpeechProb/compressionRatio (nil-default; WhisperKit populates). full = denylist + the canonical joint silence rule (noSpeechProb > 0.6 AND avgLogprob < -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 with parsing: .unconditional + a regression test that parses the real command (test target now links the executable target). chunkingStrategy deferred 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.

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
kiki830621 marked this pull request as ready for review July 16, 2026 15:49
@kiki830621
kiki830621 merged commit b51c4dd into main Jul 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant