Skip to content

Generative AI Engineer Associate · Domain 3: Application Development · 30% of the exam

Task 3.1: Select Langchain/similar tools for use in a Generative AI application; Utilize MLflow and Agent Framework for developing agentic systems; Enable multi-agent systems to leverage Genie Spaces or conversational API to retrieve data

LangChain, LangGraph and LlamaIndex integrations, MLflow tracing and the agent tooling on Databricks, and calling Genie Agents (formerly Genie Spaces) through the Conversation API or MCP.

Study it

  • LangChain, LangGraph and LlamaIndex with MLflow tracing

    Partly covered by: Agents and Tools

  • Genie Agents as data tools: the Conversation API and MCP

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Databricks documentation page that proves it.

Question 1 · choose 1

A LangGraph agent must search an AI Search index that uses Databricks-managed embeddings, as one tool among several. Which approach does Databricks recommend for new Python agents?

  1. AWrap the index in a Unity Catalog function that calls vector_search and register that function as an agent tool
  2. BLoad DatabricksEmbeddings in the agent and send precomputed query vectors to the REST API
  3. CCopy the chunk table into the agent process at startup and rank chunks with cosine similarity
  4. DCreate a VectorSearchRetrieverTool from databricks-langchain with the index name and a tool description
Show the answer and why
  • AWrap the index in a Unity Catalog function that calls vector_search and register that function as an agent tool

    Incorrect

    Querying AI Search through Unity Catalog functions is marked deprecated on the retrieval tools page, and the vector_search SQL function is in Public Preview.

  • BLoad DatabricksEmbeddings in the agent and send precomputed query vectors to the REST API

    Incorrect

    With Databricks-managed embeddings the index embeds the query text itself, so the agent has no need to compute query vectors.

  • CCopy the chunk table into the agent process at startup and rank chunks with cosine similarity

    Incorrect

    This bypasses the index, its governance and its scaling, and the copy goes stale as the table changes.

  • DCreate a VectorSearchRetrieverTool from databricks-langchain with the index name and a tool description

    Correct

    AI Bridge exposes an AI Search index as an agent tool through VectorSearchRetrieverTool in databricks-langchain or databricks-openai.

For new Python agents, Databricks recommends AI Bridge: VectorSearchRetrieverTool turns an index into a tool with a name and description that tell the model when to search.

Question 2 · choose 2

An engineer exposes several AI Search indexes to an agent as AI Bridge retriever tools. For which TWO index setups must the tool be given a text_column and an embedding model? (Choose TWO.)

  1. AA Delta Sync index with Databricks-managed embeddings
  2. BAny index served from a storage-optimized endpoint
  3. CAny index that the agent queries with HYBRID search
  4. DA Direct Vector Access index
  5. EA Delta Sync index with self-managed embeddings
Show the answer and why
  • AA Delta Sync index with Databricks-managed embeddings

    Incorrect

    Managed embeddings let the index embed the query text itself, so only the index name and description are needed.

  • BAny index served from a storage-optimized endpoint

    Incorrect

    The endpoint type does not decide this; the embedding option of the index does.

  • CAny index that the agent queries with HYBRID search

    Incorrect

    The query type does not change who computes embeddings for the query.

  • DA Direct Vector Access index

    Correct

    With a direct-access index the tool cannot embed query text on its own, so text_column and an embedding model are required.

  • EA Delta Sync index with self-managed embeddings

    Correct

    Self-managed embeddings mean Databricks does not hold the embedding model for the index, so the tool must be told which one to use.

For direct-access indexes or Delta Sync indexes with self-managed embeddings, configure VectorSearchRetrieverTool with a text column and the same embedding model that created the index vectors.

Question 3 · choose 1

A multi-agent system built in code hands sales questions to an existing Genie Agent. Users ask several follow-up questions per session, and each user must see only rows their Unity Catalog permissions allow. How should the system call Genie?

  1. AKeep one long-lived conversation under a service principal and send every user's question into it
  2. BStart a Chat mode conversation per user session with the user's OAuth credentials and send follow-ups as messages in it
  3. CStart a new conversation for every message so that no earlier context can leak between turns
  4. DLet the agent write SQL against the sales tables directly and skip the Genie Agent
Show the answer and why
  • AKeep one long-lived conversation under a service principal and send every user's question into it

    Incorrect

    Reusing threads across sessions lowers accuracy through unintended context, and a shared service principal does not apply each user's permissions.

  • BStart a Chat mode conversation per user session with the user's OAuth credentials and send follow-ups as messages in it

    Correct

    Chat mode conversations keep history for follow-ups, and Genie evaluates data access with the caller's own Unity Catalog permissions.

  • CStart a new conversation for every message so that no earlier context can leak between turns

    Incorrect

    A new conversation per message drops the history that follow-up questions depend on.

  • DLet the agent write SQL against the sales tables directly and skip the Genie Agent

    Incorrect

    This throws away the curated instructions, example SQL and semantics that make the Genie Agent reliable for these questions.

The Genie Agents API provides Chat mode APIs for stateful conversations with follow-ups. Databricks advises a new conversation for each session, OAuth for users when a user is present, and evaluates data access with the caller's permissions.

Question 4 · choose 1

An agent written in code runs on a Model Serving endpoint. For its next release the team wants custom HTTP endpoints and request formats, and the runtime that Databricks now recommends for new agents. Which change fits?

  1. AKeep Model Serving and turn on express deployments
  2. BKeep Model Serving and enable route optimization
  3. CMove the agent's server code to run on Databricks Apps
  4. DMove the agent behind a provisioned throughput endpoint
Show the answer and why
  • AKeep Model Serving and turn on express deployments

    Incorrect

    Express deployments speed up endpoint deployment, but the agent stays on Model Serving, which Databricks now lists as the legacy runtime for agents.

  • BKeep Model Serving and enable route optimization

    Incorrect

    Route optimization lowers overhead latency and raises throughput for an endpoint; it does not change where or how the agent runs.

  • CMove the agent's server code to run on Databricks Apps

    Correct

    Databricks lists Model Serving as the legacy runtime for agents and runs new agents on Databricks Apps, where the agent server can also be your own server with custom endpoints.

  • DMove the agent behind a provisioned throughput endpoint

    Incorrect

    Provisioned throughput serves foundation models with dedicated capacity; it is not a host for custom agent code.

A deployed agent has three layers: the framework, an agent server and an agent runtime. Databricks runs new agents on Databricks Apps and marks agents on Model Serving endpoints, including Custom Agent on Model Serving, as legacy offerings to maintain and migrate rather than build on.

Question 5 · choose 1

A LangChain chain logs traces when run on a classic cluster, but no traces appear when the same notebook runs on serverless compute. What is missing?

  1. AA model signature on the chain
  2. BA provisioned throughput endpoint
  3. CAn explicit mlflow.langchain.autolog() call
  4. DA call to mlflow.autolog(disable=True) at the top of the notebook
Show the answer and why
  • AA model signature on the chain

    Incorrect

    Signatures describe model inputs and outputs for registration; they do not enable tracing.

  • BA provisioned throughput endpoint

    Incorrect

    The serving mode of the LLM does not affect whether MLflow captures traces.

  • CAn explicit mlflow.langchain.autolog() call

    Correct

    On serverless compute clusters autologging is not enabled automatically, so tracing for LangChain must be turned on explicitly.

  • DA call to mlflow.autolog(disable=True) at the top of the notebook

    Incorrect

    That disables autologging, the opposite of what is needed.

mlflow.langchain.autolog() enables automatic tracing for LangChain, logging nested traces to the active experiment. It must be called explicitly on serverless compute, and autolog(disable=True) turns it off.

Question 6 · choose 1

An agent sends a question to a Genie Agent through the API and must poll for the message result. Which polling pattern does Databricks recommend?

  1. APoll in a tight loop with no delay until a result arrives
  2. BPoll once after a fixed 60 seconds and return what is there
  3. CNever poll; register a webhook and wait for its callback
  4. DPoll every 1-5 s, back off to a minute, stop near 10 minutes
Show the answer and why
  • APoll in a tight loop with no delay until a result arrives

    Incorrect

    Tight loops waste requests; backoff keeps fast queries fast without hammering the API.

  • BPoll once after a fixed 60 seconds and return what is there

    Incorrect

    A fixed wait slows quick answers and can still be too early for long ones.

  • CNever poll; register a webhook and wait for its callback

    Incorrect

    The documented pattern is polling until a conclusive status such as COMPLETED or FAILED.

  • DPoll every 1-5 s, back off to a minute, stop near 10 minutes

    Correct

    Databricks recommends polling every 1 to 5 seconds with exponential backoff up to one minute and limiting polling to 10 minutes for most queries.

Poll until a conclusive message status (COMPLETED, FAILED or CANCELLED), using exponential backoff, and return a timeout or ask the user to check later if nothing arrives within about 10 minutes.

Question 7 · choose 1

An application has called a Genie Agent through the Genie Agents API for a year, and old conversation threads keep piling up. Which documented limit should it manage by deleting old conversations?

  1. AA 1,000 message limit per workspace
  2. BThe 200,000 conversation limit
  3. CA 24-hour lifetime per conversation
  4. DA 10-table limit per conversation
Show the answer and why
  • AA 1,000 message limit per workspace

    Incorrect

    No such workspace-wide message limit is described.

  • BThe 200,000 conversation limit

    Correct

    Databricks advises managing old conversations to stay under the 200,000 conversation limit.

  • CA 24-hour lifetime per conversation

    Incorrect

    Conversations are not documented as expiring after a day.

  • DA 10-table limit per conversation

    Incorrect

    Table limits concern the agent's configuration, not conversations.

Use the endpoint that lists a Genie Agent's conversations to find old ones, and delete them to stay under the 200,000 conversation limit.

Question 8 · choose 1

In a LangGraph agent, which class from databricks-langchain provides the chat model that calls a Databricks model endpoint?

  1. AChatDatabricks
  2. BDatabricksEmbeddings
  3. CDatabricksOpenAI
  4. DGenieAgent
Show the answer and why
  • AChatDatabricks

    Correct

    Databricks examples build LangGraph agents with ChatDatabricks pointing at a Databricks model endpoint.

  • BDatabricksEmbeddings

    Incorrect

    This class produces embeddings, not chat responses.

  • CDatabricksOpenAI

    Incorrect

    This is the OpenAI-compatible client from databricks-openai, not a LangChain chat model class.

  • DGenieAgent

    Incorrect

    This helper wraps a Genie Agent as a tool, not the agent's own model.

databricks-langchain provides ChatDatabricks for chat models and DatabricksEmbeddings for embeddings, among other integrations; databricks-openai offers an OpenAI-compatible client.

Practice domain 3 →Practice all domains →