Question 360
A batch service receives intermittent Cosmos DB 429 responses when request volume exceeds provisioned request units. A small write workload is idle most of the day but sustains short, predictable traffic bursts that need automatic throughput adjustment. Which response best addresses these needs?
- Respect retry-after information and add bounded backoff for throttled requests; select an appropriate Cosmos DB autoscale throughput configuration.
- Project only required fields and inspect query metrics before raising throughput; select an appropriate Cosmos DB autoscale throughput configuration.
- Respect retry-after information and add bounded backoff for throttled requests; Project only required fields and inspect query metrics before raising throughput.
- Select an appropriate Cosmos DB autoscale throughput configuration; do not Respect retry-after information and add bounded backoff for throttled requests.
Explanation
Correct Answer
A:A 429 signals RU throttling; immediate unlimited retries aggravate capacity pressure. autoscale adapts provisioned RU/s within its configured range rather than requiring manual peak changes.
Incorrect Answers
B:Reducing returned data and query work can lower RU consumption without buying unnecessary capacity; Requirement 1 requires: respect retry-after information and add bounded backoff for throttled requests.
C:Select an appropriate Cosmos DB autoscale throughput configuration.
D:Autoscale adapts provisioned RU/s within its configured range rather than requiring manual peak changes; Requirement 1 requires: respect retry-after information and add bounded backoff for throttled requests.
Question 361
PostgreSQL rejects the vector column type in a new AI search database with extension-not-found errors. An embedding model produces 768 floats, but its table column is defined as vector(1536). What is the most appropriate plan for this situation?
- Enable the supported vector extension in the intended database; align the pgvector column dimension and data migration with the actual model output.
- Enable the supported vector extension in the intended database; use the pgvector cosine-distance operator for the intended metric.
- Use the pgvector cosine-distance operator for the intended metric; align the pgvector column dimension and data migration with the actual model output.
- Align the pgvector column dimension and data migration with the actual model output; do not enable the supported vector extension in the intended database.
Explanation
Correct Answer
A:Vector types and operators are provided by the extension rather than ordinary PostgreSQL core syntax. mismatched vector dimensions prevent valid inserts and comparisons.
Incorrect Answers
B:Align the pgvector column dimension and data migration with the actual model output.
C:Distance operators encode different geometry and can produce different ranking results; Requirement 1 requires: enable the supported vector extension in the intended database.
D:Mismatched vector dimensions prevent valid inserts and comparisons; Requirement 1 requires: enable the supported vector extension in the intended database.
Question 362
An AI similarity query becomes slow after adding a metadata predicate, and the team assumes the vector index is being used. A RAG query has excellent vector indexing but repeatedly performs a sequential scan for an exact tenant_id predicate. Which course of action addresses the stated issues?
- Inspect EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs; Refresh planner statistics with the approved ANALYZE maintenance process.
- Refresh planner statistics with the approved ANALYZE maintenance process; add a suitable B-tree index on the high-selectivity tenant filter where justified.
- Inspect EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs; add a suitable B-tree index on the high-selectivity tenant filter where justified.
- Add a suitable B-tree index on the high-selectivity tenant filter where justified; do not inspect EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs.
Explanation
Correct Answer
C:A measured plan shows whether the query uses its expected index or incurs expensive filtering. conventional relational predicates can benefit from ordinary indexes independent of vector search.
Incorrect Answers
A:Add a suitable B-tree index on the high-selectivity tenant filter where justified.
B:Updated statistics help PostgreSQL choose between available scan and join methods; requirement 1 requires: inspecting EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs.
D:Conventional relational predicates can benefit from ordinary indexes independent of vector search; requirement 1 requires: inspecting EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs.
Question 363
A team requires vector similarity search but provisions Azure Managed Redis without the RediSearch module. An Azure Managed Redis deployment enables the flash-optimized tier then finds vector search unsupported. Which response best addresses these needs?
- Select the supported Enterprise clustering policy for RediSearch workloads; choose a supported in-memory tier with RediSearch capability.
- Create a supported Azure Managed Redis instance with RediSearch enabled at provisioning; select the supported Enterprise clustering policy for RediSearch workloads.
- Choose a supported in-memory tier with RediSearch capability; do not create a supported Azure Managed Redis instance with RediSearch enabled at provisioning.
- Create a supported Azure Managed Redis instance with RediSearch enabled at provisioning; choose a supported in-memory tier with RediSearch capability.
Explanation
Correct Answer
D:Managed modules needed for vector indexing must be selected when the instance is created. flash Optimized does not provide the same vector module support as eligible memory-based tiers.
Incorrect Answers
A:RediSearch requires a compatible clustering mode in Azure Managed Redis; requirement 1 requires: creating a supported Azure Managed Redis instance with RediSearch enabled at provisioning.
B:Choose a supported in-memory tier with RediSearch capability.
C:Flash Optimized does not provide the same vector module support as eligible memory-based tiers; requirement 1 requires: creating a supported Azure Managed Redis instance with RediSearch enabled at provisioning.
Question 364
A containerized model API reads a database endpoint hardcoded into its Docker image and needs different endpoints by environment. A container needs a database password but a code review prohibits storing the value as a literal App Service setting. What is the most appropriate plan for this situation?
- Supply environment-specific settings through App Service application settings; use an App Service Key Vault reference with an authorized managed identity.
- Change startup diagnostics to redact secrets and log only safe configuration identifiers; use an App Service Key Vault reference with an authorized managed identity.
- Use an App Service Key Vault reference with an authorized managed identity; do not Supply environment-specific settings through App Service application settings.
- Supply environment-specific settings through App Service application settings; Change startup diagnostics to redact secrets and log only safe configuration identifiers.
Explanation
Correct Answer
A:App settings become runtime environment variables without requiring environment-specific image builds. the runtime can resolve the secret from Key Vault without committing its plaintext into deployment configuration.
Incorrect Answers
B:Configuration troubleshooting should not disclose credentials into broadly readable logs; Requirement 1 requires: supply environment-specific settings through App Service application settings.
C:The runtime can resolve the secret from Key Vault without committing its plaintext into deployment configuration; Requirement 1 requires: supply environment-specific settings through App Service application settings.
D:Use an App Service Key Vault reference with an authorized managed identity.
Question 365
After writing a chat message, one user must immediately read their own message while global readers may briefly see older data. A global product recommendation feed values low read latency and tolerates temporary divergence between regions. Which course of action addresses the stated issues?
- Use session consistency with the appropriate session token handling; choose eventual consistency when the application explicitly tolerates stale reads.
- Review the requirement and select a stronger supported consistency level with its latency tradeoffs; choose eventual consistency when the application explicitly tolerates stale reads.
- Use session consistency with the appropriate session token handling; review the requirement and select a stronger supported consistency level with its latency tradeoffs.
- Choose eventual consistency when the application explicitly tolerates stale reads; do not use session consistency with the appropriate session token handling.
Explanation
Correct Answer
A:Session consistency supports read-your-writes for the client session without requiring global strong consistency. eventual consistency reduces coordination while giving no strict immediate freshness guarantee.
Incorrect Answers
B:Stronger consistency may be necessary for cross-client freshness but can increase coordination cost; requirement 1 requires: using session consistency with the appropriate session token handling.
C:Choose eventual consistency when the application explicitly tolerates stale reads.
D:Eventual consistency reduces coordination while giving no strict immediate freshness guarantee; requirement 1 requires: using session consistency with the appropriate session token handling.
Question 366
Two assistants read the same Cosmos DB record and overwrite each other's edits with unconditional replacements. A document update modifies one small field but the application always replaces the entire large JSON payload. Which response best addresses these needs?
- Use a suitable Cosmos DB partial document patch operation; do not use ETag-based conditional writes with If-Match concurrency control.
- Use ETag-based conditional writes with If-Match concurrency control; use a suitable Cosmos DB partial document patch operation.
- Use ETag-based conditional writes with If-Match concurrency control; use a Cosmos DB transactional batch scoped to one partition key.
- Use a Cosmos DB transactional batch scoped to one partition key; use a suitable Cosmos DB partial document patch operation.
Explanation
Correct Answer
B:Conditional writes reject an update when another writer has changed the observed version. targeted patching changes selected fields without resubmitting the full document body.
Incorrect Answers
A:Targeted patching changes selected fields without resubmitting the full document body; requirement 1 requires: using ETag-based conditional writes with If-Match concurrency control.
C:Use a suitable Cosmos DB partial document patch operation.
D:Transactional batch offers atomic execution for operations sharing the partition-key scope; requirement 1 requires: using ETag-based conditional writes with If-Match concurrency control.
Question 367
A Cosmos DB container writes large embeddings frequently, but scalar fields unrelated to queries are being indexed unnecessarily. A NoSQL query filters by status and sorts by timestamp but reports expensive index utilization on a large collection. What is the most appropriate plan for this situation?
- Include the frequently queried property path in the indexing policy; configure a suitable composite index matching the filter and sort pattern.
- Exclude unqueried scalar paths from the standard indexing policy where appropriate; Include the frequently queried property path in the indexing policy.
- Exclude unqueried scalar paths from the standard indexing policy where appropriate; configure a suitable composite index matching the filter and sort pattern.
- Configure a suitable composite index matching the filter and sort pattern; do not Exclude unqueried scalar paths from the standard indexing policy where appropriate.
Explanation
Correct Answer
C:Reducing unused index maintenance can lower write RU costs while retaining necessary query indexes. a matching composite index can efficiently support multi-property ordering and filtering.
Incorrect Answers
A:Queries on unindexed paths may require more work than queries using maintained indexes; Requirement 1 requires: exclude unqueried scalar paths from the standard indexing policy where appropriate.
B:Configure a suitable composite index matching the filter and sort pattern.
D:A matching composite index can efficiently support multi-property ordering and filtering; Requirement 1 requires: exclude unqueried scalar paths from the standard indexing policy where appropriate.
Question 368
A private Azure Database for PostgreSQL instance accepts connections using a shared superuser account from all microservices. A connection string with a PostgreSQL password is checked into a public application repository. Which course of action addresses the stated issues?
- Create least-privilege application roles for the exact schemas and operations; Move the credential into an approved secret store and rotate the exposed password.
- Create least-privilege application roles for the exact schemas and operations; configure supported private network connectivity and DNS for the container workload.
- Move the credential into an approved secret store and rotate the exposed password; do not create least-privilege application roles for the exact schemas and operations.
- Configure supported private network connectivity and DNS for the container workload; Move the credential into an approved secret store and rotate the exposed password.
Explanation
Correct Answer
A:Scoped database roles reduce the impact of one compromised service credential. removing source text alone does not invalidate a credential that was already disclosed.
Incorrect Answers
B:Move the credential into an approved secret store and rotate the exposed password.
C:Removing source text alone does not invalidate a credential that was already disclosed; requirement 1 requires: creating least-privilege application roles for the exact schemas and operations.
D:Database authorization cannot bypass an unavailable or disallowed network path; requirement 1 requires: creating least-privilege application roles for the exact schemas and operations.
Question 369
A Python Function deployment succeeds but imports fail because the published artifact omitted its requirements.txt dependencies. A Function works locally but fails after publishing because its connection variables live only in local.settings.json. Which response best addresses these needs?
- Package and deploy the required Python dependencies for the target Functions runtime; use supported deployment slots or versioned deployment artifacts with a documented rollback.
- Configure the required application settings in the deployed Function App; do not Package and deploy the required Python dependencies for the target Functions runtime.
- Package and deploy the required Python dependencies for the target Functions runtime; configure the required application settings in the deployed Function App.
- Use supported deployment slots or versioned deployment artifacts with a documented rollback; configure the required application settings in the deployed Function App.
Explanation
Correct Answer
C:The remote runtime can import only installed packages compatible with its environment. local settings are for development and are not automatically copied into production configuration.
Incorrect Answers
A:Configure the required application settings in the deployed Function App.
B:Local settings are for development and are not automatically copied into production configuration; Requirement 1 requires: package and deploy the required Python dependencies for the target Functions runtime.
D:Controlled release history makes rollback possible without hand-editing live function files; Requirement 1 requires: package and deploy the required Python dependencies for the target Functions runtime.
Question 370
An embeddings pipeline stores 1536-element vectors, but the Cosmos container vector policy declares only 768 dimensions. A new Cosmos DB container is being provisioned for cosine-based embeddings, but its proposed vector policy uses a different distance metric. What is the most appropriate plan for this situation?
- Plan a new supported vector policy and migration rather than assuming in-place dimension edits; configure cosine distance on the vector embedding path before creating the container.
- Create a vector policy whose declared dimension matches the actual embedding model output; configure cosine distance on the vector embedding path before creating the container.
- Create a vector policy whose declared dimension matches the actual embedding model output; plan a new supported vector policy and migration rather than assuming in-place dimension edits.
- Configure cosine distance on the vector embedding path before creating the container; do not create a vector policy whose declared dimension matches the actual embedding model output.
Explanation
Correct Answer
B:The stored embedding shape must match its declared vector path schema for reliable vector operations. search distance semantics must match the embedding model and intended nearest-neighbor ranking.
Incorrect Answers
A:Existing vector policy settings are constrained and require an explicit change path; requirement 1 requires: creating a vector policy whose declared dimension matches the actual embedding model output.
C:Configure cosine distance on the vector embedding path before creating the container.
D:Search distance semantics must match the embedding model and intended nearest-neighbor ranking; requirement 1 requires: creating a vector policy whose declared dimension matches the actual embedding model output.
Developing AI Cloud Solutions on Azure (AI-200) Practice Tests