Courseiva

Databricks-GenAI-Assoc Assembling and Deploying Apps Practice Question

A Mosaic AI Agent application deployed as a Databricks App intermittently returns stale answers after the team updates the underlying vector index. The app caches a client to the serving endpoint and an index handle at module import time. Which change best resolves the staleness while keeping latency low?

⚠ Common exam trap

The trap here is assuming a redeploy or more compute fixes staleness, when the real issue is a long-lived cached handle that is never invalidated.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Initialize the endpoint client once but resolve the current index version per request, and invalidate the cached handle when the version changes.

Staleness comes from caching an index handle at import time, so the fix is to keep the cheap-to-reuse client but resolve the index version per request and invalidate the handle when it changes. This preserves the latency benefit of a persistent client while ensuring answers reflect the latest index, avoiding both constant rebuilds and redeploy-on-every-update.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Increase the app's compute size so the cached handle is refreshed more frequently by the runtime.

    Why it's wrong here

    Scaling compute does not change caching semantics; a handle captured at import time remains the same object regardless of how much memory or CPU is available. More resources may reduce latency under load but have no effect on whether the app sees a new index version. This misdiagnoses a cache-invalidation problem as a capacity problem.

  • ✗

    Disable caching entirely and rebuild the endpoint client and index handle on every request.

    Why it's wrong here

    Rebuilding the client and handle on every request guarantees freshness but imposes connection setup and index resolution costs on each call, which conflicts with the requirement to keep latency low. It trades one problem for another. A targeted invalidation strategy achieves freshness without paying that per-request penalty.

  • ✗

    Redeploy the app after every index update so the module reinitializes with a fresh handle.

    Why it's wrong here

    Redeploying on every index update couples data refresh to application releases, adds downtime and operational toil, and does not fix the root cause that a long-lived handle can serve stale state. It is a heavy workaround rather than a solution, and frequent redeploys increase the chance of a failed deployment affecting users.

  • ✓

    Initialize the endpoint client once but resolve the current index version per request, and invalidate the cached handle when the version changes.

    Why this is correct

    Keeping the connection client but resolving the index version per request, with cache invalidation on version change, balances freshness and latency. The expensive client setup happens once, while the index reference is refreshed when the underlying data changes, so answers reflect the latest index without a redeploy. This directly addresses staleness while preserving low per-request overhead.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This Databricks-GenAI-Assoc question is part of Courseiva's 330-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-GenAI-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-GenAI-Assoc exam.