mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-27 21:05:34 +00:00
fix(memory): default context_min_score to 0.0 so FTS5 BM25 results aren't dropped on small corpora (#286)
SQLite FTS5 BM25 scores collapse toward zero on small corpora — when every indexed document contains the query term, IDF approaches zero so scores return ~1e-6. The default context_min_score = 0.1 silently filters out every result before injection, so memory is stored but never reaches the model on a fresh install. Lowering both defaults to 0.0 lets retrieved context flow through; users who want strict filtering can still set [memory] context_min_score in config.toml. Closes #262
This commit is contained in:
@@ -764,7 +764,7 @@ class StorageConfig:
|
||||
default_backend: str = "sqlite"
|
||||
db_path: str = str(DEFAULT_CONFIG_DIR / "memory.db")
|
||||
context_top_k: int = 5
|
||||
context_min_score: float = 0.1
|
||||
context_min_score: float = 0.0
|
||||
context_max_tokens: int = 2048
|
||||
chunk_size: int = 512
|
||||
chunk_overlap: int = 64
|
||||
|
||||
@@ -16,7 +16,7 @@ class ContextConfig:
|
||||
|
||||
enabled: bool = True
|
||||
top_k: int = 5
|
||||
min_score: float = 0.1
|
||||
min_score: float = 0.0
|
||||
max_context_tokens: int = 2048
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user