Courseiva
Application Development →mediumMultiple Choice

Databricks-GenAI-Assoc Application Development Practice Question

A developer is deploying a custom LangChain agent application as a custom Python model to Databricks Model Serving. The application depends on a specific third-party library that is not included in the standard Databricks runtime environment. How should the developer ensure the dependency is installed when the model is loaded into the serving container?

⚠ Common exam trap

Candidates often suggest manually installing packages on the cluster or using init scripts, failing to use the MLflow-native 'extra_pip_requirements' parameter that ensures environment reproducibility.

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

✓

Specify the required packages in the extra_pip_requirements argument when logging the MLflow model artifact.

When logging custom PyFunc models to MLflow, developers must explicitly specify Python dependencies using the extra_pip_requirements parameter or a conda.yaml file. This ensures that the Databricks Model Serving environment automatically provisions and installs all necessary external libraries during container builds, preventing runtime import errors and ensuring reliable model execution.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Manually SSH into the serving container nodes after deployment and run pip install using terminal access.

    Why it's wrong here

    Databricks Model Serving runs on managed, serverless infrastructure where direct SSH access to container nodes is disabled for security and operational stability. Any manual modifications made directly to containers would be lost during auto-scaling events or container restarts.

  • ✗

    Include the external library installation command inside a standard print statement within the model scoring function.

    Why it's wrong here

    Print statements inside scoring functions execute during inference requests and cannot invoke package installation commands. Furthermore, executing shell commands at runtime introduces massive security risks, severe latency penalties, and fails because scoring containers run with restricted permissions.

  • ✓

    Specify the required packages in the extra_pip_requirements argument when logging the MLflow model artifact.

    Why this is correct

    extra_pip_requirements records the third-party library in the MLflow model's dependency metadata, so Model Serving installs it into the container at load time. This satisfies the constraint that the package is absent from the standard Databricks runtime.

  • ✗

    Rely on the serving endpoint to automatically discover and install any imported Python module dynamically from the public internet.

    Why it's wrong here

    Model serving containers operate in secure network environments without arbitrary dynamic package downloading enabled at runtime for security reasons. Relying on automatic discovery will result in ModuleNotFoundError failures when the endpoint attempts to load the model artifact.

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 →

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.