feat(retrieval): 实现 Embedding/Vector/RRF/Reranker 混合检索引擎

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
yxx
2026-08-27 19:21:01 +08:00
co-authored by Claude
parent d4b472b009
commit 02bb38bb1d
7 changed files with 396 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
"""跨层共享的常量。
放在这里是为了让 database(建向量表)与 retrieval(生成向量)共享同一个维度值,
避免二者各自硬编码导致不一致。真实 BGE-M3 接入后把维度改为 1024 并重建向量索引即可。
"""
# 轻量哈希向量的维度;vec0 虚拟表建表时按此维度固定列宽。
EMBEDDING_DIM = 128