Question 1
A prompt includes: 'You are a helpful assistant.' and nothing else. Responses vary wildly in length and format. What is missing?
- A higher temperature setting so that the model explores additional formats for each request
- A random seed in the prompt text, which forces the model to produce identical outputs
- A longer list of retrieved chunks, even though the task requires no external knowledge
- 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?
- A larger vector index with more documents so that the agent finds an answer and stops sooner
- A higher temperature
- Disabling tracing
- 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?
- The vector search endpoint's name, which is mapped to a default number of results
- num_results (top k) in the similarity search request — Correct
- The temperature of the chat model, which filters out low-relevance chunks automatically
- 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?
- It only occurs when temperature is above 1.0 and never at lower temperatures
- Fluent output that is unsupported by sources or simply false — Correct
- It means the model refused to answer a question it could answer
- 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?
- A SQL warehouse and a Genie space without any retriever
- A Databricks vector search retriever plus ChatDatabricks — Correct
- A Delta Sharing client and an embedding-only endpoint used to generate answers
- 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?
- Return only JSON: {"sentiment": "positive|negative|neutral", "reason": "..."} — Correct
- Be creative and write a short story about the customer's experience that captures the sentiment
- Tell me how the customer feels about our company in this review and explain everything you notice in detail
- 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?
- Add more tools with similar descriptions
- Remove all tool descriptions so the model relies on the names
- Increase the temperature so the model tries both tools
- 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?
- Give the LLM the API's admin credentials in the system prompt so it can call it directly
- Embed the API documentation in the vector index and let the model describe the expected result
- Wrap the API call in a tool with a typed input schema and a clear description — Correct
- 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?
- A standard for exposing tools and context to agents, with managed servers on Databricks — Correct
- MCP is a file format for storing embeddings in Delta tables
- MCP replaces Unity Catalog permissions for agent tools
- 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?
- In the embedding model
- Generation — Correct
- In retrieval
- In the chunking strategy
Correct answer
Generation
Explanation
If context is correct but the answer contradicts it, the generation step is at fault.