Pinecone is a fully managed vector database with serverless and pod-based deployment options. These exercises cover serverless vs. pod architecture tradeoffs, namespace-based data isolation, metadata storage with vectors, the fetch API for ID-based retrieval, and MongoDB-style metadata filter operators.
0 / 5 completed
1 / 5
How does Pinecone Serverless differ from Pinecone's pod-based architecture?
Pinecone Serverless decouples storage from compute, meaning you pay only for storage and queries used with no pre-provisioned capacity. Pod-based indexes require choosing pod types (s1, p1, p2) and sizes upfront. Serverless scales automatically and is more cost-effective for variable or low-volume workloads.
2 / 5
In Pinecone, what is a Namespace and when would you use one?
A Pinecone Namespace is a logical partition within an index where vectors are stored and searched independently. Queries in one namespace don't return results from another. This is ideal for multi-tenant architectures where each tenant's vectors should be isolated without creating separate indexes.
3 / 5
A developer calls index.upsert(vectors=[('id1', [0.1, 0.2, ...], {'category': 'tech'})]). What is the third element in the tuple?
The third tuple element is the metadata dictionary — arbitrary key-value pairs stored alongside the vector. During queries, metadata fields can be used for filtered search (e.g., filter={'category': {'$eq': 'tech'}}), combining vector similarity with structured attribute filtering.
4 / 5
What does Pinecone's index.fetch(ids=['id1', 'id2']) return?
fetch() retrieves specific vectors by their IDs and returns their stored vector values and metadata. This is distinct from query (which finds nearest neighbors). Fetch is useful for implementing 'find item by ID' functionality or for verifying what was stored during upsert operations.
5 / 5
A Pinecone query uses filter={'price': {'$gte': 10, '$lte': 100}}. What does this filter do?
Pinecone's metadata filtering uses MongoDB-style operators. $gte (greater than or equal) and $lte (less than or equal) filter on the price metadata field. Only vectors with price between 10 and 100 are candidates for ANN search, combining structured filtering with semantic similarity.