Courseiva
Application Development →easyMultiple Choice

Databricks-GenAI-Assoc Application Development Practice Question

A developer is using MLflow to track experiments for a RAG application. They want to log the retrieval step's parameters, such as the number of documents retrieved (k) and the embedding model used. Which MLflow API should they use?

⚠ Common exam trap

Watch out — candidates often confuse parameters with metrics; parameters are configuration inputs, while metrics are output measurements that can vary during training.

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_param()

MLflow parameters are meant for logging configuration settings that are constant for a run. The number of documents retrieved and the embedding model are such settings. mlflow.log_param() records them as key-value pairs, enabling easy comparison across runs in the MLflow UI. Metrics, artifacts, and tags serve different purposes and are not suitable for this use case.

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 it's wrong here

    mlflow.log_artifact() logs files or directories as artifacts. While you could log a JSON file containing parameters, it is not the intended use for scalar parameters. Parameters should be logged with log_param for easy comparison and filtering in the MLflow UI. Using artifacts would make it harder to query and compare runs.

  • ✗

    mlflow.set_tag()

    Why it's wrong here

    mlflow.set_tag() sets metadata tags on a run, which are useful for categorization but not for tracking parameters that you want to compare across runs. Tags are not displayed in the parameters table and are not intended for configuration values. Using tags for parameters would reduce visibility and comparability.

  • ✓

    mlflow.log_param()

    Why this is correct

    mlflow.log_param() is used to log a single parameter (key-value pair) for a run. Parameters are typically configuration settings like k or model name. This is the correct API for logging retrieval parameters such as the number of documents and the embedding model, as they are scalar values that define the run's configuration.

  • ✗

    mlflow.log_metric()

    Why it's wrong here

    mlflow.log_metric() logs numeric metrics that can change over time, such as accuracy or loss. Retrieval parameters like k and embedding model are not metrics; they are configuration settings. Using log_metric would incorrectly treat them as performance measurements, and non-numeric values like model names would fail.

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.