DatabricksAssembling and Deploying Applications

Agent Framework & Packaging — Databricks GenAI Associate Practice Question

A representative Databricks Certified Generative AI Engineer Associate (Databricks GenAI Associate) exam question on Agent Framework & Packaging. Work through it below, then read why each option is right or wrong.

This question is part of the free Databricks Certified Generative AI Engineer Associate practice test.

Short answer

The correct answer is A. Use environment variables and Databricks Secrets to externalize configuration, then package the agent as a deployable artifact that reads these values at runtime.

Externalizing configuration via environment variables and Databricks Secrets enables a single packaged artifact to run across environments without code modification. This follows the twelve-factor app principle and is the standard practice for agent deployment. Embedding credentials in code violates security best practices and prevents reusable packaging. Separate codebases for each environment introduce maintenance overhead and inconsistency. Delta Lake table lookups add unnecessary complexity and manual steps that break the deployment pipeline. The Databricks Agent Framework and MLflow packaging model both support externalized configuration at runtime.

The Question

You are packaging a Mosaic AI Agent that calls external APIs to fetch real-time pricing data. The agent must run consistently across development, staging, and production environments without code changes. Which approach best ensures environment-agnostic packaging and deployment?

AUse environment variables and Databricks Secrets to externalize configuration, then package the agent as a deployable artifact that reads these values at runtimeCorrect
BEmbed all API endpoints and credentials directly in the agent code, then use environment-specific build scripts to replace them at deployment time
CStore all configuration in Delta Lake tables and require manual updates to each table before deploying to a new environment
DCreate separate agent codebases for each environment, each with hardcoded configuration, to ensure complete isolation

Why A is correct

Externalizing configuration via environment variables and Databricks Secrets enables a single packaged artifact to run across environments without code modification. This follows the twelve-factor app principle and is the standard practice for agent deployment. Embedding credentials in code violates security best practices and prevents reusable packaging. Separate codebases for each environment introduce maintenance overhead and inconsistency. Delta Lake table lookups add unnecessary complexity and manual steps that break the deployment pipeline. The Databricks Agent Framework and MLflow packaging model both support externalized configuration at runtime.

Why the other options are wrong

Option B: Embed all API endpoints and credentials directly in the agent code, then use environment-specific build scripts to replace them at deployment time

Option B does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Option C: Store all configuration in Delta Lake tables and require manual updates to each table before deploying to a new environment

Option C does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Option D: Create separate agent codebases for each environment, each with hardcoded configuration, to ensure complete isolation

Option D does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Key idea: Agent Framework & Packaging

Externalizing configuration via environment variables and Databricks Secrets enables a single packaged artifact to run across environments without code modification. This follows the twelve-factor app principle and is the standard practice for agent deployment. Embedding credentials in code violates security best practices and prevents reusable packaging. Separate codebases for each environment introduce maintenance overhead and inconsistency. Delta Lake table lookups add unnecessary complexity and manual steps that break the deployment pipeline. The Databricks Agent Framework and MLflow packaging model both support externalized configuration at runtime. On the Databricks GenAI Associate exam, questions in the "Assembling and Deploying Applications" domain test whether you can map a scenario's constraints to the right choice. Read the requirement carefully, eliminate options that violate any single constraint, and pick the one that satisfies all of them with the least operational overhead.

Ready to see how you'd score?

Take the free practice quiz and find out which Databricks Certified Generative AI Engineer Associate domains you need to focus on. No signup required.

Practice 5 similar questions

Same cert, same or adjacent domain. Use these after reviewing the explanation.

Related Databricks Certified Generative AI Engineer Associate Practice Questions

Official sources used

Verify program and exam details at the source before scheduling.