Question 450
PostgreSQL rejects the vector column type in a new AI search database with extension-not-found errors. A team wants to compare text embeddings using cosine distance but its SQL uses the Euclidean operator without review. Which response best addresses these needs?
- Enable the supported vector extension in the intended database; use the pgvector cosine-distance operator for the intended metric.
- Enable the supported vector extension in the intended database; align the pgvector column dimension and data migration with the actual model output.
- Use the pgvector cosine-distance operator for the intended metric; do not enable the supported vector extension in the intended database.
- Align the pgvector column dimension and data migration with the actual model output; use the pgvector cosine-distance operator for the intended metric.
Explanation
Correct Answer
A:Vector types and operators are provided by the extension rather than ordinary PostgreSQL core syntax. distance operators encode different geometry and can produce different ranking results.
Incorrect Answers
B:Mismatched vector dimensions prevent valid inserts and comparisons; requirement 2 requires: using the pgvector cosine-distance operator for the intended metric.
C:Use the pgvector cosine-distance operator for the intended metric; do not enable the supported vector extension in the intended database: distance operators encode different geometry and can produce different ranking results; Requirement 1 requires: enable the supported vector extension in the intended database.
D:Enable the supported vector extension in the intended database.
Question 451
A new Python Azure Function uses decorators in function_app.py, but the developer also creates obsolete function.json files for the same routes. A public HTTP Function allows anonymous requests despite needing an application key at the endpoint. What is the most appropriate plan for this situation?
- Define the HTTP trigger and bindings in the Python v2 decorator model; Set the appropriate HTTP trigger authorization level and manage keys securely.
- Define the HTTP trigger and bindings in the Python v2 decorator model; Match the request URL to the configured HTTP trigger route and route prefix.
- Match the request URL to the configured HTTP trigger route and route prefix; Set the appropriate HTTP trigger authorization level and manage keys securely.
- Set the appropriate HTTP trigger authorization level and manage keys securely; do not define the HTTP trigger and bindings in the Python v2 decorator model.
Explanation
Correct Answer
A:The v2 programming model discovers function metadata from decorators instead of separate hand-authored function.json files. trigger auth level controls whether a function or host key is required on supported calls.
Incorrect Answers
B:Function routing depends on the trigger's declared path rather than the Python function's display name alone; Requirement 2 requires: set the appropriate HTTP trigger authorization level and manage keys securely.
C:Define the HTTP trigger and bindings in the Python v2 decorator model.
D:Set the appropriate HTTP trigger authorization level and manage keys securely; do not define the HTTP trigger and bindings in the Python v2 decorator model: trigger auth level controls whether a function or host key is required on supported calls; requirement 1 requires: defining the HTTP trigger and bindings in the Python v2 decorator model.
Question 452
A release must be warmed and smoke-tested before the live App Service hostname points to it. A new App Service container fails immediately after a slot swap and the team needs the prior working deployment restored. Which course of action addresses the stated issues?
- Swap back to the known-good slot and investigate the failed release; do not deploy to a staging slot, validate it, and perform a controlled slot swap.
- Mark environment-specific connection settings as deployment-slot settings; Swap back to the known-good slot and investigate the failed release.
- Deploy to a staging slot, validate it, and perform a controlled slot swap; Swap back to the known-good slot and investigate the failed release.
- Deploy to a staging slot, validate it, and perform a controlled slot swap; mark environment-specific connection settings as deployment-slot settings.
Explanation
Correct Answer
C:Slots support preproduction testing and controlled traffic cutover without rebuilding the same image. a reverse slot swap can restore the previous content while preserving evidence for diagnosis.
Incorrect Answers
A:Swap back to the known-good slot and investigate the failed release; do not deploy to a staging slot, validate it, and perform a controlled slot swap: a reverse slot swap can restore the previous content while preserving evidence for diagnosis; requirement 1 requires: deploying to a staging slot, validate it, and perform a controlled slot swap.
B:Deploy to a staging slot, validate it, and perform a controlled slot swap.
D:Sticky slot settings remain with the intended environment when application content swaps; Requirement 2 requires: swap back to the known-good slot and investigate the failed release.
Question 453
An engineer accidentally deletes a production Key Vault secret and needs the previous value restored without inventing a new one. An environment cleanup process tries to reuse a recently deleted Key Vault name and hits a name conflict. Which response best addresses these needs?
- Enable and retain appropriate Key Vault purge protection; inspect the soft-deleted vault state and use the authorized recovery or purge lifecycle.
- Recover the soft-deleted secret within its retention window; inspect the soft-deleted vault state and use the authorized recovery or purge lifecycle.
- Inspect the soft-deleted vault state and use the authorized recovery or purge lifecycle; do not Recover the soft-deleted secret within its retention window.
- Recover the soft-deleted secret within its retention window; enable and retain appropriate Key Vault purge protection.
Explanation
Correct Answer
B:Soft-delete recovery can restore a deleted secret before permanent purge. soft-deleted vaults can retain their names until the retention process is resolved.
Incorrect Answers
A:Recover the soft-deleted secret within its retention window.
C:Inspect the soft-deleted vault state and use the authorized recovery or purge lifecycle; do not Recover the soft-deleted secret within its retention window: soft-deleted vaults can retain their names until the retention process is resolved; Requirement 1 requires: recover the soft-deleted secret within its retention window.
D:Purge protection prevents bypassing the retention period to destroy deleted vault objects; requirement 2 requires: inspecting the soft-deleted vault state and use the authorized recovery or purge lifecycle.
Question 454
An Azure Function reads one Key Vault secret using a plaintext credential in its configuration. A Function must retrieve a rotated database password on demand but caches the value indefinitely across invocations. What is the most appropriate plan for this situation?
- Implement bounded secret caching and refresh on rotation or authentication failures; do not enable the Function's managed identity and grant scoped secret-read permission.
- Enable the Function's managed identity and grant scoped secret-read permission; use least-privilege data-plane authorization for the required blob scope.
- Enable the Function's managed identity and grant scoped secret-read permission; implement bounded secret caching and refresh on rotation or authentication failures.
- Use least-privilege data-plane authorization for the required blob scope; implement bounded secret caching and refresh on rotation or authentication failures.
Explanation
Correct Answer
C:Managed identity supplies short-lived tokens without embedding a separate service principal password. a long-lived process may retain stale credentials even when Key Vault has a newer version.
Incorrect Answers
A:Implement bounded secret caching and refresh on rotation or authentication failures; do not enable the Function's managed identity and grant scoped secret-read permission: a long-lived process may retain stale credentials even when Key Vault has a newer version; Requirement 1 requires: enable the Function's managed identity and grant scoped secret-read permission.
B:Scoped role assignment limits a compromised function to the resources it actually processes; requirement 2 requires: implementing bounded secret caching and refresh on rotation or authentication failures.
D:Enable the Function's managed identity and grant scoped secret-read permission.
Question 455
A semantic cache requires exact nearest-neighbor search over a modest number of vectors, without approximate-index tuning. A Redis vector search indexes embeddings with the wrong metric and ranks results differently from the model's cosine-based training. Which course of action addresses the stated issues?
- Choose COSINE as the vector index distance metric for the intended embedding comparison; do not configure an appropriate RediSearch FLAT vector index.
- Configure and tune a RediSearch HNSW vector index; choose COSINE as the vector index distance metric for the intended embedding comparison.
- Configure an appropriate RediSearch FLAT vector index; configure and tune a RediSearch HNSW vector index.
- Configure an appropriate RediSearch FLAT vector index; choose COSINE as the vector index distance metric for the intended embedding comparison.
Explanation
Correct Answer
D:FLAT performs exhaustive vector comparison instead of an approximate graph walk. index distance semantics must match how model embeddings should be compared.
Incorrect Answers
A:Choose COSINE as the vector index distance metric for the intended embedding comparison; do not configure an appropriate RediSearch FLAT vector index: index distance semantics must match how model embeddings should be compared; requirement 1 requires: configuring an appropriate RediSearch FLAT vector index.
B:Configure an appropriate RediSearch FLAT vector index.
C:HNSW indexes trade resource usage for lower-latency approximate similarity retrieval; requirement 2 requires: choosing COSINE as the vector index distance metric for the intended embedding comparison.
Question 456
A production app must receive new model-endpoint configuration only after validation in a staging environment. An on-call engineer cannot determine which configuration version caused a model-serving outage. Which response best addresses these needs?
- Record configuration revision identifiers and retain an auditable change history; do not use staged labels or dedicated stores and promote approved values through change control.
- Use staged labels or dedicated stores and promote approved values through change control; use a targeted App Configuration feature filter for the approved cohort.
- Use a targeted App Configuration feature filter for the approved cohort; Record configuration revision identifiers and retain an auditable change history.
- Use staged labels or dedicated stores and promote approved values through change control; Record configuration revision identifiers and retain an auditable change history.
Explanation
Correct Answer
D:Separating release stages prevents unvalidated runtime settings from appearing in production. versioned configuration records support correlation between rollout and observed failures.
Incorrect Answers
A:Record configuration revision identifiers and retain an auditable change history; do not use staged labels or dedicated stores and promote approved values through change control: versioned configuration records support correlation between rollout and observed failures; requirement 1 requires: using staged labels or dedicated stores and promote approved values through change control.
B:Cohort targeting permits measured release without changing code for all clients; requirement 2 requires: recording configuration revision identifiers and retain an auditable change history.
C:Use staged labels or dedicated stores and promote approved values through change control.
Question 457
A PostgreSQL vector table is frequently queried while bulk loads are modest; the team prioritizes fast high-recall approximate searches. Vector recall drops after an IVFFlat deployment where only one list is probed from a highly partitioned index. What is the most appropriate plan for this situation?
- Evaluate IVFFlat and tune its lists and probes against a recall baseline; Increase ivfflat.probes within performance targets and remeasure recall.
- Evaluate an HNSW vector index with tuned search parameters; evaluate IVFFlat and tune its lists and probes against a recall baseline.
- Increase ivfflat.probes within performance targets and remeasure recall; do not evaluate an HNSW vector index with tuned search parameters.
- Evaluate an HNSW vector index with tuned search parameters; Increase ivfflat.probes within performance targets and remeasure recall.
Explanation
Correct Answer
D:HNSW can provide a favorable latency-recall tradeoff at a memory and build cost. probing more lists raises the chance of finding the nearest candidates at additional query cost.
Incorrect Answers
A:Evaluate an HNSW vector index with tuned search parameters.
B:IVFFlat trades lower build overhead for retrieval quality affected by list and probe choices; Requirement 2 requires: increase ivfflat.probes within performance targets and remeasure recall.
C:Increase ivfflat.probes within performance targets and remeasure recall; do not evaluate an HNSW vector index with tuned search parameters: probing more lists raises the chance of finding the nearest candidates at additional query cost; requirement 1 requires: evaluating an HNSW vector index with tuned search parameters.
Question 458
A NoSQL solution requires exact nearest neighbors for 384-dimensional vectors and a small collection. A filtered vector query covers a modest candidate set and can tolerate limited quantization error for lower RU cost. Which course of action addresses the stated issues?
- Use a flat vector index with the supported vector policy; configure a diskANN vector index on the declared embedding path.
- Use a flat vector index with the supported vector policy; evaluate a quantizedFlat index with measured recall and resource usage.
- Configure a diskANN vector index on the declared embedding path; evaluate a quantizedFlat index with measured recall and resource usage.
- Evaluate a quantizedFlat index with measured recall and resource usage; do not use a flat vector index with the supported vector policy.
Explanation
Correct Answer
B:Flat indexing supports exact search at small dimensions, trading RU and latency as volume grows. quantized vectors trade some accuracy for reduced index and query cost in suitable workloads.
Incorrect Answers
A:DiskANN targets efficient approximate retrieval at dimensions beyond the flat index limit; requirement 2 requires: evaluating a quantizedFlat index with measured recall and resource usage.
C:Use a flat vector index with the supported vector policy.
D:Evaluate a quantizedFlat index with measured recall and resource usage; do not use a flat vector index with the supported vector policy: quantized vectors trade some accuracy for reduced index and query cost in suitable workloads; requirement 1 requires: using a flat vector index with the supported vector policy.
Question 459
A single App Configuration key stores a production model endpoint and a test endpoint under the same unlabelled key, causing confusion. Two microservices load the entire shared App Configuration store and accidentally pick up keys unrelated to their application. Which response best addresses these needs?
- Configure an appropriate App Configuration feature flag evaluated by the client; use key prefixes and label filters when loading application configuration.
- Use environment-specific App Configuration labels for the shared setting name; use key prefixes and label filters when loading application configuration.
- Use environment-specific App Configuration labels for the shared setting name; configure an appropriate App Configuration feature flag evaluated by the client.
- Use key prefixes and label filters when loading application configuration; do not use environment-specific App Configuration labels for the shared setting name.
Explanation
Correct Answer
B:Labels allow distinct environment values without creating unrelated key names. scoped selectors reduce unintended configuration coupling between services.
Incorrect Answers
A:Use environment-specific App Configuration labels for the shared setting name.
C:Feature flags allow controlled runtime behavior changes separate from a code deployment; requirement 2 requires: using key prefixes and label filters when loading application configuration.
D:Use key prefixes and label filters when loading application configuration; do not use environment-specific App Configuration labels for the shared setting name: scoped selectors reduce unintended configuration coupling between services; requirement 1 requires: using environment-specific App Configuration labels for the shared setting name.
Question 460
A Container App uses a connection-string access key to load App Configuration despite having a managed identity available. An application cannot retrieve configuration after App Configuration is moved behind private networking. What is the most appropriate plan for this situation?
- Configure a supported private endpoint and linked private DNS for the client path; do not use managed identity with the App Configuration Data Reader role.
- Use managed identity with the App Configuration Data Reader role; configure a supported private endpoint and linked private DNS for the client path.
- Use managed identity with the App Configuration Data Reader role; assign a suitably scoped App Configuration Data Owner or write-capable role.
- Assign a suitably scoped App Configuration Data Owner or write-capable role; configure a supported private endpoint and linked private DNS for the client path.
Explanation
Correct Answer
B:Identity-based data access removes a reusable access key from application settings. config-store authorization and private network reachability are independent requirements.
Incorrect Answers
A:Configure a supported private endpoint and linked private DNS for the client path; do not use managed identity with the App Configuration Data Reader role: config-store authorization and private network reachability are independent requirements; requirement 1 requires: using managed identity with the App Configuration Data Reader role.
C:Read-only roles cannot publish configuration changes; requirement 2 requires: configuring a supported private endpoint and linked private DNS for the client path.
D:Use managed identity with the App Configuration Data Reader role.
Developing AI Cloud Solutions on Azure (AI-200) Practice Tests