[{"data":1,"prerenderedAt":1040},["ShallowReactive",2],{"article-alternates":3,"article-\u002Fen\u002Fai\u002Fembedding-drift-maintaining-vector-dbs-production":12},{"i18nKey":4,"paths":5},"ai-006-2026-06",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11},"\u002Fde\u002Fai\u002Fembedding-drift-vektordb-produktionsumgebung","\u002Fen\u002Fai\u002Fembedding-drift-vector-database-maintenance","\u002Fes\u002Fai\u002Fmigracion-embedding-vector-db","\u002Ffr\u002Fai\u002Fembedding-drift-vekt","\u002Fit\u002Fai\u002Fgestione-drift-embedding-database-vettoriali-produzione","\u002Fru\u002Fai\u002Fembedding-drift-vector-db-production",{"_path":13,"_dir":14,"_draft":15,"_partial":15,"_locale":16,"title":17,"description":18,"publishedAt":19,"modifiedAt":19,"category":14,"i18nKey":4,"tags":20,"readingTime":26,"author":27,"body":28,"_type":1034,"_id":1035,"_source":1036,"_file":1037,"_stem":1038,"_extension":1039},"\u002Fen\u002Fai\u002Fembedding-drift-maintaining-vector-dbs-production","ai",false,"","Embedding Drift: Maintaining Vector Databases in Production","Managing embedding model changes in production vector databases: re-indexing strategies, migration cost tradeoffs, and zero-downtime transition architecture.","2026-06-27",[21,22,23,24,25],"vector-database","embedding-drift","mlops","rag","model-migration",8,"Roibase",{"type":29,"children":30,"toc":1021},"root",[31,39,46,68,73,78,84,89,100,105,115,125,130,137,149,406,411,417,422,549,561,576,581,586,591,597,609,656,661,680,685,691,696,881,886,892,904,909,925,931,936,989,994,999,1005,1010,1015],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36],{"type":37,"value":38},"text","When you change embedding models while running a RAG system in production, your vector database becomes incoherent. Old embeddings can't be compared with new query vectors — search results collapse, semantic accuracy drops. Companies typically defer this problem through model freeze: \"a new model shipped but migration costs too much, we'll stay put.\" Yet embedding drift is inevitable — model providers release new versions every 6-9 months, accuracy gaps reach 8-12% levels. Staying costs technical debt; upgrading costs re-indexing. This article shows how to minimize that cost.",{"type":32,"tag":40,"props":41,"children":43},"h2",{"id":42},"how-fast-does-embedding-drift-actually-occur",[44],{"type":37,"value":45},"How Fast Does Embedding Drift Actually Occur",{"type":32,"tag":33,"props":47,"children":48},{},[49,51,58,60,66],{"type":37,"value":50},"OpenAI announced in December 2024 a ",{"type":32,"tag":52,"props":53,"children":55},"code",{"className":54},[],[56],{"type":37,"value":57},"text-embedding-3-small",{"type":37,"value":59}," update that improved MTEB score average by 3.7%. Cohere released ",{"type":32,"tag":52,"props":61,"children":63},{"className":62},[],[64],{"type":37,"value":65},"embed-v4",{"type":37,"value":67}," in April 2025, gaining 11% on multilingual retrieval. Voyage AI expanded domain-specific models in June 2025. Average drift velocity: your production model falls 6-10% behind the benchmark 180 days after deployment.",{"type":32,"tag":33,"props":69,"children":70},{},[71],{"type":37,"value":72},"This gap hits user experience directly. E-commerce search: 5% retrieval accuracy drop causes 2-3% conversion loss. Support chatbots: 10% wrong article retrieval rate increases ticket escalation by 8%. Ignoring drift looks stable short-term; it erodes competitive edge long-term.",{"type":32,"tag":33,"props":74,"children":75},{},[76],{"type":37,"value":77},"Worse: embedding dimension shifts. Some model updates preserve dimensions (1536 → 1536); others change them (768 → 1024). The second scenario forces DB schema migration — not just re-embedding but index reconstruction. Without planned downtime, production breaks.",{"type":32,"tag":40,"props":79,"children":81},{"id":80},"re-indexing-strategies-blue-green-vs-rolling-vs-lazy",[82],{"type":37,"value":83},"Re-Indexing Strategies: Blue-Green vs Rolling vs Lazy",{"type":32,"tag":33,"props":85,"children":86},{},[87],{"type":37,"value":88},"Three fundamental strategies exist; each trades cost\u002Fdowntime\u002Fcomplexity differently.",{"type":32,"tag":33,"props":90,"children":91},{},[92,98],{"type":32,"tag":93,"props":94,"children":95},"strong",{},[96],{"type":37,"value":97},"Blue-Green Migration:",{"type":37,"value":99}," Build a completely separate vector index for the new model, test it, switch via DNS\u002Frouting.",{"type":32,"tag":33,"props":101,"children":102},{},[103],{"type":37,"value":104},"Pros: zero downtime, fast rollback. Cost: database storage and compute 100% duplicate. Example: 50M embeddings × 1536 dims × 4 bytes = ~300GB storage. Blue-green doubles it: 600GB. At cloud provider rates, that's $180-240 extra per month. For large corpora (500M+ embeddings), this becomes economically unsustainable.",{"type":32,"tag":33,"props":106,"children":107},{},[108,113],{"type":32,"tag":93,"props":109,"children":110},{},[111],{"type":37,"value":112},"Rolling Re-Index:",{"type":37,"value":114}," Partition corpus into batches (e.g., 10M\u002Fbatch), re-embed each batch with the new model, upsert to same DB. Meanwhile, queries can return both old and new vectors — requires hybrid search. Advantage: no storage duplication. Disadvantage: long migration window (50M embeddings, 1M batches, 2 hours per batch → 100 hours), query consistency drops during that period.",{"type":32,"tag":33,"props":116,"children":117},{},[118,123],{"type":32,"tag":93,"props":119,"children":120},{},[121],{"type":37,"value":122},"Lazy Migration:",{"type":37,"value":124}," Re-embed only queried chunks; coverage grows over time. When a user retrieves a document, that doc gets re-computed with the new model and cached. Advantage: hot data migrates fast, cold data has zero cost. Disadvantage: migration never completes fully, coverage plateaus at 70-80%. Also query latency spikes: first access incurs embed + insert overhead.",{"type":32,"tag":33,"props":126,"children":127},{},[128],{"type":37,"value":129},"Roibase uses a hybrid approach in production: blue-green for critical corpus (last 90 days, top 20% accessed), rolling batches for remainder over 2 weeks. This reduced costs by 40%, cut migration time from 10 to 4 days.",{"type":32,"tag":131,"props":132,"children":134},"h3",{"id":133},"maintaining-query-consistency-during-migration",[135],{"type":37,"value":136},"Maintaining Query Consistency During Migration",{"type":32,"tag":33,"props":138,"children":139},{},[140,142,147],{"type":37,"value":141},"In rolling migration, when DB contains both old and new embeddings, query accuracy suffers. Solution: ",{"type":32,"tag":93,"props":143,"children":144},{},[145],{"type":37,"value":146},"multi-vector querying",{"type":37,"value":148},". Encode the query in BOTH old and new models, search each vector, combine results. Pseudocode:",{"type":32,"tag":150,"props":151,"children":155},"pre",{"className":152,"code":153,"language":154,"meta":16,"style":16},"language-python shiki shiki-themes github-dark","def hybrid_search(query_text, k=10):\n    old_vec = old_model.encode(query_text)\n    new_vec = new_model.encode(query_text)\n    \n    old_results = vector_db.search(old_vec, collection=\"docs_old\", top_k=k)\n    new_results = vector_db.search(new_vec, collection=\"docs_new\", top_k=k)\n    \n    # Reciprocal rank fusion\n    combined = reciprocal_rank_fusion([old_results, new_results], k=k)\n    return combined\n","python",[156],{"type":32,"tag":52,"props":157,"children":158},{"__ignoreMap":16},[159,199,217,235,244,297,344,352,361,392],{"type":32,"tag":160,"props":161,"children":164},"span",{"class":162,"line":163},"line",1,[165,171,177,183,188,194],{"type":32,"tag":160,"props":166,"children":168},{"style":167},"--shiki-default:#F97583",[169],{"type":37,"value":170},"def",{"type":32,"tag":160,"props":172,"children":174},{"style":173},"--shiki-default:#B392F0",[175],{"type":37,"value":176}," hybrid_search",{"type":32,"tag":160,"props":178,"children":180},{"style":179},"--shiki-default:#E1E4E8",[181],{"type":37,"value":182},"(query_text, k",{"type":32,"tag":160,"props":184,"children":185},{"style":167},[186],{"type":37,"value":187},"=",{"type":32,"tag":160,"props":189,"children":191},{"style":190},"--shiki-default:#79B8FF",[192],{"type":37,"value":193},"10",{"type":32,"tag":160,"props":195,"children":196},{"style":179},[197],{"type":37,"value":198},"):\n",{"type":32,"tag":160,"props":200,"children":202},{"class":162,"line":201},2,[203,208,212],{"type":32,"tag":160,"props":204,"children":205},{"style":179},[206],{"type":37,"value":207},"    old_vec ",{"type":32,"tag":160,"props":209,"children":210},{"style":167},[211],{"type":37,"value":187},{"type":32,"tag":160,"props":213,"children":214},{"style":179},[215],{"type":37,"value":216}," old_model.encode(query_text)\n",{"type":32,"tag":160,"props":218,"children":220},{"class":162,"line":219},3,[221,226,230],{"type":32,"tag":160,"props":222,"children":223},{"style":179},[224],{"type":37,"value":225},"    new_vec ",{"type":32,"tag":160,"props":227,"children":228},{"style":167},[229],{"type":37,"value":187},{"type":32,"tag":160,"props":231,"children":232},{"style":179},[233],{"type":37,"value":234}," new_model.encode(query_text)\n",{"type":32,"tag":160,"props":236,"children":238},{"class":162,"line":237},4,[239],{"type":32,"tag":160,"props":240,"children":241},{"style":179},[242],{"type":37,"value":243},"    \n",{"type":32,"tag":160,"props":245,"children":247},{"class":162,"line":246},5,[248,253,257,262,268,272,278,283,288,292],{"type":32,"tag":160,"props":249,"children":250},{"style":179},[251],{"type":37,"value":252},"    old_results ",{"type":32,"tag":160,"props":254,"children":255},{"style":167},[256],{"type":37,"value":187},{"type":32,"tag":160,"props":258,"children":259},{"style":179},[260],{"type":37,"value":261}," vector_db.search(old_vec, ",{"type":32,"tag":160,"props":263,"children":265},{"style":264},"--shiki-default:#FFAB70",[266],{"type":37,"value":267},"collection",{"type":32,"tag":160,"props":269,"children":270},{"style":167},[271],{"type":37,"value":187},{"type":32,"tag":160,"props":273,"children":275},{"style":274},"--shiki-default:#9ECBFF",[276],{"type":37,"value":277},"\"docs_old\"",{"type":32,"tag":160,"props":279,"children":280},{"style":179},[281],{"type":37,"value":282},", ",{"type":32,"tag":160,"props":284,"children":285},{"style":264},[286],{"type":37,"value":287},"top_k",{"type":32,"tag":160,"props":289,"children":290},{"style":167},[291],{"type":37,"value":187},{"type":32,"tag":160,"props":293,"children":294},{"style":179},[295],{"type":37,"value":296},"k)\n",{"type":32,"tag":160,"props":298,"children":300},{"class":162,"line":299},6,[301,306,310,315,319,323,328,332,336,340],{"type":32,"tag":160,"props":302,"children":303},{"style":179},[304],{"type":37,"value":305},"    new_results ",{"type":32,"tag":160,"props":307,"children":308},{"style":167},[309],{"type":37,"value":187},{"type":32,"tag":160,"props":311,"children":312},{"style":179},[313],{"type":37,"value":314}," vector_db.search(new_vec, ",{"type":32,"tag":160,"props":316,"children":317},{"style":264},[318],{"type":37,"value":267},{"type":32,"tag":160,"props":320,"children":321},{"style":167},[322],{"type":37,"value":187},{"type":32,"tag":160,"props":324,"children":325},{"style":274},[326],{"type":37,"value":327},"\"docs_new\"",{"type":32,"tag":160,"props":329,"children":330},{"style":179},[331],{"type":37,"value":282},{"type":32,"tag":160,"props":333,"children":334},{"style":264},[335],{"type":37,"value":287},{"type":32,"tag":160,"props":337,"children":338},{"style":167},[339],{"type":37,"value":187},{"type":32,"tag":160,"props":341,"children":342},{"style":179},[343],{"type":37,"value":296},{"type":32,"tag":160,"props":345,"children":347},{"class":162,"line":346},7,[348],{"type":32,"tag":160,"props":349,"children":350},{"style":179},[351],{"type":37,"value":243},{"type":32,"tag":160,"props":353,"children":354},{"class":162,"line":26},[355],{"type":32,"tag":160,"props":356,"children":358},{"style":357},"--shiki-default:#6A737D",[359],{"type":37,"value":360},"    # Reciprocal rank fusion\n",{"type":32,"tag":160,"props":362,"children":364},{"class":162,"line":363},9,[365,370,374,379,384,388],{"type":32,"tag":160,"props":366,"children":367},{"style":179},[368],{"type":37,"value":369},"    combined ",{"type":32,"tag":160,"props":371,"children":372},{"style":167},[373],{"type":37,"value":187},{"type":32,"tag":160,"props":375,"children":376},{"style":179},[377],{"type":37,"value":378}," reciprocal_rank_fusion([old_results, new_results], ",{"type":32,"tag":160,"props":380,"children":381},{"style":264},[382],{"type":37,"value":383},"k",{"type":32,"tag":160,"props":385,"children":386},{"style":167},[387],{"type":37,"value":187},{"type":32,"tag":160,"props":389,"children":390},{"style":179},[391],{"type":37,"value":296},{"type":32,"tag":160,"props":393,"children":395},{"class":162,"line":394},10,[396,401],{"type":32,"tag":160,"props":397,"children":398},{"style":167},[399],{"type":37,"value":400},"    return",{"type":32,"tag":160,"props":402,"children":403},{"style":179},[404],{"type":37,"value":405}," combined\n",{"type":32,"tag":33,"props":407,"children":408},{},[409],{"type":37,"value":410},"This pattern catches query edge cases until migration completes. Performance overhead: 1.4× query latency. Once migration finishes, dual-query shuts down; latency normalizes.",{"type":32,"tag":40,"props":412,"children":414},{"id":413},"cost-tradeoff-compute-vs-storage-vs-downtime",[415],{"type":37,"value":416},"Cost Tradeoff: Compute vs Storage vs Downtime",{"type":32,"tag":33,"props":418,"children":419},{},[420],{"type":37,"value":421},"Migration cost breaks into three components:",{"type":32,"tag":423,"props":424,"children":425},"table",{},[426,455],{"type":32,"tag":427,"props":428,"children":429},"thead",{},[430],{"type":32,"tag":431,"props":432,"children":433},"tr",{},[434,440,445,450],{"type":32,"tag":435,"props":436,"children":437},"th",{},[438],{"type":37,"value":439},"Component",{"type":32,"tag":435,"props":441,"children":442},{},[443],{"type":37,"value":444},"Blue-Green",{"type":32,"tag":435,"props":446,"children":447},{},[448],{"type":37,"value":449},"Rolling",{"type":32,"tag":435,"props":451,"children":452},{},[453],{"type":37,"value":454},"Lazy",{"type":32,"tag":456,"props":457,"children":458},"tbody",{},[459,482,503,526],{"type":32,"tag":431,"props":460,"children":461},{},[462,468,473,477],{"type":32,"tag":463,"props":464,"children":465},"td",{},[466],{"type":37,"value":467},"Compute (re-embed)",{"type":32,"tag":463,"props":469,"children":470},{},[471],{"type":37,"value":472},"1×",{"type":32,"tag":463,"props":474,"children":475},{},[476],{"type":37,"value":472},{"type":32,"tag":463,"props":478,"children":479},{},[480],{"type":37,"value":481},"0.2-0.4×",{"type":32,"tag":431,"props":483,"children":484},{},[485,490,495,499],{"type":32,"tag":463,"props":486,"children":487},{},[488],{"type":37,"value":489},"Storage (duplicate)",{"type":32,"tag":463,"props":491,"children":492},{},[493],{"type":37,"value":494},"2× (temporary)",{"type":32,"tag":463,"props":496,"children":497},{},[498],{"type":37,"value":472},{"type":32,"tag":463,"props":500,"children":501},{},[502],{"type":37,"value":472},{"type":32,"tag":431,"props":504,"children":505},{},[506,511,516,521],{"type":32,"tag":463,"props":507,"children":508},{},[509],{"type":37,"value":510},"Downtime",{"type":32,"tag":463,"props":512,"children":513},{},[514],{"type":37,"value":515},"0",{"type":32,"tag":463,"props":517,"children":518},{},[519],{"type":37,"value":520},"~2% consistency loss",{"type":32,"tag":463,"props":522,"children":523},{},[524],{"type":37,"value":525},"~5% latency spike",{"type":32,"tag":431,"props":527,"children":528},{},[529,534,539,544],{"type":32,"tag":463,"props":530,"children":531},{},[532],{"type":37,"value":533},"Human hours",{"type":32,"tag":463,"props":535,"children":536},{},[537],{"type":37,"value":538},"8-12",{"type":32,"tag":463,"props":540,"children":541},{},[542],{"type":37,"value":543},"20-30",{"type":32,"tag":463,"props":545,"children":546},{},[547],{"type":37,"value":548},"40+",{"type":32,"tag":33,"props":550,"children":551},{},[552,554,559],{"type":37,"value":553},"Sample corpus: 100M embeddings, ",{"type":32,"tag":52,"props":555,"children":557},{"className":556},[],[558],{"type":37,"value":57},{"type":37,"value":560}," ($0.02\u002F1M tokens), average chunk 512 tokens.",{"type":32,"tag":562,"props":563,"children":564},"ul",{},[565,571],{"type":32,"tag":566,"props":567,"children":568},"li",{},[569],{"type":37,"value":570},"Compute: 100M × 512 tokens = 51.2B tokens → $1,024",{"type":32,"tag":566,"props":572,"children":573},{},[574],{"type":37,"value":575},"Storage: 100M × 1536 dims × 4 bytes = 614GB → ~$500\u002Fmonth on Pinecone p2 pods",{"type":32,"tag":33,"props":577,"children":578},{},[579],{"type":37,"value":580},"Blue-green keeping duplicate 1 month: $1,024 + $500 = $1,524. Rolling: $1,024 + $0 = $1,024. Lazy: ~$400 + engineering overhead.",{"type":32,"tag":33,"props":582,"children":583},{},[584],{"type":37,"value":585},"Choice depends on your business. E-commerce can't tolerate downtime → blue-green. Research\u002Fanalytics tolerates consistency loss → rolling. Cash-constrained startup → lazy.",{"type":32,"tag":33,"props":587,"children":588},{},[589],{"type":37,"value":590},"For Roibase: production customer-facing RAG → blue-green. Internal tooling (docs search) → rolling. Cold archive (old case studies) → lazy.",{"type":32,"tag":40,"props":592,"children":594},{"id":593},"model-versioning-and-metadata-tracking",[595],{"type":37,"value":596},"Model Versioning and Metadata Tracking",{"type":32,"tag":33,"props":598,"children":599},{},[600,602,607],{"type":37,"value":601},"To make migration sustainable, ",{"type":32,"tag":93,"props":603,"children":604},{},[605],{"type":37,"value":606},"track embedding metadata",{"type":37,"value":608},". Store alongside each vector:",{"type":32,"tag":562,"props":610,"children":611},{},[612,623,634,645],{"type":32,"tag":566,"props":613,"children":614},{},[615,621],{"type":32,"tag":52,"props":616,"children":618},{"className":617},[],[619],{"type":37,"value":620},"model_name",{"type":37,"value":622},": \"text-embedding-3-small\"",{"type":32,"tag":566,"props":624,"children":625},{},[626,632],{"type":32,"tag":52,"props":627,"children":629},{"className":628},[],[630],{"type":37,"value":631},"model_version",{"type":37,"value":633},": \"2024-12-01\"",{"type":32,"tag":566,"props":635,"children":636},{},[637,643],{"type":32,"tag":52,"props":638,"children":640},{"className":639},[],[641],{"type":37,"value":642},"embedding_dim",{"type":37,"value":644},": 1536",{"type":32,"tag":566,"props":646,"children":647},{},[648,654],{"type":32,"tag":52,"props":649,"children":651},{"className":650},[],[652],{"type":37,"value":653},"created_at",{"type":37,"value":655},": timestamp",{"type":32,"tag":33,"props":657,"children":658},{},[659],{"type":37,"value":660},"This data enables:",{"type":32,"tag":662,"props":663,"children":664},"ol",{},[665,670,675],{"type":32,"tag":566,"props":666,"children":667},{},[668],{"type":37,"value":669},"Query which chunks exist in old model",{"type":32,"tag":566,"props":671,"children":672},{},[673],{"type":37,"value":674},"Run A\u002FB tests (same chunk, 2 models, which retrieves better)",{"type":32,"tag":566,"props":676,"children":677},{},[678],{"type":37,"value":679},"Plan rollbacks (if new model underperforms)",{"type":32,"tag":33,"props":681,"children":682},{},[683],{"type":37,"value":684},"Without metadata, migration flies blind — you can't track when chunks were embedded. Some vector DBs (Weaviate, Qdrant) natively support metadata filtering. Pinecone uses custom payload fields.",{"type":32,"tag":131,"props":686,"children":688},{"id":687},"auto-detecting-embedding-version-changes",[689],{"type":37,"value":690},"Auto-Detecting Embedding Version Changes",{"type":32,"tag":33,"props":692,"children":693},{},[694],{"type":37,"value":695},"Model providers usually warn before deprecation (30-60 days). For automation:",{"type":32,"tag":150,"props":697,"children":699},{"className":152,"code":698,"language":154,"meta":16,"style":16},"import hashlib\n\ndef get_model_fingerprint(model):\n    \"\"\"Create model signature via test embedding\"\"\"\n    test_text = \"The quick brown fox jumps over the lazy dog\"\n    vec = model.encode(test_text)\n    return hashlib.md5(vec.tobytes()).hexdigest()[:8]\n\n# Alert on fingerprint change in production\ncurrent_fp = get_model_fingerprint(embed_model)\nif current_fp != expected_fp:\n    alert(\"Embedding model changed, migration required\")\n",[700],{"type":32,"tag":52,"props":701,"children":702},{"__ignoreMap":16},[703,716,725,742,750,767,784,806,813,821,838,862],{"type":32,"tag":160,"props":704,"children":705},{"class":162,"line":163},[706,711],{"type":32,"tag":160,"props":707,"children":708},{"style":167},[709],{"type":37,"value":710},"import",{"type":32,"tag":160,"props":712,"children":713},{"style":179},[714],{"type":37,"value":715}," hashlib\n",{"type":32,"tag":160,"props":717,"children":718},{"class":162,"line":201},[719],{"type":32,"tag":160,"props":720,"children":722},{"emptyLinePlaceholder":721},true,[723],{"type":37,"value":724},"\n",{"type":32,"tag":160,"props":726,"children":727},{"class":162,"line":219},[728,732,737],{"type":32,"tag":160,"props":729,"children":730},{"style":167},[731],{"type":37,"value":170},{"type":32,"tag":160,"props":733,"children":734},{"style":173},[735],{"type":37,"value":736}," get_model_fingerprint",{"type":32,"tag":160,"props":738,"children":739},{"style":179},[740],{"type":37,"value":741},"(model):\n",{"type":32,"tag":160,"props":743,"children":744},{"class":162,"line":237},[745],{"type":32,"tag":160,"props":746,"children":747},{"style":274},[748],{"type":37,"value":749},"    \"\"\"Create model signature via test embedding\"\"\"\n",{"type":32,"tag":160,"props":751,"children":752},{"class":162,"line":246},[753,758,762],{"type":32,"tag":160,"props":754,"children":755},{"style":179},[756],{"type":37,"value":757},"    test_text ",{"type":32,"tag":160,"props":759,"children":760},{"style":167},[761],{"type":37,"value":187},{"type":32,"tag":160,"props":763,"children":764},{"style":274},[765],{"type":37,"value":766}," \"The quick brown fox jumps over the lazy dog\"\n",{"type":32,"tag":160,"props":768,"children":769},{"class":162,"line":299},[770,775,779],{"type":32,"tag":160,"props":771,"children":772},{"style":179},[773],{"type":37,"value":774},"    vec ",{"type":32,"tag":160,"props":776,"children":777},{"style":167},[778],{"type":37,"value":187},{"type":32,"tag":160,"props":780,"children":781},{"style":179},[782],{"type":37,"value":783}," model.encode(test_text)\n",{"type":32,"tag":160,"props":785,"children":786},{"class":162,"line":346},[787,791,796,801],{"type":32,"tag":160,"props":788,"children":789},{"style":167},[790],{"type":37,"value":400},{"type":32,"tag":160,"props":792,"children":793},{"style":179},[794],{"type":37,"value":795}," hashlib.md5(vec.tobytes()).hexdigest()[:",{"type":32,"tag":160,"props":797,"children":798},{"style":190},[799],{"type":37,"value":800},"8",{"type":32,"tag":160,"props":802,"children":803},{"style":179},[804],{"type":37,"value":805},"]\n",{"type":32,"tag":160,"props":807,"children":808},{"class":162,"line":26},[809],{"type":32,"tag":160,"props":810,"children":811},{"emptyLinePlaceholder":721},[812],{"type":37,"value":724},{"type":32,"tag":160,"props":814,"children":815},{"class":162,"line":363},[816],{"type":32,"tag":160,"props":817,"children":818},{"style":357},[819],{"type":37,"value":820},"# Alert on fingerprint change in production\n",{"type":32,"tag":160,"props":822,"children":823},{"class":162,"line":394},[824,829,833],{"type":32,"tag":160,"props":825,"children":826},{"style":179},[827],{"type":37,"value":828},"current_fp ",{"type":32,"tag":160,"props":830,"children":831},{"style":167},[832],{"type":37,"value":187},{"type":32,"tag":160,"props":834,"children":835},{"style":179},[836],{"type":37,"value":837}," get_model_fingerprint(embed_model)\n",{"type":32,"tag":160,"props":839,"children":841},{"class":162,"line":840},11,[842,847,852,857],{"type":32,"tag":160,"props":843,"children":844},{"style":167},[845],{"type":37,"value":846},"if",{"type":32,"tag":160,"props":848,"children":849},{"style":179},[850],{"type":37,"value":851}," current_fp ",{"type":32,"tag":160,"props":853,"children":854},{"style":167},[855],{"type":37,"value":856},"!=",{"type":32,"tag":160,"props":858,"children":859},{"style":179},[860],{"type":37,"value":861}," expected_fp:\n",{"type":32,"tag":160,"props":863,"children":865},{"class":162,"line":864},12,[866,871,876],{"type":32,"tag":160,"props":867,"children":868},{"style":179},[869],{"type":37,"value":870},"    alert(",{"type":32,"tag":160,"props":872,"children":873},{"style":274},[874],{"type":37,"value":875},"\"Embedding model changed, migration required\"",{"type":32,"tag":160,"props":877,"children":878},{"style":179},[879],{"type":37,"value":880},")\n",{"type":32,"tag":33,"props":882,"children":883},{},[884],{"type":37,"value":885},"This pattern saves you during silent updates. OpenAI sometimes patches without version bumps, output changes slightly. Fingerprint catches it.",{"type":32,"tag":40,"props":887,"children":889},{"id":888},"attribution-and-data-quality-the-hidden-win-of-migration",[890],{"type":37,"value":891},"Attribution and Data Quality: The Hidden Win of Migration",{"type":32,"tag":33,"props":893,"children":894},{},[895,897,902],{"type":37,"value":896},"Re-indexing isn't just for model changes — it's an opportunity to ",{"type":32,"tag":93,"props":898,"children":899},{},[900],{"type":37,"value":901},"clean data",{"type":37,"value":903},". Production vector DBs accumulate garbage over time: duplicate chunks, outdated content, poorly parsed PDFs. Migration is the window to fix these.",{"type":32,"tag":33,"props":905,"children":906},{},[907],{"type":37,"value":908},"On a customer project, Roibase ran chunk deduplication during migration: 80M embeddings → 68M. 15% reduction. Simultaneously, it adjusted chunking strategy (128 tokens → 256 tokens), raising retrieval accuracy by 4%. These gains are independent of model change.",{"type":32,"tag":33,"props":910,"children":911},{},[912,914,923],{"type":37,"value":913},"Migration is also an opportunity to integrate ",{"type":32,"tag":915,"props":916,"children":920},"a",{"href":917,"rel":918},"https:\u002F\u002Fwww.roibase.com.tr\u002Fen\u002Ffirstparty",[919],"nofollow",[921],{"type":37,"value":922},"First-Party Data & Measurement Architecture",{"type":37,"value":924}," principles into your embedding pipeline. Which chunks retrieve often? Which queries miss? Without these metrics, embedding strategy is blind. Instrument logging during migration, and your next one becomes data-driven.",{"type":32,"tag":40,"props":926,"children":928},{"id":927},"zero-downtime-transition-architecture",[929],{"type":37,"value":930},"Zero-Downtime Transition Architecture",{"type":32,"tag":33,"props":932,"children":933},{},[934],{"type":37,"value":935},"Proper blue-green migration requires infrastructure:",{"type":32,"tag":662,"props":937,"children":938},{},[939,949,959,969,979],{"type":32,"tag":566,"props":940,"children":941},{},[942,947],{"type":32,"tag":93,"props":943,"children":944},{},[945],{"type":37,"value":946},"Dual write:",{"type":37,"value":948}," New data goes to both old and new index (active during migration start)",{"type":32,"tag":566,"props":950,"children":951},{},[952,957],{"type":32,"tag":93,"props":953,"children":954},{},[955],{"type":37,"value":956},"Shadow traffic:",{"type":37,"value":958}," Route 5-10% of production queries to new index, log results (A\u002FB comparison)",{"type":32,"tag":566,"props":960,"children":961},{},[962,967],{"type":32,"tag":93,"props":963,"children":964},{},[965],{"type":37,"value":966},"Cutover checkpoint:",{"type":37,"value":968}," Snapshot old index (rollback guarantee)",{"type":32,"tag":566,"props":970,"children":971},{},[972,977],{"type":32,"tag":93,"props":973,"children":974},{},[975],{"type":37,"value":976},"DNS\u002Frouting switch:",{"type":37,"value":978}," Redirect traffic to new index",{"type":32,"tag":566,"props":980,"children":981},{},[982,987],{"type":32,"tag":93,"props":983,"children":984},{},[985],{"type":37,"value":986},"Shut dual write:",{"type":37,"value":988}," Old index becomes read-only; delete after 7-14 days",{"type":32,"tag":33,"props":990,"children":991},{},[992],{"type":37,"value":993},"The most critical step is shadow traffic. Never switch without testing the new index under production load. Shadow traffic reveals latency, accuracy, edge case failures beforehand.",{"type":32,"tag":33,"props":995,"children":996},{},[997],{"type":37,"value":998},"Example: on one project, shadow traffic showed p99 latency 18% above target. Root cause: new model's batch inference was unoptimized. Before production switch, batch size changed from 32 → 128; p99 hit target. Without shadow traffic, this breaks in production, causing downtime.",{"type":32,"tag":40,"props":1000,"children":1002},{"id":1001},"conclusion-migration-is-inevitable-strategy-determines-success",[1003],{"type":37,"value":1004},"Conclusion: Migration Is Inevitable; Strategy Determines Success",{"type":32,"tag":33,"props":1006,"children":1007},{},[1008],{"type":37,"value":1009},"Model freeze is short-term relief, long-term risk. In competitive markets, model evolution accelerates — by 2026, average drift window shrinks from 180 to 120 days. Building migration strategy now beats panic-fixing in six months.",{"type":32,"tag":33,"props":1011,"children":1012},{},[1013],{"type":37,"value":1014},"Use all three strategies hybrid: critical data via blue-green, bulk corpus via rolling, cold archive via lazy. Implement metadata tracking, add fingerprint monitoring, validate with shadow traffic. Migration isn't just technical obligation — it's a window for data quality and pipeline optimization. Use it well.",{"type":32,"tag":1016,"props":1017,"children":1018},"style",{},[1019],{"type":37,"value":1020},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":16,"searchDepth":219,"depth":219,"links":1022},[1023,1024,1027,1028,1031,1032,1033],{"id":42,"depth":201,"text":45},{"id":80,"depth":201,"text":83,"children":1025},[1026],{"id":133,"depth":219,"text":136},{"id":413,"depth":201,"text":416},{"id":593,"depth":201,"text":596,"children":1029},[1030],{"id":687,"depth":219,"text":690},{"id":888,"depth":201,"text":891},{"id":927,"depth":201,"text":930},{"id":1001,"depth":201,"text":1004},"markdown","content:en:ai:embedding-drift-maintaining-vector-dbs-production.md","content","en\u002Fai\u002Fembedding-drift-maintaining-vector-dbs-production.md","en\u002Fai\u002Fembedding-drift-maintaining-vector-dbs-production","md",1785132253071]