GENERATIVE-AI-ENGINEER-ASSOCIATE practice question 15 of 15

A Generative Al Engineer is setting up a Databricks Vector Search that will lookup news articles by topic within 10 days of the date specified An example query might be "Tell me about monster truck news around January 5th 1992". They want to do this with the least amount of effort. How can they set up their Vector Search index to support this use case?

Full set: 61 questions
Answer options
A: Split articles by 10 day blocks and return the block closest to the query.
B: Include metadata columns for article date and topic to support metadata filtering. Correct answer
C: pass the query directly to the vector search index and return the best articles.
D: Create separate indexes by topic and add a classifier model to appropriately pick the best index.
Correct Answer:
B. Include metadata columns for article date and topic to support metadata filtering.
Explanation

Databricks Vector Search is designed to perform hybrid searches that combine semantic similarity search on vector embeddings with precise filtering on metadata. By including the article date and topic as metadata columns in the source Delta Table for the index, the engineer can use the filters parameter in the query. This allows the system to first narrow down the search space to articles within the specified date range and/or topic, and then perform the vector search on that pre-filtered subset. This is the most efficient and direct method, requiring the least effort as it leverages a built-in feature.

Why Incorrect

A. Splitting articles into arbitrary time blocks is an inefficient and complex data preparation step that does not allow for dynamic date range queries centered on a specific day.
C. Passing the query directly only addresses the semantic component ("monster truck news") and completely ignores the critical date filtering requirement ("around January 5th 1992").
D. Creating separate indexes and a classifier model is a highly complex architecture (the opposite of "least effort") and still fails to solve the core problem of filtering by a specific date range.

References

1. Databricks Official Documentation, "Create a vector search index": This page details the process of creating a Vector Search index from a Delta Table. It implicitly supports the answer by showing that the source table can contain multiple columns, which can be used as metadata. The documentation states, "Vector Search uses this table to create and synchronize the index." This confirms that metadata columns from the source table are available to the index.

Source: Databricks Documentation > Docs > Generative AI > Databricks Vector Search > Create a vector search index.

2. Databricks Official Documentation, "Search for similar vectors": This document explicitly describes the filters parameter for the queryvectorindex API. It states, "The filters parameter is used to filter on metadata columns before the vector search is performed." It provides a clear example of a SQL-like WHERE clause for filtering, such as filters="id > 10". This directly supports using a date column for filtering as required by the question.

Source: Databricks Documentation > Docs > Generative AI > Databricks Vector Search > Search for similar vectors > Section: "Query an index and return results".

Scroll to Top