Which statement best describes what happens during the insert operation in a vector database?
Think about what it means to add new data to a database.
Inserting means adding new vectors and their metadata into the database so they can be searched later.
What will be the output of the following code snippet that deletes a vector by ID and then queries the database?
vectors = {'v1': [0.1, 0.2], 'v2': [0.4, 0.5]}
# Delete vector with ID 'v1'
del vectors['v1']
# Query remaining keys
print(list(vectors.keys()))Deleting a key removes it from the dictionary.
Deleting 'v1' removes it from the dictionary, so only 'v2' remains.
You want to build a vector database that supports fast similarity search on high-dimensional image embeddings. Which model type is best suited for this task?
Think about which model creates vectors that capture image features well.
Embedding models trained on images produce vectors that represent image features well for similarity search.
In a vector database query, the parameter k controls how many nearest neighbors are returned. What happens if you increase k from 5 to 20?
Think about what increasing the number of neighbors means for results and speed.
Increasing k returns more neighbors, which can improve recall but slows down the query.
Given the following code to update a vector in a vector database, what error will it raise?
vectors = {'v1': [0.1, 0.2], 'v2': [0.4, 0.5]}
# Attempt to update vector 'v3'
vectors['v3'][0] = 0.9
print(vectors)Consider what happens when you try to access a key that is not in a dictionary.
Accessing vectors['v3'] raises a KeyError because 'v3' is not a key in the dictionary.