Skip to content

Generative AI Engineer Associate · Domain 4: Assembling and Deploying Applications · 22% of the exam

Task 4.5: Apply CI/CD best practices such as updating a Vector Search index, promoting prompts across environments, and testing individual components of an agent; Apply prompt version control and manage prompt lifecycle

Bundles and Git for agent code, syncing indexes in a pipeline, versioned prompts and aliases, and testing tools and retrievers on their own before the whole agent.

Study it

  • CI/CD for agents and versioned prompts

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Databricks documentation page that proves it.

Question 1 · choose 1

A nightly Lakeflow job rewrites changed chunks into the Delta source table of a triggered Delta Sync index. The index stays a day behind until someone clicks Sync now. How should the pipeline keep the index current?

  1. ADrop and recreate the index at the end of each nightly run
  2. BAdd a job task after the write that calls sync() on the index
  3. CSwitch the index to continuous sync mode
  4. DUpsert the changed chunks into the index with the upsert-data API after each write
Show the answer and why
  • ADrop and recreate the index at the end of each nightly run

    Incorrect

    Recreating rebuilds every embedding and leaves a gap in service, while a triggered sync processes only changes.

  • BAdd a job task after the write that calls sync() on the index

    Correct

    With triggered sync mode you start the sync through the Python SDK or REST API, so a downstream job task can do it after each write.

  • CSwitch the index to continuous sync mode

    Incorrect

    Continuous sync keeps a streaming pipeline running at higher cost for data that changes once a night.

  • DUpsert the changed chunks into the index with the upsert-data API after each write

    Incorrect

    Upserts are how Direct Vector Access indexes are updated; a Delta Sync index follows its source table.

Delta Sync indexes in triggered mode update when you call sync; continuous mode updates automatically but costs more. Triggered sync is the most cost-effective option when near real-time updates are not needed.

Question 2 · choose 1

Prompts for an agent on Databricks Apps must move from development to staging to production after review, keep full history and allow rollback. Company policy allows only generally available features in production pipelines. Which approach fits?

  1. ARegister prompts in the MLflow Prompt Registry and promote them by moving aliases between versions
  2. BKeep prompt templates in the agent's Git repository and deploy reviewed commits through bundle targets
  3. CStore each prompt in an environment variable of the serving endpoint and edit it in place
  4. DKeep the prompts in notebook cells and copy them into the production workspace by hand after review
Show the answer and why
  • ARegister prompts in the MLflow Prompt Registry and promote them by moving aliases between versions

    Incorrect

    Prompt Registry is in Beta, which the policy excludes from production pipelines.

  • BKeep prompt templates in the agent's Git repository and deploy reviewed commits through bundle targets

    Correct

    Git provides review and history, and Declarative Automation Bundles deploy the same code to each target, so an earlier commit can be redeployed.

  • CStore each prompt in an environment variable of the serving endpoint and edit it in place

    Incorrect

    In-place edits have no review step or version history, and each change reconfigures the endpoint.

  • DKeep the prompts in notebook cells and copy them into the production workspace by hand after review

    Incorrect

    Manual copying has no gated review, no reliable history and no repeatable rollback.

Declarative Automation Bundles bring source control, code review, testing and CI/CD to Databricks projects, and a bundle that declares the app deploys it from GitHub Actions with approval gates. Treating prompts as code gives them the same review, promotion and history.

Question 3 · choose 1

Every merge to main should deploy a Databricks app from GitHub Actions without long-lived secrets. What identity setup does Databricks describe?

  1. AA service principal with a federation policy and CAN MANAGE on the app
  2. BA personal access token stored as a GitHub repository secret and rotated yearly
  3. CThe app's own service principal
  4. DA developer's laptop login
Show the answer and why
  • AA service principal with a federation policy and CAN MANAGE on the app

    Correct

    The CI/CD setup uses workload identity federation for a service principal that has CAN MANAGE on the app.

  • BA personal access token stored as a GitHub repository secret and rotated yearly

    Incorrect

    A long-lived token is what federation avoids.

  • CThe app's own service principal

    Incorrect

    The app identity runs the app; the deploy identity is a separate principal.

  • DA developer's laptop login

    Incorrect

    The goal is deploys that do not depend on one developer.

CI/CD for Databricks Apps uses Declarative Automation Bundles and GitHub Actions, authenticated through workload identity federation.

Question 4 · choose 1

A team manages jobs and pipelines in Declarative Automation Bundles and wants its AI Search endpoint in the same bundle. What is required?

  1. ANone: endpoints cannot be bundle resources
  2. Bvector_search_endpoints, direct engine and CLI 1.1.0+
  3. CA notebook task that creates the endpoint on each run
  4. DAn ai_search_endpoints resource with any engine
Show the answer and why
  • ANone: endpoints cannot be bundle resources

    Incorrect

    They are supported as vector_search_endpoints resources.

  • Bvector_search_endpoints, direct engine and CLI 1.1.0+

    Correct

    AI Search endpoints can be bundle resources when the direct deployment engine and Databricks CLI 1.1.0 or above are used.

  • CA notebook task that creates the endpoint on each run

    Incorrect

    That bypasses declaring the resource as code.

  • DAn ai_search_endpoints resource with any engine

    Incorrect

    The resource keeps the former name, vector_search_endpoints.

Many AI Search interfaces keep the former Vector Search name, including the bundle resource vector_search_endpoints.

Question 5 · choose 1

An agent app on Databricks Apps deploys from a private GitHub repository, with the Git reference set to the release tag v2. The team wants every new commit to redeploy the app without a CI workflow, but turning on Auto deploy on push events is refused. What must change?

  1. AMake the repository public so that Databricks can read every commit
  2. BMove the code to a GitLab repository, which automatic deploys require
  3. CAdd a GitHub Actions workflow, since Auto deploy runs inside one
  4. DPoint the app at a branch, since tags cannot drive automatic deploys
Show the answer and why
  • AMake the repository public so that Databricks can read every commit

    Incorrect

    Automatic deployments are not supported from public repositories; the repository must be private.

  • BMove the code to a GitLab repository, which automatic deploys require

    Incorrect

    GitHub and Azure DevOps are the providers that support automatic deployments.

  • CAdd a GitHub Actions workflow, since Auto deploy runs inside one

    Incorrect

    Automatic deployments use a webhook that Databricks registers on the repository, so no workflow is needed.

  • DPoint the app at a branch, since tags cannot drive automatic deploys

    Correct

    The Git reference must be a branch name; tags are not compatible with automatic deployments.

With automatic Git deployments the app redeploys each time the watched branch receives a commit. Use a GitHub Actions workflow only when you want build, test or approval gates before deploying.

Question 6 · choose 1

A team wants to promote a Genie Agent's configuration from a dev workspace to prod as part of CI/CD. Which Genie API capability supports this?

  1. AThe Chat mode APIs
  2. BThe Agent mode APIs
  3. CThe Management APIs
  4. DThe AI Search sync API
Show the answer and why
  • AThe Chat mode APIs

    Incorrect

    Chat mode is for asking questions, not managing agents.

  • BThe Agent mode APIs

    Incorrect

    Agent mode sends prompts and streams reasoning, not configuration.

  • CThe Management APIs

    Correct

    Management APIs create, configure and deploy Genie Agents across workspaces for CI/CD and version control.

  • DThe AI Search sync API

    Incorrect

    Index syncing is unrelated to Genie configuration.

The Genie Agents API has Chat mode, Agent mode and Management APIs; the serialized_space field carries an agent's configuration.

Practice domain 4 →Practice all domains →