arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.15484cs.IR
收藏

vstash:基于自适应融合的本地优先混合检索LLM代理

vstash: Local-First Hybrid Retrieval with Adaptive Fusion for LLM Agents

Jayson Steffens

AI总结:

vstash通过自适应融合和自监督嵌入优化,提升LLM代理在多数据集上的检索性能,实现NDCG@10的显著提升。

摘要:

我们提出了vstash,一种本地优先的文档记忆系统,结合向量相似性搜索和全文关键词匹配,通过反向排名融合(RRF)和自适应每查询IDF加权。所有数据存储在一个SQLite文件中,使用sqlite-vec进行近邻搜索和FTS5进行关键词匹配。我们有四个主要贡献:(1)通过混合检索分歧进行自监督嵌入优化;(2)自适应RRF提升NDCG@10;(3)后RRF评分的负结果;(4)生产级子系统具有完整性检查、模式版本控制和排名诊断。搜索延迟保持在20.9毫秒,NDCG稳定。细调模型发布为Stffens/bge-small-rrf-v2。所有代码、数据和实验均开源。

英文摘要:

We present **vstash**, a local-first document memory system that combines vector similarity search with full-text keyword matching via Reciprocal Rank Fusion (RRF) and adaptive per-query IDF weighting. All data resides in a single SQLite file using sqlite-vec for approximate nearest neighbor search and FTS5 for keyword matching. We make four primary contributions. **(1)** Self-supervised embedding refinement via hybrid retrieval disagreement: across 753 BEIR queries on SciFact, NFCorpus, and FiQA, 74.5% produce top-10 disagreement between vector-heavy (vec=0.95, fts=0.05) and FTS-heavy (vec=0.05, fts=0.95) search (per-dataset rates 63.4% / 73.4% / 86.7%, Section 5.2), providing a free training signal without human labels. Fine-tuning BGE-small (33M params) with MultipleNegativesRankingLoss on 76K disagreement triples improves NDCG@10 on all 5 BEIR datasets (up to +19.5% on NFCorpus vs. BGE-small base RRF, Table 6). On 3 of 5 datasets, under different preprocessing, the tuned 33M-parameter pipeline matches or exceeds published ColBERTv2 results (110M params) and an untrained BGE-base (110M); on FiQA and ArguAna it underperforms ColBERTv2 (Section 5.5). **(2)** Adaptive RRF with per-query IDF weighting improves NDCG@10 on all 5 BEIR datasets versus fixed weights (up to +21.4% on ArguAna), achieving 0.7263 on SciFact with BGE-small. **(3)** A negative result on post-RRF scoring: frequency+decay, history-augmented recall, and cross-encoder reranking all failed to improve NDCG. **(4)** A production-grade substrate with integrity checking, schema versioning, ranking diagnostics, and a distance-based relevance signal validated on 50,425 relevance-judged queries across the 5 BEIR datasets. Search latency remains 20.9 ms median at 50K chunks with stable NDCG. The fine-tuned model is published as `Stffens/bge-small-rrf-v2` on HuggingFace. All code, data, and experiments are open-source.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑