How-toSelected

Milvus 3.0 教程:在线搜索应用中无缝更换 embedding 模型

Why we picked it

Milvus 官方手把手教你换 embedding 模型不停机,旧向量照常能搜,还带 Recall@10 实测数据,做检索的可以直接照抄流程。

Milvus 发布教程讲解如何在不停机的搜索应用中更换 embedding 模型。核心做法是在同一 collection 中同时保留新旧两套向量:先新增向量字段和索引,用已有文档 ID 回填数据,再在同一批查询上评估两个模型的表现。文中 SciFact 示例里,从 BGE-small-en-v1.5 升级到 BGE-base-en-v1.5,300 条测试查询的 Recall@10 从 0.8362 提升到 0.8742。教程还包括逐步切换流量和稳定后删除旧字段的完整步骤。

Original · Milvus

To change the embedding model in a live search app, you need to build new document vectors while the old ones remain searchable. 𝗠𝗶𝗹𝘃𝘂𝘀 𝟯.𝟬 𝗹𝗲𝘁𝘀 𝘆𝗼𝘂 𝗸𝗲𝗲𝗽 𝗯𝗼𝘁𝗵 𝘀𝗲𝘁𝘀 𝗼𝗳 𝘃𝗲𝗰𝘁𝗼𝗿𝘀 𝗶𝗻 𝘁𝗵𝗲 𝘀𝗮𝗺𝗲 𝗰𝗼𝗹𝗹𝗲𝗰𝘁𝗶𝗼𝗻 𝗱𝘂𝗿𝗶𝗻𝗴 𝘁𝗵𝗲 𝘁𝗿𝗮𝗻𝘀𝗶𝘁𝗶𝗼𝗻. 𝗢𝘂𝗿 𝗻𝗲𝘄 𝘄𝗮𝗹𝗸𝘁𝗵𝗿𝗼𝘂𝗴𝗵 𝗰𝗼𝘃𝗲𝗿𝘀 𝘁𝗵𝗲 𝗽𝗿𝗼𝗰𝗲𝘀𝘀: 1. Add the new vector field and index. 2. Backfill it using existing document IDs, while keeping new and updated documents in sync. 3. Check that the vectors and index are ready, then evaluate both models on the same queries. 4. Shift traffic gradually. Pair each query model with the field containing its document vectors. 5. After the rollout is stable and old requests have finished, remove the old field. In the SciFact example, upgrading from BGE-small-en-v1.5 to BGE-base-en-v1.5 raised Recall @10 from 0.8362 to 0.8742 across 300 test queries. Your resul milvus.io/blog/milvus-3-… data, which is why the evaluation and rollback steps matter. Read the walkthrough: https://t.co/gR0JssgulR 💬 0 🔄 0 ❤️ 1 👀 95 ⚡