fix: harden post-correct prompts and add overlap drift guard
This commit is contained in:
@@ -185,3 +185,12 @@ The project now features a high-performance, Apple Silicon-optimized pipeline th
|
||||
- When a probable speaker switch is detected, the current buffered caption line is force-flushed early instead of waiting only for silence.
|
||||
- Added speaker-state resets on watchdog/hallucination/silence reset paths to avoid stale identity drift.
|
||||
- **Outcome:** Users can opt into faster caption segmentation at speaker boundaries while keeping default behavior unchanged.
|
||||
|
||||
## Phase 23: Prompt Hardening + Anti-Drift Guardrails
|
||||
- **Goal:** Reduce semantic drift in LLM post-correction and merge decisions.
|
||||
- **Approach:**
|
||||
- Rewrote post-correction prompt with strict "current line only" and "if uncertain, keep original" constraints.
|
||||
- Expanded post-correction context to up to two previous lines but marked as reference-only.
|
||||
- Added token-overlap acceptance guard (`--post-correct-min-overlap`) to reject LLM rewrites that diverge too far from source text.
|
||||
- Updated merge-decider prompt to stricter JSON behavior and added overlap-based fallback to heuristic merge.
|
||||
- **Outcome:** Improved protection against context bleed (e.g., replacing current line with prior sentence) while keeping optional LLM improvements.
|
||||
|
||||
Reference in New Issue
Block a user