Improve MemFuse recall via hybrid ranking and candidate generation.

Add RRF fusion with English word-level lexical scoring, tiered keyword fetch, and vector margin expansion (0.15/200) to fix pre-rank truncation; wire DashScope embedding bench path and update baseline to 28.8% recall@20.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-09-02 13:41:12 +08:00
parent b923e54eff
commit fb3a442e73
11 changed files with 1436 additions and 97 deletions
+21
View File
@@ -0,0 +1,21 @@
import { loadMemindEnvFiles } from './memind-runtime-profile.mjs';
loadMemindEnvFiles(process.cwd());
process.env.MEMIND_EMBEDDING_PROVIDER =
process.env.MEMIND_EMBEDDING_PROVIDER ?? 'dashscope';
process.env.MEMIND_EMBEDDING_FROM_LLM_KEYS =
process.env.MEMIND_EMBEDDING_FROM_LLM_KEYS ?? '1';
process.env.MEMIND_EMBEDDING_MODEL =
process.env.MEMIND_EMBEDDING_MODEL ?? 'text-embedding-v3';
export {
embedText,
embedQuery,
prefetchEmbedTexts,
probeEmbeddingAvailability,
flushEmbeddingCache,
__resetEmbeddingCacheForTests,
} from './embed-memory-v2-openai-compat.mjs';
export { default } from './embed-memory-v2-openai-compat.mjs';