Commit fd67a93
fix chunk overlap and source quote hallucination guard
chunk overlap: carry the last 2 messages (user-assistant exchange pair)
instead of just the last message. A single "yeah" carried without its
preceding question gives zero context; the pair lets the model resolve
short confirmations correctly across chunk boundaries.
source quote guard: replace exact substring check with word-overlap
(words >3 chars). Catches minor paraphrases ("I use" vs "we use") that
would pass as hallucinations under exact matching, while still rejecting
fabricated quotes with no word overlap to the actual conversation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2b5a4b1 commit fd67a93
1 file changed
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
634 | 637 | | |
635 | | - | |
636 | | - | |
| 638 | + | |
637 | 639 | | |
638 | 640 | | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
644 | 647 | | |
645 | 648 | | |
646 | 649 | | |
| |||
1126 | 1129 | | |
1127 | 1130 | | |
1128 | 1131 | | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1132 | 1139 | | |
1133 | 1140 | | |
1134 | 1141 | | |
| |||
0 commit comments