Creating Namespaces with Langchain for Multiple Documents

Hi All, I have a query I’m building an RAG application for students with Pinecone -Langchain

In the student Application for embedding → they have 2 courses; say ( Computer and Accounting), now we can use the namespace to upsert these two courses individually, which is fine.

I have a Question:

The Computing Course → itself has many sub-modules, assessments, Marking policies and other Policy-related documents.

  • Need suggestions - how can this be done in the sub-modules part, (if we make all this as a single namespace, then the retrieval will be a bit slow in response time) Otherwise sub-namespaces under the computer namespace, how to do this work and can be achieved.

  • Kindly suggest me the documents for Namespaces.

  • I have around 100 Pdf for each course, suggest another approach as well. if this not works well.

Best
Roopesh

Hi @krroopeshbharatwaj1 and welcome to the Pinecone community forums!

Thank you for your question.

You could also look into metadata filtering which will allow you to organize your vectors with arbitrary tags such as sub-modules, assessments, etc.

Combining this with namespaces should provide what you need.

Hope this helps!

Best,
Zack

@ZacharyProser

Thanks a lot for the suggestions, I will check the same, will it be included in the langchain.

Also, I have a doubt, as you are aware when the user asks the question, how can we this automatically channel to the specific meta filtering?

best,
Roopesh