Home / GenAI Engineer practice test / Assembling and Deploying Applications

Free · 8 questions with explanations

Assembling and Deploying Applications: Databricks Generative AI Engineer Associate Practice Questions

Exam-style questions on Assembling and Deploying Applications. Pick your answer, then open the explanation to see why it's right — and why the other options are wrong.

Updated November 11, 2026

1 Assembling and Deploying Applications

A RAG application retrieves product documentation. Users type natural-language questions that contain a part number (SKU), such as 'How do I replace the filter on the XR-4892-B?'. Pure vector similarity search often returns documents for the wrong product, because SKUs are not semantically meaningful words. Which Mosaic AI Vector Search feature BEST addresses this limitation?

  1. AIncrease the embedding dimension to 4096 so that the vectors capture the character patterns of each SKU
  2. BSwitch to a Direct Vector Access index so that the developer controls which documents are returned for each SKU
  3. CStore SKU values as a metadata column and apply a filter on SKU before the vector similarity search runs
  4. DEnable hybrid keyword-similarity search, which fuses BM25 keyword matches with vector similarity results in one ranked list
Show answer & explanation

Correct answer: D

WHY D is correct: Hybrid search runs a keyword (BM25) search and a vector similarity search and merges the two result lists. The keyword side matches the exact SKU string in the question while the vector side matches its meaning, which is why Databricks recommends hybrid search for data with unique identifiers such as SKUs. WHY NOT A: A larger embedding dimension gives more room to represent meaning, but a SKU is an arbitrary string with no meaning to represent. More dimensions do not make the search match exact identifiers. WHY NOT B: A Direct Vector Access index changes how vectors are written to the index (through the API instead of syncing from a Delta table). It adds no keyword matching and does not change which documents a query retrieves. WHY NOT C: A metadata filter needs the exact SKU as a separate value before the search runs. Here the SKU is buried inside a free-text question, so the application would first have to extract it reliably, and a filter does nothing for questions that mention no SKU. Hybrid search handles the question as typed.

2 Assembling and Deploying Applications

A developer needs to build a minimal chain that: (1) takes a user question, (2) formats it into a prompt, (3) calls an LLM, and (4) returns the text response. Using LangChain Expression Language (LCEL) with the pipe operator, which implementation is correct?

  1. Achain = PromptTemplate.from_template('Answer this: {question}') + ChatOpenAI() + StrOutputParser()
  2. Bchain = StrOutputParser(PromptTemplate.from_template('Answer this: {question}'), ChatOpenAI())
  3. Cchain = LLMChain(prompt=PromptTemplate.from_template('Answer this: {question}'), llm=ChatOpenAI())
  4. Dchain = PromptTemplate.from_template('Answer this: {question}') | ChatOpenAI() | StrOutputParser()
Show answer & explanation

Correct answer: D

WHY D is correct: This is the standard minimal LCEL chain. The pipe operator connects runnables left to right: the prompt template formats the input into a prompt, the chat model returns a message, and StrOutputParser extracts the text. It is invoked with chain.invoke({'question': '...'}). WHY NOT A: LCEL composes runnables with the pipe operator. The plus sign does not build a chain out of a prompt, a model and a parser. WHY NOT C: LLMChain is the older, pre-LCEL way of building a chain and is deprecated. It does not use the pipe operator, which the question asks for, and it returns a dictionary, not the plain text. WHY NOT B: StrOutputParser is a runnable that receives the model output through the pipe. It is not a wrapper whose constructor takes a prompt and a model.

3 Assembling and Deploying Applications

A team is iterating on the system prompt for a customer service agent. They need to: track all prompt versions, compare performance metrics across versions, and roll back to a previous version if quality degrades in production. Which Databricks feature is designed for this workflow?

  1. AStore prompts as rows in a Delta table and use Delta time travel to compare and restore earlier versions of the prompt text
  2. BKeep prompt text files in a Git repository and promote them through dev, staging, and prod branches with manual merges
  3. CLog each prompt version as a separate MLflow experiment and compare quality metrics across the experiment runs
  4. DRegister the prompt in the MLflow Prompt Registry, compare its versions, and move a production alias to promote or roll back
Show answer & explanation

Correct answer: D

WHY D is correct: The MLflow Prompt Registry stores each prompt as a versioned object in Unity Catalog. Versions can be compared, evaluation results can be linked to the version that produced them, and an alias such as production points to the version in use. Rolling back means moving the alias to an earlier version. WHY NOT A: Delta time travel keeps the history of a table, but it has no notion of a prompt version with aliases and linked evaluation results. Comparing versions and promoting one would all be custom work. WHY NOT C: A separate experiment per prompt version scatters the history across experiments with nothing tying the versions together, and gives no alias to promote or roll back. WHY NOT B: Git keeps the version history of the text, but metric comparison, promotion and rollback all become manual steps. It has no link between a prompt version and its evaluation results.

4 Assembling and Deploying Applications

A data science team has built a LangChain agent deployed on a Databricks Model Serving endpoint. They want internal business analysts (who are not engineers) to interact with the agent through a web chat interface with conversation history, without requiring them to use notebooks or APIs directly. Which Databricks-native deployment option is MOST appropriate?

  1. AShare the endpoint's REST API URL and an access token with the analysts, along with example requests for curl or Postman
  2. BHave the analysts open the model's page in the workspace UI and use its built-in Test endpoint panel for their production questions
  3. CWrap the agent in a batch Lakeflow Declarative Pipelines (formerly Delta Live Tables) pipeline that analysts trigger from the Jobs UI
  4. DDeploy a Databricks App with a Streamlit or Gradio chat front end that calls the endpoint and uses workspace authentication
Show answer & explanation

Correct answer: D

WHY D is correct: Databricks Apps allows teams to build and host interactive web applications (Gradio, Streamlit, React, etc.) directly within the Databricks workspace. A Gradio or Streamlit chat interface wrapping the Model Serving endpoint provides a browser-accessible UI with conversation history display, user-friendly input, and Databricks workspace authentication — exactly what non-engineer business analysts need. WHY NOT A: Providing raw REST API credentials and instructing analysts to use curl/Postman requires technical expertise that business analysts typically lack. It provides no persistent conversation history UI and is entirely inappropriate for non-engineer users. WHY NOT C: A Delta Live Tables batch pipeline is a data transformation workflow, not an interactive conversational interface. Analysts cannot engage in real-time conversation with an agent through a DLT pipeline. WHY NOT B: The 'Test endpoint' button in the MLflow / Unity Catalog model UI is a developer tool for testing input/output formats during development and debugging. It is not designed for ongoing production user interaction, does not maintain conversation history, and requires Unity Catalog access privileges that business analysts may not have.

5 Assembling and Deploying Applications

A company is building a product catalog search system over 50 million product descriptions stored in a Delta table, to be embedded at 768 dimensions. The catalog is updated continuously as products are added and removed. Query latency must be under 100 ms. Which Vector Search configuration is MOST appropriate?

  1. AStorage-optimized endpoint with a Direct Vector Access Index, chosen for its lower cost on large indexes
  2. BStandard endpoint with a Direct Vector Access Index, which bypasses the sync pipeline for the lowest query latency
  3. CStandard endpoint with a Delta Sync Index using Databricks-managed embeddings, set to continuous sync mode
  4. DStorage-optimized endpoint with a Delta Sync Index, chosen because it gives lower query latency at this scale
Show answer & explanation

Correct answer: C

WHY C is correct: 50M vectors at 768 dimensions is well within the standard endpoint's ~320M capacity. Delta Sync with Databricks-managed embeddings handles automatic embedding computation. Continuous sync mode keeps the index current as the source Delta table changes — ideal for a live product catalog. Standard endpoint query latency is lower than storage-optimized (storage-optimized adds ~250ms overhead). WHY NOT A: Storage-optimized endpoints add roughly 250 ms of query latency, so a 100 ms target is out of reach. They are designed for very large datasets (1B+) where standard endpoints are insufficient, which 50M vectors is not. A Direct Vector Access index would also need every add and remove pushed through the API by the team's own code. WHY NOT B: Query latency depends on the endpoint type, not on how vectors are written, so skipping the sync pipeline does not make queries faster. A Direct Vector Access index also has to be updated by the team's own upsert and delete calls and needs the embeddings computed outside Databricks, which risks a stale index for a continuously changing catalog. Delta Sync follows the source table automatically. WHY NOT D: As noted, storage-optimized endpoints add ~250ms query latency and don't support continuous sync. Both properties disqualify this option for a real-time, sub-100ms catalog search system.

6 Assembling and Deploying Applications

A developer needs a chain that first summarizes a document, then classifies the summary into one of three categories. Both steps call different LLMs. Which LCEL pattern correctly implements this sequential two-step chain?

  1. Achain = RunnableSequence([summarize_prompt, summarize_llm, classify_prompt, classify_llm])
  2. Bchain = RunnableParallel({'summary': summarize_prompt | summarize_llm, 'classification': classify_prompt | classify_llm})
  3. Cchain = summarize_prompt | summarize_llm | StrOutputParser() + classify_prompt | classify_llm | StrOutputParser()
  4. Dchain = (summarize_prompt | summarize_llm | StrOutputParser()) | (classify_prompt | classify_llm | StrOutputParser())
Show answer & explanation

Correct answer: D

WHY D is correct: LCEL supports nesting: each parenthesized sub-pipeline (summarize_prompt | summarize_llm | StrOutputParser()) produces a Runnable that outputs a text string. That text string is then passed as input to the second stage's prompt formatter (classify_prompt), and the full chain is chained together with |. This correctly implements the sequential summarize-then-classify pattern. WHY NOT B: RunnableParallel runs its branches concurrently on the SAME input — it does not chain the summary output into the classification input. It would attempt to classify the original document rather than the generated summary. WHY NOT C: The + operator is not a valid LCEL operator for chaining Runnables. This mixing of | and + will raise a TypeError. WHY NOT A: RunnableSequence is a valid internal LCEL class, but it expects each step to output the correct type for the next step. Passing the raw LLM object (summarize_llm, classify_llm) at the same level as prompt objects without parsers between them will fail to correctly thread texts between the steps.

7 Assembling and Deploying Applications

A team needs to index 800 million embeddings at 768 dimensions from a static, annually refreshed document archive. Cost optimization is the primary concern and query latency up to 500 ms is acceptable. Which Vector Search configuration fits BEST?

  1. AA single standard endpoint, which is the cheapest option and can hold the full 800 million vectors
  2. BThree standard endpoints with the index split across them, since each one supports about 320 million vectors
  3. CA storage-optimized endpoint with a Delta Sync Index in triggered sync mode, refreshed after each annual update
  4. DA storage-optimized endpoint with a Direct Vector Access Index and continuous sync, so the archive stays current in real time
Show answer & explanation

Correct answer: C

WHY C is correct: 800 million vectors is far above the roughly 320 million a standard endpoint holds at 768 dimensions, and within the capacity of a storage-optimized endpoint, which supports over one billion vectors at that dimension. Storage-optimized endpoints cost less per vector at this scale, and their somewhat higher latency fits the 500 ms budget. Because the archive changes once a year, a triggered sync after each refresh is enough. WHY NOT A: A standard endpoint supports roughly 320 million vectors at 768 dimensions, so 800 million vectors do not fit on one. WHY NOT B: Splitting the index over three standard endpoints forces the application to send every query to all three and merge the results. That is more expensive and more fragile than one storage-optimized endpoint built for this scale. WHY NOT D: Storage-optimized endpoints do not support continuous sync, and a Direct Vector Access index is written through the API rather than synced from a Delta table. Real-time updates are also unnecessary for an archive that changes once a year.

8 Assembling and Deploying Applications

A developer uses the Databricks Vector Search Python SDK to query an index. The application must return at most 5 documents but must ONLY return documents where the 'status' column equals 'approved'. Which SDK call correctly implements this?

  1. Aindex.similarity_search(query_text='user question', num_results=5, query_type='HYBRID')
  2. Bindex.similarity_search(query_text='user question', num_results=5, where_clause="status = 'approved'")
  3. Cindex.similarity_search(query_text='user question', num_results=5, filters={'status': 'approved'})
  4. Dindex.similarity_search(query_text='user question', top_k=5, metadata_filter='status==approved')
Show answer & explanation

Correct answer: C

WHY C is correct: The Databricks Vector Search Python SDK's similarity_search() method accepts num_results for the result count limit and a filters parameter that takes a dictionary of column-value pairs for metadata filtering. {'status': 'approved'} restricts results to documents whose 'status' column equals 'approved'. WHY NOT A: This call is missing the status filter. It will return the top-5 most similar documents regardless of their status column value, potentially returning non-approved documents. WHY NOT B: where_clause is not a parameter in the Databricks Vector Search SDK's similarity_search() method. Vector Search filtering uses the filters dictionary parameter, not SQL WHERE clause strings. WHY NOT D: top_k and metadata_filter are not the correct parameter names in the Databricks Vector Search SDK. The correct parameters are num_results and filters respectively. Using incorrect parameter names will either cause errors or be silently ignored.

Take the full GenAI Engineer practice test →