databricks Generative AI Engineer Associate · Practice questions

Section 3: Application Development Practice Questions

Review 10 sample questions with their correct answers and explanations. Sign up free to continue with the full topic quiz.

Sign up free for the full quiz

Question 1

A prompt includes: 'You are a helpful assistant.' and nothing else. Responses vary wildly in length and format. What is missing?

  1. A higher temperature setting so that the model explores additional formats for each request
  2. A random seed in the prompt text, which forces the model to produce identical outputs
  3. A longer list of retrieved chunks, even though the task requires no external knowledge
  4. An explicit task description, constraints and the required output format with an example — Correct

Correct answer

An explicit task description, constraints and the required output format with an example

Explanation

Clear instructions and format specifications produce consistent responses.

Question 2

Which setting prevents an agent from running indefinitely when it keeps calling tools?

  1. A larger vector index with more documents so that the agent finds an answer and stops sooner
  2. A higher temperature
  3. Disabling tracing
  4. A maximum number of iterations or tool calls — Correct

Correct answer

A maximum number of iterations or tool calls

Explanation

Iteration limits bound runtime and cost.

Question 3

Which retrieval setting most directly controls how many chunks are passed to the LLM?

  1. The vector search endpoint's name, which is mapped to a default number of results
  2. num_results (top k) in the similarity search request — Correct
  3. The temperature of the chat model, which filters out low-relevance chunks automatically
  4. The embedding dimension of the model, which determines how many chunks fit in the prompt

Correct answer

num_results (top k) in the similarity search request

Explanation

Top k sets the number of returned chunks.

Question 4

Which statement about hallucination is correct?

  1. It only occurs when temperature is above 1.0 and never at lower temperatures
  2. Fluent output that is unsupported by sources or simply false — Correct
  3. It means the model refused to answer a question it could answer
  4. It is a security attack performed by users through the chat interface

Correct answer

Fluent output that is unsupported by sources or simply false

Explanation

Hallucinations are plausible but incorrect statements; grounding and evaluation reduce them.

Question 5

A team wants a simple RAG chain in LangChain that uses a Databricks vector index as a retriever and a Databricks-hosted chat model. Which components are appropriate?

  1. A SQL warehouse and a Genie space without any retriever
  2. A Databricks vector search retriever plus ChatDatabricks — Correct
  3. A Delta Sharing client and an embedding-only endpoint used to generate answers
  4. A pandas DataFrame retriever and a Spark ML LogisticRegression model

Correct answer

A Databricks vector search retriever plus ChatDatabricks

Explanation

The databricks-langchain integration provides a vector search retriever and ChatDatabricks for serving endpoints.

Question 6

Which prompt is most likely to produce output that downstream code can parse reliably?

  1. Return only JSON: {"sentiment": "positive|negative|neutral", "reason": "..."} — Correct
  2. Be creative and write a short story about the customer's experience that captures the sentiment
  3. Tell me how the customer feels about our company in this review and explain everything you notice in detail
  4. Analyze this review thoroughly. Use any format you like so that the answer is as natural as possible

Correct answer

Return only JSON: {"sentiment": "positive|negative|neutral", "reason": "..."}

Explanation

Specifying the exact output format, allowed values and an example makes responses structured and parseable.

Question 7

An agent often calls the wrong tool because two tools have vague descriptions ('get data' and 'fetch info'). What is the most effective fix?

  1. Add more tools with similar descriptions
  2. Remove all tool descriptions so the model relies on the names
  3. Increase the temperature so the model tries both tools
  4. Make each tool's name and description precise — Correct

Correct answer

Make each tool's name and description precise

Explanation

Precise tool documentation is a primary lever for correct tool selection.

Question 8

An agent must look up a customer's order using an internal REST API. Which approach is appropriate?

  1. Give the LLM the API's admin credentials in the system prompt so it can call it directly
  2. Embed the API documentation in the vector index and let the model describe the expected result
  3. Wrap the API call in a tool with a typed input schema and a clear description — Correct
  4. Ask the LLM to guess the order status from the customer's message without calling the API

Correct answer

Wrap the API call in a tool with a typed input schema and a clear description

Explanation

Tools encapsulate API calls with defined inputs and outputs, keeping credentials out of prompts.

Question 9

Which statement about the Model Context Protocol (MCP) in the context of Databricks agents is correct?

  1. A standard for exposing tools and context to agents, with managed servers on Databricks — Correct
  2. MCP is a file format for storing embeddings in Delta tables
  3. MCP replaces Unity Catalog permissions for agent tools
  4. MCP is a fine-tuning technique that compresses a model's context window

Correct answer

A standard for exposing tools and context to agents, with managed servers on Databricks

Explanation

MCP standardizes how agents discover and call tools; managed MCP servers on Databricks expose governed resources.

Question 10

A RAG answer is incorrect. The trace shows the retriever returned relevant chunks, but the answer contradicts them. Where is the problem most likely?

  1. In the embedding model
  2. Generation — Correct
  3. In retrieval
  4. In the chunking strategy

Correct answer

Generation

Explanation

If context is correct but the answer contradicts it, the generation step is at fault.

Ready for the full quiz?

Create a free QuizAnalyst account to practice the complete question set and save your progress.

Sign up free for the full quiz