Databricks-GenAI-Assoc Application Development Practice Question
Which approach is most effective for managing the dependencies of a custom ML model when deploying it to Mosaic AI Model Serving?
⚠ Common exam trap
Candidates often assume that standard notebooks automatically bundle local Python environments into deployed endpoints, forgetting that Mosaic AI Model Serving requires explicit dependency files like requirements.txt or conda.yaml to recreate the correct libraries.
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
✓
Include a 'requirements.txt' or 'conda.yaml' file in the model artifact.
Defining a custom environment using Conda or a 'requirements.txt' file ensures that the exact library versions required by the model are captured and recreated in the serving environment. This eliminates 'dependency hell' where a model works in development but fails in production due to library version mismatches. Ensuring consistent environments is a foundational step in robust ML engineering that guarantees reproducible performance in the serving infrastructure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Install all dependencies manually on the serving cluster after deployment.
Why it's wrong here
Manual installation is error-prone, violates reproducible deployment practices, and makes scaling the serving infrastructure impossible, as nodes would not be configured consistently. Dependencies must be pre-defined in the model artifact or environment file to allow the Databricks Serving infrastructure to automatically scale and configure replicas correctly.
- ✓
Include a 'requirements.txt' or 'conda.yaml' file in the model artifact.
Why this is correct
Including dependency files in the model artifact ensures the model carries its environment definition with it. Mosaic AI Model Serving detects these files and builds the necessary environment for the model, ensuring that the production serving environment is identical to the one in which the model was validated.
- ✗
Assume the serving environment has all standard ML libraries pre-installed.
Why it's wrong here
While some libraries might be pre-installed, relying on implicit environment configurations is a recipe for failure. Different models may require different library versions or custom packages. Explicitly defining dependencies is the only way to ensure the model executes correctly without encountering runtime errors caused by missing or incompatible libraries.
- ✗
Package the entire Python environment inside the model artifact as a zip.
Why it's wrong here
Packaging an entire Python environment is bloated, slow to deploy, and fragile. It often causes issues with system-specific paths and binaries. The correct approach is to define the dependencies and let the serving infrastructure manage the environment construction, which is cleaner, faster, and more robust for enterprise-scale deployments.
About these practice questions
Courseiva writes every Databricks-GenAI-Assoc question from scratch — 330 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.