The enterprise embedding migration playbook: gates, permissions, cutover and retirement

The enterprise embedding migration playbook: gates, permissions, cutover and retirement

Part 7 of 7 in the Embedding Migration in Production series (change the model, not the reliability): engineer-level, on Azure AI Search and Microsoft Foundry, mapped to Microsoft exam AI-103.

TL;DR for managers. An embedding migration is a release, not a reindex. Agree the gates before you start (data complete, permissions identical, quality no worse, speed and cost within limits, rollback rehearsed), give each gate an owner, and don't delete anything old until the new release has been accepted and the rollback window has closed. Finish while the old model still works, because after it retires there is no way back.

Parts 1 to 6 covered the pieces: why a model change forces a re-embed, the embedding contract, the backfill, the blue-green switch, evaluation and the effect on hybrid ranking. This final part puts them in order as a playbook you can adapt, with the gates that decide when to move forward and the checks that decide when to stop.

The stages

A migration moves through clear states, and any of them can stop at PAUSED, FAILED or ROLLED_BACK. Writing it as a state machine stops the most common failure: skipping a stage because the previous one "looked fine".

DISCOVER -> PREPARE -> BACKFILL -> SYNC -> VALIDATE -> SHADOW -> CANARY -> CUTOVER -> MONITOR -> COMPLETE
                                                 \          \         \          \
                                                  +----------+---------+----------+--> PAUSED | FAILED | ROLLED_BACK
Stage What happens Exit condition
Discover Inventory every place the model is used: skills, vectorizers, client embedding code, caches, consumers, thresholds, permission flow (part 1) Inventory reviewed; nothing marked "unknown"
Prepare Record the baseline (golden set on the current index); choose the target model and approach; write the embedding contract; create the new index from the live definition; run the 1% pilot (parts 2 and 3) Pilot numbers give a time, cost and capacity plan
Backfill Re-embed the corpus with a manifest, bounded concurrency and retries (part 3) Every intended chunk written with the new contract
Sync Replay creates, updates, deletes and permission changes up to an agreed point Reconciled against the source manifest
Validate Data parity, security tests, golden-set evaluation, load test (parts 5 and 6) All gates below pass
Shadow Real questions, real permissions, results never shown (part 4) Zero leaks; overlap and latency understood
Canary A small, sticky share of users on the new release, with approval for each step Agreed measures hold at each step
Cutover All traffic to the new release; old side kept current Validation through the production path
Monitor Rollback window: quality, latency, errors, cost and access watched Window closes; release accepted
Complete Retire old index, pipeline, model deployment and caches Old resources removed and budget reviewed

Release gates, agreed up front

Gates written after the results are in tend to bend to fit them. Write them before the backfill starts and name an owner for each: data, security, quality and operations. An example, to adapt rather than copy:

release_gates:                       # agreed BEFORE the backfill starts, signed off by named owners
  data:
    source_manifest_reconciled: true         # every intended chunk written with the current contract version
    deletes_and_permission_changes_applied: true
    bm25_parity: "identical on golden set"   # part 6
  security:
    mandatory_security_tests_passed: "100%"
    unauthorised_results_observed: 0         # shadow + test users, checked against source ACLs
  quality:
    primary_metric: ndcg_at_10
    rule: "lower 95% bound of paired difference >= -0.01"   # non-inferiority for a forced migration
    regressions_reviewed: true
  operations:
    p95_latency_ms_max: 900
    rollback_rehearsed: true
    old_model_available_until: "2027-02-15"  # rollback window must end before this

Passing a finite test suite isn't proof that no leak is possible, and the gates shouldn't pretend it is. They're the evidence a named person signs off on, and the monitoring after cutover keeps checking.

Permissions: the gate that can't bend

Every other gate has a tolerance. This one doesn't: no user may see a chunk in the new index that they couldn't open in the source. Microsoft's guide says that if "access decisions differ from the source", keep the target out of production. In practice:

  • Use a supported enforcement model. Azure AI Search supports security filters that your application builds and applies, and native document-level permissions: ADLS Gen2 ACLs and RBAC scopes, Blob container RBAC and SharePoint in Microsoft 365 ACLs are generally available in REST API 2026-10-01, with Microsoft Purview sensitivity labels in preview. With native enforcement, the user's Entra token travels with the query and Search trims the results. Security filters are only as trustworthy as the application that builds them.
  • Bring permissions through the trusted flow. Copying a field called group_ids into the new index doesn't recreate where those values came from. Re-ingest them from the source or connector.
  • Test per chunk, with allowed and denied users. Build a security test set: public, internal, department-restricted and confidential documents; items with unique SharePoint permissions; recently revoked access; deleted documents; changed owners. Every test user checks both what they should see and what they shouldn't.
  • Remember freshness. Microsoft notes that permission refresh "doesn't provide immediate revocation". Test a revocation during the overlap and know how long it takes to reach each index.

Monitoring through the rollback window

After cutover, watch the same measures you used to decide, plus the ones only real traffic shows. In Azure Monitor and Application Insights, by release:

  • Search latency p50, p95 and p99, and the query embedding call's latency and error rate.
  • Throttling: 429s from the embedding deployment and 503s from Search.
  • Zero-result and low-reranker-score rates, as an early signal of relevance problems.
  • User feedback and escalation rates, where your application collects them.
  • Embedding tokens per day against the budget, and Search capacity use.
  • Any permission-related error or report: treat the first one as an incident.

Define the runbook response before you need it: embedding outage (fail over to a second deployment or pause ingestion), Search throttling (back off and shed non-urgent load), relevance drop (roll back, then investigate), cost spike (find the reprocessing loop), permission mismatch (roll back immediately).

Retiring the old side safely

Only after the rollback window closes and the release is formally accepted:

  1. Stop writes to the old index and stop embedding with the old model.
  2. Remove the old release from the routing configuration and clear its cache namespaces.
  3. Delete the old index (an index can't be deleted while an alias still points to it), the old indexer and skillset, and the old model deployment.
  4. Review capacity: Microsoft notes that removing old vectors doesn't lower Dedicated tier charges by itself, so check whether replicas or partitions can come down.
  5. Record what you learned: real throughput, cost per million chunks, what went wrong. The next migration will come.

Timeline for a retirement deadline

For a model retiring on 15 February 2027, working backwards with illustrative durations: rollback window ends at least two weeks before retirement; canary and cutover take one to two weeks; validation and shadow two weeks; backfill and sync five to six weeks at the example quota from part 3; discovery, pilot and approvals two to three weeks. That puts the start in early November 2026. If you haven't started, more embedding quota and a smaller first scope (the most-used content first) are the levers that buy time.

The playbook on one page

  1. Inventory every use of the model, including client code, caches, consumers and thresholds.
  2. Write and version the embedding contract; stamp it everywhere.
  3. Create a new index from the live definition; change only the vector side.
  4. Record a quality, latency and cost baseline on the current index before embedding anything.
  5. Rehearse the full lifecycle, rollback included, on a small dataset; then pilot 1% and plan time, cost and capacity from measured numbers.
  6. Backfill with a manifest; replay changes, deletes and permission updates.
  7. Prove parity: BM25 identical, counts and versions reconciled.
  8. Prove security: per chunk, allowed and denied users, revocation tested.
  9. Prove quality: judged golden set, paired comparison, regressions read.
  10. Shadow, then canary, with index and query model deployed as one release.
  11. Cut over with a rehearsed rollback; keep the old side current and the old model available.
  12. Monitor through the window; retire the old side only after acceptance.

About this series. Everything here is based on Microsoft's published guidance, checked on 22 November 2026, plus arithmetic shown in the articles. The scenario and the example numbers are illustrative, not results from a real deployment. Check the current documentation and retirement schedule before you plan your own migration.

Key takeaways

  • Treat the migration as a release with stages and gates, not a reindex.
  • Agree gates and owners before the backfill; security has zero tolerance.
  • Deploy index and query model together; rehearse rollback; finish before the old model retires.
  • Retire old resources only after acceptance, and write down what the migration really cost.

Bonus part: document permissions in an embedding migration, and why Blob, Data Lake and SharePoint behave differently.

References

Learning this for AI-103? Microsoft's AI-103 exam (Azure AI Apps and Agents Developer Associate) covers implementing RAG with Azure AI Search, vector and hybrid search, and monitoring retrieval quality. Our live online AI-103 course builds these pipelines hands-on in Microsoft Foundry and Azure AI Search, on UK time, with mock assessments before you book the exam.

The Embedding Migration in Production series

Change the model, not the reliability.

  1. Part 1: Your embedding model is being retired
  2. Part 2: Why you can't simply swap embedding models
  3. Part 3: Re-embedding 10 million documents
  4. Part 4: Blue-green migration for Azure AI Search
  5. Part 5: Did the new model improve retrieval?
  6. Part 6: BM25, hybrid and semantic ranking
  7. Part 7: The enterprise migration playbook (you are here)
  8. Bonus: Document permissions in a migration
Back to blog

Ready to take the first step?

Live online courses on UK time, mapped to the current Microsoft AI exams. No coding needed for AI at work.

Explore AI coursesAsk us a question