Commit 834fbb2
committed
Normalize cosine similarity to [0,1] range
- Vector search now normalizes cosine similarity from [-1,1] to [0,1]
- Cache get also normalized to match
- Fixes threshold comparisons (0.85-0.9 now meaningful)
- Prevents cache miss due to similarity range mismatch1 parent 93b2655 commit 834fbb2
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2283 | 2283 | | |
2284 | 2284 | | |
2285 | 2285 | | |
| 2286 | + | |
| 2287 | + | |
2286 | 2288 | | |
2287 | 2289 | | |
2288 | 2290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| 597 | + | |
| 598 | + | |
597 | 599 | | |
598 | 600 | | |
599 | 601 | | |
| |||
0 commit comments