Courseiva
Application Development →mediumMultiple Choice

Databricks-GenAI-Assoc Application Development Practice Question

A GenAI engineer is building a chatbot using Databricks Foundation Model APIs. They need the chatbot to maintain conversation context across multiple user turns and also allow the use of custom tools like a weather API. Which approach should they take?

⚠ Common exam trap

The trap here is assuming that the model retains memory between API calls, when in fact each request is stateless and must include the entire conversation history.

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

✓

Use the chat completion endpoint with a messages array that includes the full conversation history and define tools in the request.

The chat completion endpoint with a messages array is designed for multi-turn conversations and supports tool definitions. By including the full history, the model can reference prior context, and by defining tools, the model can request external API calls. This is the standard pattern for building conversational agents with Databricks Foundation Model APIs.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Use the chat completion endpoint with a messages array that includes the full conversation history and define tools in the request.

    Why this is correct

    The chat completion endpoint accepts a messages array containing prior user and assistant messages, which provides conversational context. You can also specify tools (functions) in the request, and the model can return tool calls. This directly supports multi-turn context and custom tool integration, meeting both requirements.

  • ✗

    Use the chat completion endpoint but only send the latest user message, relying on the model to remember previous turns.

    Why it's wrong here

    Foundation models are stateless; they do not remember previous interactions. Sending only the latest message would lose all context, causing the chatbot to forget prior turns. This fails the requirement to maintain conversation context across multiple turns.

  • ✗

    Use the completions endpoint and concatenate all previous user inputs and model outputs into a single prompt string.

    Why it's wrong here

    While concatenating history into a prompt can maintain context, the completions endpoint does not natively support tool definitions or tool calls. Managing tool invocation would require manual parsing and re-prompting, which is error-prone and not the intended design for agentic behavior.

  • ✗

    Use the embeddings endpoint to encode the conversation history and pass the embeddings to the model for context.

    Why it's wrong here

    Embeddings are used for semantic search or clustering, not for providing conversational context to a generative model. The model cannot interpret raw embedding vectors as dialogue. This approach would not maintain context nor enable tool use.

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.