Courseiva
Application Development →easyMultiple Choice

Databricks-GenAI-Assoc Application Development Practice Question

A developer is using MLflow to track experiments for a generative AI application. They want to log a prompt template and its associated parameters so that they can reproduce the exact input to the model later. Which MLflow function should they use to log the prompt template as an artifact?

⚠ Common exam trap

It's easy for candidates to confuse parameters with artifacts; parameters are for small configuration values, while artifacts are for files like prompt templates.

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

✓

mlflow.log_artifact

Prompt templates are best stored as artifacts because they are files that may be reused, versioned, and referenced independently of the run. mlflow.log_artifact provides a robust way to persist such files, ensuring reproducibility and easy access later.

Answer analysis

Option-by-option breakdown

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

  • ✓

    mlflow.log_artifact

    Why this is correct

    mlflow.log_artifact logs a file or directory as an artifact to the MLflow run. This is ideal for storing prompt templates as text files, allowing versioning and easy retrieval. It supports any file type and is the standard way to persist non-parameter assets like prompts, configuration files, or evaluation datasets.

  • ✗

    mlflow.set_tag

    Why it's wrong here

    mlflow.set_tag adds metadata tags to a run, such as user or version information. Tags are key-value pairs with limited size and are not meant for storing large text like prompt templates. While you could store a short prompt as a tag, it is not scalable and lacks the file management capabilities of artifacts.

  • ✗

    mlflow.log_metric

    Why it's wrong here

    mlflow.log_metric records numeric metrics such as accuracy or loss, intended for tracking performance over time. It cannot store text-based prompt templates. Using it for prompts would be semantically incorrect and would not allow retrieval of the template content in a usable format.

  • ✗

    mlflow.log_param

    Why it's wrong here

    mlflow.log_param logs a single key-value parameter, typically for hyperparameters or configuration settings. It is not designed for storing large text such as prompt templates, and it has size limitations. While you could log the prompt as a string parameter, it is not the recommended practice for artifacts that may be reused or versioned.

About these practice questions

One of 330 original Databricks-GenAI-Assoc practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.