1. Learn
  2. /
  3. Courses
  4. /
  5. Vector Databases for Embeddings with Pinecone

Connected

Exercise

Filtering queries

In this exercise, you'll practice querying the 'datacamp-index' Pinecone index. You'll connect to the index and query it using the vector provided to retrieve similar vectors. You'll also use metadata filtering to optimize your querying and return the most relevant search results.

Instructions

100 XP
  • Initialize the Pinecone connection with your API key.
  • Retrieve the MOST similar vector to the vector provided, only searching through vectors where the metadata 'year' equals 2024.