Better understading

Hey im very new to this topic and try to understand it better.

So my curretn understanding is the following:
I create an index with my wanted search algorithm as e.g. cosine.

In that index i can load then my data

I also can define a namespace for speciffic data sections.
So i have given:
index C
namespace A
book A
book B
now i could filter the following way:

( im using langchains pc lib )

vs = PineconeVectorStore.from_texts(namespace=A, embedding=embeddings, texts=bookA , index_name=C )

vs2 = PineconeVectorStore.from_texts(namespace=B, texts=bookB embedding=embeddings, index_name=C)

now index C holds both books and if i filter later then (e.g. a week) the following way:
vs = PineconeVectorStore(namespace=A, embedding=embeddings, index_name=C)
… It returns me just a vs isntance containing u´just the bookA data which i can use then for e.g. similarity search

Is this appriach correct?

  1. question:
    If i forgot which data are e.g. under namespace A, how could i figure that out?

Hi @derbenedikt.sterra, and welcome to the Pinecone forums!

Thank you for your question.

It’s a little difficult to follow your thread as posted, but in general I believe you have the right idea.

You can perform a similarity search by first building a namespace full of vectors about a given topic.

At query time, you convert the user’s natural language query into embeddings, using the same embeddings model you used when upserting your data originally.

You provide this query to Pinecone, and Pinecone returns you the vectors that are most relevant to your query vectors.

It might be easier to run through a working example - we’ve got a ton here in our open-source repository that I’ll link you to - here’s one one for doing searches across multiple namespaces that each contain different data.

You’ll find many other examples broken out by use-case in that same repository.

I hope that helps!


Hey Zack, sorry saw your message just now. Thanks for the src. I was fortunately able to get everything to work! :slight_smile: Your support bot is a game changer!