Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/semble/ranking/boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
# Fraction of max_score added to each file's top chunk, scaled by its aggregate candidate score.
_FILE_COHERENCE_BOOST_FRAC = 0.2

_ALPHA_SYMBOL = 0.3 # lean BM25 for exact keyword matching
_ALPHA_SYMBOL = 0.0 # BM25 only: exact identifier lookups gain nothing from the dense list
_ALPHA_NL = 0.5 # balanced semantic + BM25

# Common English stopwords excluded from file-stem matching for NL queries.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_rerank_topk_demotes_penalised_paths(penalised_path: str) -> None:
("query", "alpha_in", "expected"),
[
("MyService", 0.7, 0.7), # explicit value returned as-is
("MyService", None, 0.3), # symbol query → _ALPHA_SYMBOL
("MyService", None, 0.0), # symbol query → _ALPHA_SYMBOL
("how does routing work", None, 0.5), # NL query → _ALPHA_NL
],
)
Expand Down