Skip to content

Commit a896813

Browse files
Frank Guoclaude
andcommitted
fix: rebalance hybrid scoring weights to 0.3/0.3/0.4
Adjust 3-way weights from BM25:0.3/LSA:0.2/Nomic:0.5 to BM25:0.3/LSA:0.3/Nomic:0.4 for a more balanced hybrid mix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent da4574b commit a896813

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/rekal/cli/recall.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const (
2424

2525
// 3-way weights (full hybrid with nomic).
2626
bm25Weight3Way = 0.3
27-
lsaWeight3Way = 0.2
28-
nomicWeight3Way = 0.5
27+
lsaWeight3Way = 0.3
28+
nomicWeight3Way = 0.4
2929
)
3030

3131
// RecallFilters holds the search parameters for the recall command.

docs/spec/command/recall.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ See [preconditions.md](../preconditions.md): git repo, init done. If the index i
3333
2. **LSA search** — Rebuild LSA model from session content, project query into embedding space, compute cosine similarity against stored session embeddings. Non-fatal if LSA fails.
3434
3. **Nomic search** — Deep semantic similarity using nomic-embed-text embeddings. Loads stored nomic vectors from index DB, embeds query with "search_query: " prefix, computes cosine similarity. Non-fatal if nomic is unavailable (unsupported platform) or fails.
3535
4. **Group by session** — Pick the best-scoring turn per session.
36-
5. **Normalize and combine** — Normalize all scores to [0,1]. When nomic is available: 3-way scoring (BM25: 0.3, LSA: 0.2, Nomic: 0.5). When nomic is unavailable: 2-way fallback (BM25: 0.4, LSA: 0.6).
36+
5. **Normalize and combine** — Normalize all scores to [0,1]. When nomic is available: 3-way scoring (BM25: 0.3, LSA: 0.3, Nomic: 0.4). When nomic is unavailable: 2-way fallback (BM25: 0.4, LSA: 0.6).
3737
6. **Apply filters** — Actor, author, commit, file regex — all ANDed.
3838
7. **Return top N** — Sorted by hybrid score descending.
3939

0 commit comments

Comments
 (0)