Databricks Generative AI Engineer Associate · 22% practice allocation

Databricks Generative AI Engineer Associate: Assembling and deploying applications Practice Questions

5 free sample questions from the Assembling and deploying applications domain, with answers and explanations. The full Generative AI Engineer Associate bank has 250 questions across 6 domains. Questions are scenario-based and written from the official Databricks exam guide.

1.

A Generative AI engineer deploys a LangGraph-based multi-step RAG agent to a Databricks Model Serving endpoint. After deployment, they observe that the endpoint occasionally returns HTTP 504 (Gateway Timeout) errors during complex multi-hop reasoning tasks. The endpoint is configured with workload_size: Small and scale-to-zero enabled. Which TWO configuration changes would MOST directly address the timeout errors? (Select TWO)

  • A. Disable scale-to-zero so that at least one instance is always warm, eliminating cold-start latency that may contribute to timeouts✓ Correct
  • B. Enable inference tables on the endpoint to capture request payloads, which automatically increases the timeout threshold
  • C. Increase the max_provisioned_throughput parameter to allow more concurrent token generation per second
  • D. Switch the endpoint's workload_type from CPU to GPU_SMALL to accelerate the LangGraph orchestration logic
  • E. Increase the workload_size to Medium or Large to allocate more CPU and memory, reducing per-request processing time✓ Correct
Explanation

HTTP 504 Gateway Timeout errors on complex multi-hop agent tasks are most commonly caused by (1) insufficient compute resources causing slow per-request execution, and (2) cold-start latency when scale-to-zero is enabled and the first request after a period of inactivity must wait for instance initialization. Increasing workload_size provides more CPU/memory for faster processing, and disabling scale-to-zero eliminates cold starts. Enabling inference tables captures telemetry but has no effect on the timeout threshold. max_provisioned_throughput is a parameter for Foundation Model API endpoints (token throughput), not custom model serving. Switching to GPU for LangGraph orchestration logic (Python control flow) would not meaningfully reduce latency since LangGraph coordination is CPU-bound, not GPU-acceleratable.

2.

An engineer is building a deployment pipeline for a RAG chain. They want to programmatically transition a registered model version in Unity Catalog to a specific alias (e.g., 'champion') using the MLflow Python client. Which of the following code snippets correctly sets the 'champion' alias on version 5 of the model 'main.genai.rag_chain'?

  • A. client.update_model_version(name='main.genai.rag_chain', version=5, alias='champion')
  • B. mlflow.register_model_alias(model_uri='models:/main.genai.rag_chain/5', alias='champion')
  • C. client.transition_model_version_stage(name='main.genai.rag_chain', version=5, stage='champion')
  • D. client.set_registered_model_alias(name='main.genai.rag_chain', alias='champion', version=5)✓ Correct
Explanation

The correct MLflow client method for setting a named alias on a Unity Catalog registered model version is client.set_registered_model_alias(name, alias, version). This is the Unity Catalog-compatible API for alias management. client.transition_model_version_stage() is the legacy Workspace Registry API for lifecycle stages (Staging, Production, Archived) and is not supported in Unity Catalog, which uses aliases instead of stages. client.update_model_version() updates metadata like the description or tags, and does not accept an alias parameter. mlflow.register_model_alias() is not a valid top-level MLflow function — alias management is done through the MlflowClient, not a module-level function.

3.

A Generative AI engineer has finished building a RAG chain and wants to log it to MLflow. Which MLflow flavor should they use to ensure the chain is logged with the correct input/output schema and can be served via a Databricks Model Serving endpoint?

  • A. mlflow.langchain.log_model()✓ Correct
  • B. mlflow.pyfunc.log_model()
  • C. mlflow.transformers.log_model()
  • D. mlflow.sklearn.log_model()
Explanation

mlflow.langchain.log_model() is the correct flavor for logging LangChain-based RAG chains. It natively understands the LangChain interface, sets the correct model signature, and produces an artifact that Databricks Model Serving can directly serve. mlflow.pyfunc.log_model() is a generic flavor that requires manual wrapper implementation and does not natively handle LangChain specifics. mlflow.sklearn.log_model() is for scikit-learn estimators and is incompatible with LangChain chains. mlflow.transformers.log_model() is for Hugging Face Transformers pipelines, not LangChain chains.

4.

An engineer logs a RAG chain with mlflow.langchain.log_model() and registers it in Unity Catalog as main.rag_prod.support_chain version 5. They want to assign the alias champion to this version programmatically using the MLflow Python client. Which code snippet correctly accomplishes this?

  • A. client = mlflow.tracking.MlflowClient(); client.set_registered_model_alias('main.rag_prod.support_chain', 'champion', 5)✓ Correct
  • B. mlflow.set_registered_model_alias('main.rag_prod.support_chain', 'champion', 5)
  • C. client = mlflow.tracking.MlflowClient(); client.transition_model_version_stage('main.rag_prod.support_chain', 5, 'champion')
  • D. mlflow.register_model('runs:/latest/model', 'main.rag_prod.support_chain', tags={'alias': 'champion'})
Explanation

MlflowClient().set_registered_model_alias(name, alias, version) is the correct MLflow Python API for assigning an alias to a specific registered model version in Unity Catalog. mlflow.set_registered_model_alias() is not a top-level MLflow function — it must be called on an MlflowClient instance. transition_model_version_stage() is from the legacy Workspace Model Registry API and deals with stages (Staging/Production), not aliases, and is not supported in Unity Catalog. mlflow.register_model() registers a new model version from a run; it does not assign aliases, and tags are metadata, not aliases.

5.

An engineer wants to create a Databricks Model Serving endpoint using the REST API. They have already registered a chain model in Unity Catalog as 'main.genai.summarizer' at version 2. Which of the following endpoint configuration fields is REQUIRED in the served_entities block to correctly point to this registered model?

  • A. entity_name, entity_version, and workload_size
  • B. entity_name and entity_version✓ Correct
  • C. registered_model_name and model_version
  • D. model_name and model_version
Explanation

In the Databricks Model Serving REST API, the served_entities block uses entity_name (the fully qualified Unity Catalog model name) and entity_version to specify which registered model version to serve. model_name and model_version are field names from older or incorrect API schemas not used in the served_entities structure. registered_model_name and model_version combine a valid concept with a wrong field name for the entity block. While workload_size is often specified, it is not strictly required alongside entity_name and entity_version — those two fields are the key identifiers for the model to serve.

Test yourself across every Generative AI Engineer Associate domain

The free Generative AI Engineer Associate practice test mixes about 20 questions weighted like the exam. The full 250-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Assembling and deploying applications study guide (Generative AI Engineer Associate) →

Other Generative AI Engineer Associate domains

← All Databricks Generative AI Engineer Associate study resources