Commit a5e3434
Fix score preservation in chat sources
Preserve similarity scores from ChunkSource objects when enriching
sources via batch_retrieve_chunks. Previously, scores were lost
when get_chunks_by_id returned hardcoded 0.0 scores.
- Create score mapping from original ChunkSource objects
- Apply preserved scores to retrieved chunks
- Sort chunks by score descending for consistent relevance ordering
Fixes issue where chat page showed 0.0 scores while search page
showed correct similarity scores.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c9d4381 commit a5e3434
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
566 | 584 | | |
567 | 585 | | |
568 | 586 | | |
| |||
0 commit comments