You query the embeddings by using VECTOR_SEARQi Users report that semantic search results do NOT reflect the updates until the following day.
Vou need to ensure that the embeddings are updated whenever the articles change. The solution must minimize CPU usage on SalesDB Which embedding maintenance method should you implement?
Show answerHide answer
Correct answer: B enable change data capture (COC) on dbo.Articles and use an Azure Functions app to process CLX changes.
Explanation
Explanation:The issue is stale embeddings: when an article changes, its embedding must be regenerated before semantic search can return current results. CDC identifies only the inserted or updated rows, so Azure Functions can regenerate and update embeddings for just those rows, minimizing CPU consumption on SalesDB.
✔️ Correct Option:
✔️ B. Enable change data capture (CDC) on dbo.Articles and use an Azure Functions app to process CDC changes.
CDC tracks inserts, updates, and deletes in change tables without repeatedly scanning the entire two-million-row table. An Azure Functions app can read the changed rows, call the embedding model, and update only the affected embedding values. This keeps semantic search results current while moving embedding generation outside the database and avoiding full-table regeneration.
❌ Incorrect Options:
❌ A. Modify the query to use VECTOR_DISTANCE instead of VECTOR_SEARCH.
VECTOR_DISTANCE calculates similarity between vectors, but it does not regenerate or refresh stored embeddings. Changing the search function cannot make outdated embeddings reflect article updates, so the next-day staleness problem remains.
❌ C. Run an hourly Transact-SQL job that regenerates embeddings for all the rows in dbo.Articles.
Regenerating embeddings for all two million articles every hour creates unnecessary CPU, model-call, and I/O load. It also introduces up to an hour of staleness between updates, which does not meet the requirement to update embeddings whenever an article changes.
❌ D. On dbo.Articles, create a trigger that calls AI_GENERATE_EMBEDDINGS for each inserted or updated row.
Although a trigger can detect row changes, calling an external AI embedding model synchronously inside a database trigger adds latency and CPU load to every write transaction. It can slow article inserts and updates, and trigger-based external calls are not a scalable maintenance pattern for a frequently updated large table.
🔧 Reference:
→ Change data capture (CDC) with Azure SQL Database — Microsoft Learn
Confirms that CDC records table changes and makes modified-row data available for downstream processing.







